move Constness into TraitPredicate
This commit is contained in:
parent
04c9901a08
commit
32390a0df6
49 changed files with 157 additions and 124 deletions
|
@ -87,7 +87,7 @@ impl<'tcx> LateLintPass<'tcx> for DropTraitConstraints {
|
|||
let predicates = cx.tcx.explicit_predicates_of(item.def_id);
|
||||
for &(predicate, span) in predicates.predicates {
|
||||
let trait_predicate = match predicate.kind().skip_binder() {
|
||||
Trait(trait_predicate, _constness) => trait_predicate,
|
||||
Trait(trait_predicate) => trait_predicate,
|
||||
_ => continue,
|
||||
};
|
||||
let def_id = trait_predicate.trait_ref.def_id;
|
||||
|
|
|
@ -211,7 +211,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults {
|
|||
let mut has_emitted = false;
|
||||
for &(predicate, _) in cx.tcx.explicit_item_bounds(def) {
|
||||
// We only look at the `DefId`, so it is safe to skip the binder here.
|
||||
if let ty::PredicateKind::Trait(ref poly_trait_predicate, _) =
|
||||
if let ty::PredicateKind::Trait(ref poly_trait_predicate) =
|
||||
predicate.kind().skip_binder()
|
||||
{
|
||||
let def_id = poly_trait_predicate.trait_ref.def_id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue