name: None,
attrs: Default::default(),
visibility: Inherited,
- def_id: FakeDefId::new_fake(item_def_id.krate),
+ def_id: ItemId::Auto { trait_: trait_def_id, for_: item_def_id },
kind: box ImplItem(Impl {
span: Span::dummy(),
unsafety: hir::Unsafety::Normal,
let (poly_trait, output) =
(data.0.as_ref().expect("as_ref failed").clone(), data.1.as_ref().cloned());
let new_ty = match poly_trait.trait_ {
- Type::ResolvedPath {
- ref path,
- ref param_names,
- ref did,
- ref is_generic,
- } => {
+ Type::ResolvedPath { ref path, ref did, ref is_generic } => {
let mut new_path = path.clone();
let last_segment =
new_path.segments.pop().expect("segments were empty");
Type::ResolvedPath {
path: new_path,
- param_names: param_names.clone(),
did: *did,
is_generic: *is_generic,
}
let mut bounds_vec = bounds.into_iter().collect();
self.sort_where_bounds(&mut bounds_vec);
- Some(WherePredicate::BoundPredicate { ty, bounds: bounds_vec })
+ Some(WherePredicate::BoundPredicate {
+ ty,
+ bounds: bounds_vec,
+ bound_params: Vec::new(),
+ })
})
.chain(
lifetime_to_bounds.into_iter().filter(|&(_, ref bounds)| !bounds.is_empty()).map(
}
let p = p.unwrap();
match p {
- WherePredicate::BoundPredicate { ty, mut bounds } => {
+ WherePredicate::BoundPredicate { ty, mut bounds, .. } => {
// Writing a projection trait bound of the form
// <T as Trait>::Name : ?Sized
// is illegal, because ?Sized bounds can only
match **trait_ {
Type::ResolvedPath {
path: ref trait_path,
- ref param_names,
ref did,
ref is_generic,
} => {
PolyTrait {
trait_: Type::ResolvedPath {
path: new_trait_path,
- param_names: param_names.clone(),
did: *did,
is_generic: *is_generic,
},