hir::Defaultness::Final =>
span_bug!(ast_item.span, "traits cannot have final items"),
};
let kind = match trait_item.kind {
hir::Defaultness::Final =>
span_bug!(ast_item.span, "traits cannot have final items"),
};
let kind = match trait_item.kind {
let const_qualif =
if let hir::TraitItemKind::Const(_, Some(body)) = ast_item.node {
self.const_qualif(0, body)
let const_qualif =
if let hir::TraitItemKind::Const(_, Some(body)) = ast_item.node {
self.const_qualif(0, body)
hir::print::to_string(self.tcx.hir(), |s| s.print_trait_item(ast_item));
let rendered_const = self.lazy(&RenderedConst(rendered));
hir::print::to_string(self.tcx.hir(), |s| s.print_trait_item(ast_item));
let rendered_const = self.lazy(&RenderedConst(rendered));
let fn_data = if let hir::TraitItemKind::Method(_, ref m) = ast_item.node {
let arg_names = match *m {
hir::TraitMethod::Required(ref names) => {
let fn_data = if let hir::TraitItemKind::Method(_, ref m) = ast_item.node {
let arg_names = match *m {
hir::TraitMethod::Required(ref names) => {
- ty::AssociatedKind::Type => EntryKind::AssociatedType(container),
- ty::AssociatedKind::Existential =>
+ ty::AssocKind::Type => EntryKind::AssocType(container),
+ ty::AssocKind::Existential =>
deprecation: self.encode_deprecation(def_id),
ty: match trait_item.kind {
deprecation: self.encode_deprecation(def_id),
ty: match trait_item.kind {
- hir::Defaultness::Default { has_value: true } => AssociatedContainer::ImplDefault,
- hir::Defaultness::Final => AssociatedContainer::ImplFinal,
+ hir::Defaultness::Default { has_value: true } => AssocContainer::ImplDefault,
+ hir::Defaultness::Final => AssocContainer::ImplFinal,
hir::Defaultness::Default { has_value: false } =>
span_bug!(ast_item.span, "impl items always have values (currently)"),
};
let kind = match impl_item.kind {
hir::Defaultness::Default { has_value: false } =>
span_bug!(ast_item.span, "impl items always have values (currently)"),
};
let kind = match impl_item.kind {
if let hir::ImplItemKind::Const(_, body_id) = ast_item.node {
let mir = self.tcx.at(ast_item.span).mir_const_qualif(def_id).0;
if let hir::ImplItemKind::Const(_, body_id) = ast_item.node {
let mir = self.tcx.at(ast_item.span).mir_const_qualif(def_id).0;
self.const_qualif(mir, body_id),
self.encode_rendered_const_for_body(body_id))
} else {
bug!()
}
}
self.const_qualif(mir, body_id),
self.encode_rendered_const_for_body(body_id))
} else {
bug!()
}
}
let fn_data = if let hir::ImplItemKind::Method(ref sig, body) = ast_item.node {
FnData {
constness: sig.header.constness,
let fn_data = if let hir::ImplItemKind::Method(ref sig, body) = ast_item.node {
FnData {
constness: sig.header.constness,
- ty::AssociatedKind::Existential => EntryKind::AssociatedExistential(container),
- ty::AssociatedKind::Type => EntryKind::AssociatedType(container)
+ ty::AssocKind::Existential => EntryKind::AssocExistential(container),
+ ty::AssocKind::Type => EntryKind::AssocType(container)
ty: Some(self.encode_item_type(def_id)),
inherent_impls: LazySeq::empty(),
ty: Some(self.encode_item_type(def_id)),
inherent_impls: LazySeq::empty(),
debug!("EntryBuilder::encode_mir({:?})", def_id);
if self.tcx.mir_keys(LOCAL_CRATE).contains(&def_id) {
let mir = self.tcx.optimized_mir(def_id);
debug!("EntryBuilder::encode_mir({:?})", def_id);
if self.tcx.mir_keys(LOCAL_CRATE).contains(&def_id) {
let mir = self.tcx.optimized_mir(def_id);