X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_ast%2Fsrc%2Fast.rs;h=2c047fbc53945ab04f2166e571283f71788c1b49;hb=7b987e34c083c81a9e70cb1d387759ac98c752c0;hp=5a4c997ed9bfc606ea775c2c1644e74c22b0585c;hpb=0ee37d5836608381ca34c889bc1be8aeb2d40cdf;p=rust.git diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index 5a4c997ed9b..2c047fbc539 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -1976,6 +1976,8 @@ pub struct BareFnTy { pub ext: Extern, pub generic_params: Vec, pub decl: P, + /// 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, 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, id: NodeId }, Inherited, }