Plumb dyn trait representation through ty::Dynamic
This commit is contained in:
parent
eff35e59c6
commit
6c01273a15
29 changed files with 110 additions and 57 deletions
|
@ -544,7 +544,7 @@ pub struct TraitObjectVisitor(pub FxHashSet<DefId>);
|
|||
impl<'tcx> TypeVisitor<'tcx> for TraitObjectVisitor {
|
||||
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> {
|
||||
match t.kind() {
|
||||
ty::Dynamic(preds, re) if re.is_static() => {
|
||||
ty::Dynamic(preds, re, _) if re.is_static() => {
|
||||
if let Some(def_id) = preds.principal_def_id() {
|
||||
self.0.insert(def_id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue