self.resolve_local(local);
}
fn visit_ty(&mut self, ty: &'tcx Ty) {
- match ty.node {
+ match ty.kind {
TyKind::Path(ref qself, ref path) => {
self.smart_resolve_path(ty.id, qself.as_ref(), path, PathSource::Type);
}
fn resolve_item(&mut self, item: &Item) {
let name = item.ident.name;
- debug!("(resolving item) resolving {} ({:?})", name, item.node);
+ debug!("(resolving item) resolving {} ({:?})", name, item.kind);
- match item.node {
+ match item.kind {
ItemKind::TyAlias(_, ref generics) |
ItemKind::OpaqueTy(_, ref generics) |
ItemKind::Fn(_, _, ref generics, _) => {
AssocItemRibKind,
);
this.with_generic_param_rib(generic_params, |this| {
- match trait_item.node {
+ match trait_item.kind {
TraitItemKind::Const(ref ty, ref default) => {
this.visit_ty(ty);
) -> T {
let trait_assoc_types = replace(
&mut self.current_trait_assoc_types,
- trait_items.iter().filter_map(|item| match &item.node {
+ trait_items.iter().filter_map(|item| match &item.kind {
TraitItemKind::Type(bounds, _) if bounds.len() == 0 => Some(item.ident),
_ => None,
}).collect(),
AssocItemRibKind);
this.with_generic_param_rib(generic_params, |this| {
use crate::ResolutionError::*;
- match impl_item.node {
+ match impl_item.kind {
ImplItemKind::Const(..) => {
debug!(
"resolve_implementation ImplItemKind::Const",
let mut binding_map = FxHashMap::default();
pat.walk(&mut |pat| {
- match pat.node {
+ match pat.kind {
PatKind::Ident(binding_mode, ident, ref sub_pat)
if sub_pat.is_some() || self.is_base_res_local(pat.id) =>
{
/// Check the consistency of the outermost or-patterns.
fn check_consistent_bindings_top(&mut self, pat: &Pat) {
- pat.walk(&mut |pat| match pat.node {
+ pat.walk(&mut |pat| match pat.kind {
PatKind::Or(ref ps) => {
self.check_consistent_bindings(ps);
false
) {
// Visit all direct subpatterns of this pattern.
pat.walk(&mut |pat| {
- debug!("resolve_pattern pat={:?} node={:?}", pat, pat.node);
- match pat.node {
+ debug!("resolve_pattern pat={:?} node={:?}", pat, pat.kind);
+ match pat.kind {
PatKind::Ident(bmode, ident, ref sub) => {
// First try to resolve the identifier as some existing entity,
// then fall back to a fresh binding.
// Descend into the block.
for stmt in &block.stmts {
- if let StmtKind::Item(ref item) = stmt.node {
- if let ItemKind::MacroDef(..) = item.node {
+ if let StmtKind::Item(ref item) = stmt.kind {
+ if let ItemKind::MacroDef(..) = item.kind {
num_macro_definition_ribs += 1;
let res = self.r.definitions.local_def_id(item.id);
self.ribs[ValueNS].push(Rib::new(MacroDefinition(res)));