Add warn(unreachable_pub)
to rustc_builtin_macros
.
This commit is contained in:
parent
0685c97843
commit
0544d3a952
6 changed files with 51 additions and 50 deletions
|
@ -27,17 +27,17 @@ pub(crate) enum PathKind {
|
|||
}
|
||||
|
||||
impl Path {
|
||||
pub fn new(path: Vec<Symbol>) -> Path {
|
||||
pub(crate) fn new(path: Vec<Symbol>) -> Path {
|
||||
Path::new_(path, Vec::new(), PathKind::Std)
|
||||
}
|
||||
pub fn new_local(path: Symbol) -> Path {
|
||||
pub(crate) fn new_local(path: Symbol) -> Path {
|
||||
Path::new_(vec![path], Vec::new(), PathKind::Local)
|
||||
}
|
||||
pub fn new_(path: Vec<Symbol>, params: Vec<Box<Ty>>, kind: PathKind) -> Path {
|
||||
pub(crate) fn new_(path: Vec<Symbol>, params: Vec<Box<Ty>>, kind: PathKind) -> Path {
|
||||
Path { path, params, kind }
|
||||
}
|
||||
|
||||
pub fn to_ty(
|
||||
pub(crate) fn to_ty(
|
||||
&self,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
|
@ -46,7 +46,7 @@ impl Path {
|
|||
) -> P<ast::Ty> {
|
||||
cx.ty_path(self.to_path(cx, span, self_ty, self_generics))
|
||||
}
|
||||
pub fn to_path(
|
||||
pub(crate) fn to_path(
|
||||
&self,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
|
@ -87,7 +87,7 @@ pub(crate) fn self_ref() -> Ty {
|
|||
}
|
||||
|
||||
impl Ty {
|
||||
pub fn to_ty(
|
||||
pub(crate) fn to_ty(
|
||||
&self,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
|
@ -108,7 +108,7 @@ impl Ty {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn to_path(
|
||||
pub(crate) fn to_path(
|
||||
&self,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
|
@ -167,10 +167,10 @@ pub(crate) struct Bounds {
|
|||
}
|
||||
|
||||
impl Bounds {
|
||||
pub fn empty() -> Bounds {
|
||||
pub(crate) fn empty() -> Bounds {
|
||||
Bounds { bounds: Vec::new() }
|
||||
}
|
||||
pub fn to_generics(
|
||||
pub(crate) fn to_generics(
|
||||
&self,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue