Skip to content

Commit 0a71f47

Browse files
incr.comp.: Ignore doc-comments when computing the ICH.
1 parent f7eb004 commit 0a71f47

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/librustc_incremental/calculate_svh/svh_visitor.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ enum SawAbiComponent<'a> {
236236
SawTyParamBound,
237237
SawPolyTraitRef,
238238
SawAssocTypeBinding,
239-
SawAttribute(ast::AttrStyle, bool),
239+
SawAttribute(ast::AttrStyle),
240240
SawMacroDef,
241241
SawSpan(&'a str, usize, BytePos, &'a str, usize, BytePos, SawSpanExpnKind),
242242
}
@@ -746,8 +746,9 @@ impl<'a, 'hash, 'tcx> StrictVersionHashVisitor<'a, 'hash, 'tcx> {
746746
for i in indices {
747747
let attr = &attributes[i].node;
748748

749-
if !IGNORED_ATTRIBUTES.contains(&&*meta_item_sort_key(&attr.value)) {
750-
SawAttribute(attr.style, attr.is_sugared_doc).hash(self.st);
749+
if !attr.is_sugared_doc &&
750+
!IGNORED_ATTRIBUTES.contains(&&*meta_item_sort_key(&attr.value)) {
751+
SawAttribute(attr.style).hash(self.st);
751752
self.hash_meta_item(&*attr.value);
752753
}
753754
}

0 commit comments

Comments
 (0)