visitor.visit_ty(ty);
visitor.visit_nested_body(length)
}
- TyObjectSum(ref bounds) => {
+ TyTraitObject(ref bounds) => {
walk_list!(visitor, visit_ty_param_bound, bounds);
}
TyImplTrait(ref bounds) => {
let expr = self.lower_expr(expr);
hir::TyTypeof(self.record_body(expr, None))
}
- TyKind::ObjectSum(ref bounds) => {
- hir::TyObjectSum(self.lower_bounds(bounds))
+ TyKind::TraitObject(ref bounds) => {
+ hir::TyTraitObject(self.lower_bounds(bounds))
}
TyKind::ImplTrait(ref bounds) => {
hir::TyImplTrait(self.lower_bounds(bounds))
TyPath(QPath),
/// A trait object type `Bound1 + Bound2 + Bound3`
/// where `Bound` is a trait or a lifetime.
- TyObjectSum(TyParamBounds),
+ TyTraitObject(TyParamBounds),
/// An `impl Bound1 + Bound2 + Bound3` type
/// where `Bound` is a trait or a lifetime.
TyImplTrait(TyParamBounds),
hir::TyPath(ref qpath) => {
self.print_qpath(qpath, false)?
}
- hir::TyObjectSum(ref bounds) => {
+ hir::TyTraitObject(ref bounds) => {
self.print_bounds("", &bounds[..])?;
}
hir::TyImplTrait(ref bounds) => {
TyNever => SawTyNever,
TyTup(..) => SawTyTup,
TyPath(_) => SawTyPath,
- TyObjectSum(..) => SawTyObjectSum,
+ TyTraitObject(..) => SawTyObjectSum,
TyImplTrait(..) => SawTyImplTrait,
TyTypeof(..) => SawTyTypeof,
TyInfer => SawTyInfer
err.emit();
});
}
- TyKind::ObjectSum(ref bounds) => {
+ TyKind::TraitObject(ref bounds) => {
self.no_questions_in_bounds(bounds, "trait object types", false);
}
_ => {}
match path.def {
Def::Trait(trait_def_id) => {
// N.B. this case overlaps somewhat with
- // TyObjectSum, see that fn for details
+ // TyTraitObject, see that fn for details
assert_eq!(opt_self_ty, None);
tcx.prohibit_type_params(path.segments.split_last().unwrap().1);
}
tcx.mk_fn_ptr(bare_fn_ty)
}
- hir::TyObjectSum(ref bounds) => {
+ hir::TyTraitObject(ref bounds) => {
self.conv_object_ty_poly_trait_ref(rscope, ast_ty.span, bounds)
}
hir::TyImplTrait(ref bounds) => {
trait_: box resolve_type(cx, trait_path.clean(cx), self.id)
}
}
- TyObjectSum(ref bounds) => {
+ TyTraitObject(ref bounds) => {
let lhs_ty = bounds[0].clean(cx);
match lhs_ty {
TraitBound(poly_trait, ..) => {
Path(Option<QSelf>, Path),
/// A trait object type `Bound1 + Bound2 + Bound3`
/// where `Bound` is a trait or a lifetime.
- ObjectSum(TyParamBounds),
+ TraitObject(TyParamBounds),
/// An `impl Bound1 + Bound2 + Bound3` type
/// where `Bound` is a trait or a lifetime.
ImplTrait(TyParamBounds),
TyKind::Typeof(expr) => {
TyKind::Typeof(fld.fold_expr(expr))
}
- TyKind::ObjectSum(bounds) => {
- TyKind::ObjectSum(bounds.move_map(|b| fld.fold_ty_param_bound(b)))
+ TyKind::TraitObject(bounds) => {
+ TyKind::TraitObject(bounds.move_map(|b| fld.fold_ty_param_bound(b)))
}
TyKind::ImplTrait(bounds) => {
TyKind::ImplTrait(bounds.move_map(|b| fld.fold_ty_param_bound(b)))
Some(TraitTyParamBound(poly_trait_ref, TraitBoundModifier::None)).into_iter()
.chain(other_bounds)
.collect();
- Ok(ast::TyKind::ObjectSum(all_bounds))
+ Ok(ast::TyKind::TraitObject(all_bounds))
}
}
}
let sp = mk_sp(lo, self.prev_span.hi);
- let sum = TyKind::ObjectSum(bounds);
+ let sum = TyKind::TraitObject(bounds);
Ok(P(Ty {id: ast::DUMMY_NODE_ID, node: sum, span: sp}))
}
ast::TyKind::Path(Some(ref qself), ref path) => {
self.print_qpath(path, qself, false)?
}
- ast::TyKind::ObjectSum(ref bounds) => {
+ ast::TyKind::TraitObject(ref bounds) => {
self.print_bounds("", &bounds[..])?;
}
ast::TyKind::ImplTrait(ref bounds) => {
visitor.visit_ty(ty);
visitor.visit_expr(expression)
}
- TyKind::ObjectSum(ref bounds) => {
+ TyKind::TraitObject(ref bounds) => {
walk_list!(visitor, visit_ty_param_bound, bounds);
}
TyKind::ImplTrait(ref bounds) => {