Pretty print $crate
as crate
or crate_name
in more cases · rust-lang/rust@c375333 (original) (raw)
`@@ -14,7 +14,6 @@ use parse::token;
`
14
14
`use ptr::P;
`
15
15
`use smallvec::SmallVec;
`
16
16
`use symbol::{keywords, Ident, Symbol};
`
17
``
`-
use visit::Visitor;
`
18
17
`use ThinVec;
`
19
18
``
20
19
`use rustc_data_structures::fx::FxHashMap;
`
`@@ -136,17 +135,6 @@ impl Annotatable {
`
136
135
` _ => false,
`
137
136
`}
`
138
137
`}
`
139
``
-
140
``
`-
pub fn visit_with<'a, V: Visitor<'a>>(&'a self, visitor: &mut V) {
`
141
``
`-
match self {
`
142
``
`-
Annotatable::Item(item) => visitor.visit_item(item),
`
143
``
`-
Annotatable::TraitItem(trait_item) => visitor.visit_trait_item(trait_item),
`
144
``
`-
Annotatable::ImplItem(impl_item) => visitor.visit_impl_item(impl_item),
`
145
``
`-
Annotatable::ForeignItem(foreign_item) => visitor.visit_foreign_item(foreign_item),
`
146
``
`-
Annotatable::Stmt(stmt) => visitor.visit_stmt(stmt),
`
147
``
`-
Annotatable::Expr(expr) => visitor.visit_expr(expr),
`
148
``
`-
}
`
149
``
`-
}
`
150
138
`}
`
151
139
``
152
140
`// A more flexible ItemDecorator.
`
`@@ -742,7 +730,7 @@ pub trait Resolver {
`
742
730
`fn next_node_id(&mut self) -> ast::NodeId;
`
743
731
`fn get_module_scope(&mut self, id: ast::NodeId) -> Mark;
`
744
732
``
745
``
`-
fn resolve_dollar_crates(&mut self, annotatable: &Annotatable);
`
``
733
`+
fn resolve_dollar_crates(&mut self, fragment: &AstFragment);
`
746
734
`fn visit_ast_fragment_with_placeholders(&mut self, mark: Mark, fragment: &AstFragment,
`
747
735
`derives: &[Mark]);
`
748
736
`fn add_builtin(&mut self, ident: ast::Ident, ext: Lrc);
`
`@@ -776,7 +764,7 @@ impl Resolver for DummyResolver {
`
776
764
`fn next_node_id(&mut self) -> ast::NodeId { ast::DUMMY_NODE_ID }
`
777
765
`fn get_module_scope(&mut self, _id: ast::NodeId) -> Mark { Mark::root() }
`
778
766
``
779
``
`-
fn resolve_dollar_crates(&mut self, _annotatable: &Annotatable) {}
`
``
767
`+
fn resolve_dollar_crates(&mut self, _fragment: &AstFragment) {}
`
780
768
`fn visit_ast_fragment_with_placeholders(&mut self, _invoc: Mark, _fragment: &AstFragment,
`
781
769
`_derives: &[Mark]) {}
`
782
770
`fn add_builtin(&mut self, _ident: ast::Ident, _ext: Lrc) {}
`