crate shorthand visibility modifier
With regrets, this breaks rustfmt and rls. This is in the matter of #45388.
This commit is contained in:
parent
4c053db233
commit
214b0f2293
15 changed files with 99 additions and 12 deletions
|
|
@ -1787,10 +1787,19 @@ impl PolyTraitRef {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||
pub enum CrateSugar {
|
||||
/// Source is `pub(crate)`
|
||||
PubCrate,
|
||||
|
||||
/// Source is (just) `crate`
|
||||
JustCrate,
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||
pub enum Visibility {
|
||||
Public,
|
||||
Crate(Span),
|
||||
Crate(Span, CrateSugar),
|
||||
Restricted { path: P<Path>, id: NodeId },
|
||||
Inherited,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue