Rename Ty.node to Ty.kind
This commit is contained in:
parent
d4573c9c1e
commit
c3d8791373
50 changed files with 138 additions and 137 deletions
|
|
@ -385,7 +385,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
|||
}
|
||||
|
||||
if let ast::FunctionRetTy::Ty(ref ret_ty) = decl.output {
|
||||
if let ast::TyKind::ImplTrait(..) = ret_ty.node {
|
||||
if let ast::TyKind::ImplTrait(..) = ret_ty.kind {
|
||||
// FIXME: Opaque type desugaring prevents us from easily
|
||||
// processing trait bounds. See `visit_ty` for more details.
|
||||
} else {
|
||||
|
|
@ -1421,7 +1421,7 @@ impl<'l, 'tcx> Visitor<'l> for DumpVisitor<'l, 'tcx> {
|
|||
|
||||
fn visit_ty(&mut self, t: &'l ast::Ty) {
|
||||
self.process_macro_use(t.span);
|
||||
match t.node {
|
||||
match t.kind {
|
||||
ast::TyKind::Path(_, ref path) => {
|
||||
if generated_code(t.span) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
|
|||
}))
|
||||
}
|
||||
ast::ItemKind::Impl(.., ref trait_ref, ref typ, ref impls) => {
|
||||
if let ast::TyKind::Path(None, ref path) = typ.node {
|
||||
if let ast::TyKind::Path(None, ref path) = typ.kind {
|
||||
// Common case impl for a struct or something basic.
|
||||
if generated_code(path.span) {
|
||||
return None;
|
||||
|
|
@ -652,7 +652,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
|
|||
..
|
||||
}) |
|
||||
Node::Ty(&hir::Ty {
|
||||
node: hir::TyKind::Path(ref qpath),
|
||||
kind: hir::TyKind::Path(ref qpath),
|
||||
..
|
||||
}) => {
|
||||
self.tables.qpath_res(qpath, hir_id)
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ fn text_sig(text: String) -> Signature {
|
|||
impl Sig for ast::Ty {
|
||||
fn make(&self, offset: usize, _parent_id: Option<NodeId>, scx: &SaveContext<'_, '_>) -> Result {
|
||||
let id = Some(self.id);
|
||||
match self.node {
|
||||
match self.kind {
|
||||
ast::TyKind::Slice(ref ty) => {
|
||||
let nested = ty.make(offset + 1, id, scx)?;
|
||||
let text = format!("[{}]", nested.text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue