use middle::cstore::{ExternCrate, ExternCrateSource};
use syntax::ast;
use syntax::symbol::{keywords, LocalInternedString, Symbol};
-use syntax_pos::edition::Edition;
use std::cell::Cell;
use std::fmt::Debug;
/// Returns a string identifying this local node-id.
pub fn node_path_str(self, id: ast::NodeId) -> String {
- self.item_path_str(self.hir.local_def_id(id))
+ self.item_path_str(self.hir().local_def_id(id))
}
/// Returns a string identifying this def-id. This string is
debug!("push_krate_path: name={:?}", name);
buffer.push(&name);
}
- } else if self.sess.edition() == Edition::Edition2018 && !pushed_prelude_crate {
+ } else if self.sess.rust_2018() && !pushed_prelude_crate {
SHOULD_PREFIX_WITH_CRATE.with(|flag| {
// We only add the `crate::` keyword where appropriate. In particular,
// when we've not previously pushed a prelude crate to this path.
// Unclear if there is any value in distinguishing these.
// Probably eventually (and maybe we would even want
- // finer-grained distinctions, e.g. between enum/struct).
+ // finer-grained distinctions, e.g., between enum/struct).
data @ DefPathData::Misc |
data @ DefPathData::TypeNs(..) |
data @ DefPathData::Trait(..) |
// only occur very early in the compiler pipeline.
let parent_def_id = self.parent_def_id(impl_def_id).unwrap();
self.push_item_path(buffer, parent_def_id, pushed_prelude_crate);
- let node_id = self.hir.as_local_node_id(impl_def_id).unwrap();
- let item = self.hir.expect_item(node_id);
+ let node_id = self.hir().as_local_node_id(impl_def_id).unwrap();
+ let item = self.hir().expect_item(node_id);
let span_str = self.sess.source_map().span_to_string(item.span);
buffer.push(&format!("<impl at {}>", span_str));
}
ty::Str |
ty::FnPtr(_) |
ty::Projection(_) |
+ ty::Placeholder(..) |
ty::UnnormalizedProjection(..) |
ty::Param(_) |
ty::Opaque(..) |