Auto merge of #5075 - JohnTitor:rustup-0122, r=flip1995
Rustup to rust-lang/rust#68140 changelog: none
This commit is contained in:
commit
3e74853d1f
@ -114,7 +114,7 @@ fn check_fn(
|
||||
let preds = traits::elaborate_predicates(cx.tcx, cx.param_env.caller_bounds.to_vec())
|
||||
.filter(|p| !p.is_global())
|
||||
.filter_map(|pred| {
|
||||
if let ty::Predicate::Trait(poly_trait_ref) = pred {
|
||||
if let ty::Predicate::Trait(poly_trait_ref, _) = pred {
|
||||
if poly_trait_ref.def_id() == sized_trait || poly_trait_ref.skip_binder().has_escaping_bound_vars()
|
||||
{
|
||||
return None;
|
||||
|
@ -1300,7 +1300,7 @@ pub fn is_must_use_ty<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx>) -> boo
|
||||
Tuple(ref substs) => substs.types().any(|ty| is_must_use_ty(cx, ty)),
|
||||
Opaque(ref def_id, _) => {
|
||||
for (predicate, _) in cx.tcx.predicates_of(*def_id).predicates {
|
||||
if let ty::Predicate::Trait(ref poly_trait_predicate) = predicate {
|
||||
if let ty::Predicate::Trait(ref poly_trait_predicate, _) = predicate {
|
||||
if must_use_attr(&cx.tcx.get_attrs(poly_trait_predicate.skip_binder().trait_ref.def_id)).is_some() {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user