]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast/src/ast.rs
Merge crate and restricted visibilities
[rust.git] / compiler / rustc_ast / src / ast.rs
index 5a4c997ed9bfc606ea775c2c1644e74c22b0585c..2c047fbc53945ab04f2166e571283f71788c1b49 100644 (file)
@@ -1976,6 +1976,8 @@ pub struct BareFnTy {
     pub ext: Extern,
     pub generic_params: Vec<GenericParam>,
     pub decl: P<FnDecl>,
+    /// Span of the `fn(...) -> ...` part.
+    pub decl_span: Span,
 }
 
 /// The various kinds of type recognized by the compiler.
@@ -2564,15 +2566,6 @@ pub fn new(generic_params: Vec<GenericParam>, path: Path, span: Span) -> Self {
     }
 }
 
-#[derive(Copy, Clone, Encodable, Decodable, Debug, HashStable_Generic)]
-pub enum CrateSugar {
-    /// Source is `pub(crate)`.
-    PubCrate,
-
-    /// Source is (just) `crate`.
-    JustCrate,
-}
-
 #[derive(Clone, Encodable, Decodable, Debug)]
 pub struct Visibility {
     pub kind: VisibilityKind,
@@ -2583,7 +2576,6 @@ pub struct Visibility {
 #[derive(Clone, Encodable, Decodable, Debug)]
 pub enum VisibilityKind {
     Public,
-    Crate(CrateSugar),
     Restricted { path: P<Path>, id: NodeId },
     Inherited,
 }