diff options
| author | Michael Goulet <michael@errs.io> | 2022-12-12 19:23:20 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-12-14 18:39:39 +0000 |
| commit | cfa6a93a36d3cbb8e392f5d820e9e139f66c8a5a (patch) | |
| tree | ca7b3dd4fa61dfe2facb2e23261563b0a2f90e8d /compiler | |
| parent | ba64ba8b0dfd57f7d6d7399d0df7ded37d2af18d (diff) | |
Auto traits in dyn are suggestable
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/ty/diagnostics.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/compiler/rustc_middle/src/ty/diagnostics.rs b/compiler/rustc_middle/src/ty/diagnostics.rs index d7880a32ea9..ceb17a59a63 100644 --- a/compiler/rustc_middle/src/ty/diagnostics.rs +++ b/compiler/rustc_middle/src/ty/diagnostics.rs @@ -3,8 +3,8 @@ use std::ops::ControlFlow; use crate::ty::{ - visit::TypeVisitable, AliasTy, Const, ConstKind, DefIdTree, ExistentialPredicate, InferConst, - InferTy, Opaque, PolyTraitPredicate, Ty, TyCtxt, TypeSuperVisitable, TypeVisitor, + visit::TypeVisitable, AliasTy, Const, ConstKind, DefIdTree, InferConst, InferTy, Opaque, + PolyTraitPredicate, Ty, TyCtxt, TypeSuperVisitable, TypeVisitor, }; use rustc_data_structures::fx::FxHashMap; @@ -469,17 +469,6 @@ impl<'tcx> TypeVisitor<'tcx> for IsSuggestableVisitor<'tcx> { } } - Dynamic(dty, _, _) => { - for pred in *dty { - match pred.skip_binder() { - ExistentialPredicate::Trait(_) | ExistentialPredicate::Projection(_) => { - // Okay - } - _ => return ControlFlow::Break(()), - } - } - } - Param(param) => { // FIXME: It would be nice to make this not use string manipulation, // but it's pretty hard to do this, since `ty::ParamTy` is missing |
