Skip to content

Commit 1c5e8b7

Browse files
committed
Rip out the call to hir_attrs in predicates_of
1 parent e331de1 commit 1c5e8b7

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

compiler/rustc_hir_analysis/src/collect/predicates_of.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::assert_matches::assert_matches;
22

33
use hir::Node;
4-
use rustc_attr_data_structures::{AttributeKind, find_attr};
54
use rustc_data_structures::fx::FxIndexSet;
65
use rustc_hir as hir;
76
use rustc_hir::def::DefKind;
@@ -334,19 +333,6 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen
334333
predicates.extend(const_evaluatable_predicates_of(tcx, def_id, &predicates));
335334
}
336335

337-
let attrs = tcx.hir_attrs(tcx.local_def_id_to_hir_id(def_id));
338-
// FIXME(staged_api): We might want to look at the normal stability attributes too but
339-
// first we would need a way to let std/core use APIs with unstable feature bounds from
340-
// within stable APIs.
341-
let allow_unstable_feature_attr =
342-
find_attr!(attrs, AttributeKind::UnstableFeatureBound(i) => i)
343-
.map(|i| i.as_slice())
344-
.unwrap_or_default();
345-
346-
for (feat_name, span) in allow_unstable_feature_attr {
347-
predicates.insert((ty::ClauseKind::UnstableFeature(*feat_name).upcast(tcx), *span));
348-
}
349-
350336
let mut predicates: Vec<_> = predicates.into_iter().collect();
351337

352338
// Subtle: before we store the predicates into the tcx, we

0 commit comments

Comments
 (0)