Support ?Trait bounds in supertraits and dyn Trait under a feature gate
This commit is contained in:
@@ -831,7 +831,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for GATArgsCollector<'tcx> {
|
||||
|
||||
fn could_be_self(trait_def_id: LocalDefId, ty: &hir::Ty<'_>) -> bool {
|
||||
match ty.kind {
|
||||
hir::TyKind::TraitObject([trait_ref], ..) => match trait_ref.trait_ref.path.segments {
|
||||
hir::TyKind::TraitObject([(trait_ref, _)], ..) => match trait_ref.trait_ref.path.segments {
|
||||
[s] => s.res.opt_def_id() == Some(trait_def_id.to_def_id()),
|
||||
_ => false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user