- QPath { name, self_type, trait_, .. } => Type::QualifiedPath {
- name: name.to_string(),
- self_type: Box::new((*self_type).into_tcx(tcx)),
- trait_: Box::new((*trait_).into_tcx(tcx)),
- },
+ QPath { name, self_type, trait_, .. } => {
+ // FIXME: should `trait_` be a clean::Path equivalent in JSON?
+ let trait_ = ResolvedPath { did: trait_.res.def_id(), path: *trait_ }.into_tcx(tcx);
+ Type::QualifiedPath {
+ name: name.to_string(),
+ self_type: Box::new((*self_type).into_tcx(tcx)),
+ trait_: Box::new(trait_),
+ }
+ }