Auto traits in dyn are suggestable
This commit is contained in:
parent
ba64ba8b0d
commit
cfa6a93a36
3 changed files with 29 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue