}
hir::TyImplTraitExistential(ref bounds) |
hir::TyImplTraitUniversal(_, ref bounds) => {
- self.print_bounds("impl ", &bounds[..])?;
+ self.print_bounds("impl", &bounds[..])?;
}
hir::TyArray(ref ty, v) => {
self.s.word("[")?;
use std::iter;
use syntax::{abi, ast};
-use syntax::symbol::keywords;
+use syntax::symbol::Symbol;
use syntax::feature_gate::{GateIssue, emit_feature_err};
use syntax_pos::Span;
let impl_trait_def_id = tcx.hir.local_def_id(ast_ty.id);
let generics = tcx.generics_of(fn_def_id);
let index = generics.type_param_to_index[&impl_trait_def_id.index];
- tcx.mk_param(index, keywords::Invalid.name() /* FIXME(chrisvittal) invalid? */)
+ tcx.mk_param(index,
+ Symbol::intern(&tcx.hir.node_to_pretty_string(ast_ty.id)))
}
hir::TyPath(hir::QPath::Resolved(ref maybe_qself, ref path)) => {
debug!("ast_ty_to_ty: maybe_qself={:?} path={:?}", maybe_qself, path);
.chain(univ_impl_trait_info.iter().enumerate().map(|(i, info)| {
ty::TypeParameterDef {
index: other_type_start + i as u32,
- name: keywords::Invalid.name() /* FIXME(chrisvittal) maybe make not Invalid */,
+ name: Symbol::intern(&tcx.hir.node_to_pretty_string(info.id)),
def_id: info.def_id,
has_default: false,
object_lifetime_default: rl::Set1::Empty,
}
struct ImplTraitUniversalInfo<'hir> {
+ id: ast::NodeId,
def_id: DefId,
span: Span,
bounds: &'hir [hir::TyParamBound],
});
visitor.items.into_iter().map(|ty| if let hir::TyImplTraitUniversal(_, ref bounds) = ty.node {
ImplTraitUniversalInfo {
+ id: ty.id,
def_id: tcx.hir.local_def_id(ty.id),
span: ty.span,
bounds: bounds