Skip to content

Commit d88056c

Browse files
committed
Derive HashStable for DelimArgs.
1 parent b8c54d6 commit d88056c

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

compiler/rustc_ast/src/ast.rs

+1-13
Original file line numberDiff line numberDiff line change
@@ -1927,7 +1927,7 @@ impl AttrArgs {
19271927
}
19281928

19291929
/// Delimited arguments, as used in `#[attr()/[]/{}]` or `mac!()/[]/{}`.
1930-
#[derive(Clone, Encodable, Decodable, Debug)]
1930+
#[derive(Clone, Encodable, Decodable, Debug, HashStable_Generic)]
19311931
pub struct DelimArgs {
19321932
pub dspan: DelimSpan,
19331933
pub delim: Delimiter, // Note: `Delimiter::Invisible` never occurs
@@ -1942,18 +1942,6 @@ impl DelimArgs {
19421942
}
19431943
}
19441944

1945-
impl<CTX> HashStable<CTX> for DelimArgs
1946-
where
1947-
CTX: crate::HashStableContext,
1948-
{
1949-
fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
1950-
let DelimArgs { dspan, delim, tokens } = self;
1951-
dspan.hash_stable(ctx, hasher);
1952-
delim.hash_stable(ctx, hasher);
1953-
tokens.hash_stable(ctx, hasher);
1954-
}
1955-
}
1956-
19571945
/// Represents a macro definition.
19581946
#[derive(Clone, Encodable, Decodable, Debug, HashStable_Generic)]
19591947
pub struct MacroDef {

0 commit comments

Comments
 (0)