]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #37824 - jseyfried:symbols, r=eddyb
authorbors <bors@rust-lang.org>
Mon, 21 Nov 2016 14:08:47 +0000 (08:08 -0600)
committerGitHub <noreply@github.com>
Mon, 21 Nov 2016 14:08:47 +0000 (08:08 -0600)
Clean up `ast::Attribute`, `ast::CrateConfig`, and string interning

This PR
 - removes `ast::Attribute_` (changing `Attribute` from `Spanned<Attribute_>` to a struct),
 - moves a `MetaItem`'s name from the `MetaItemKind` variants to a field of `MetaItem`,
 - avoids needlessly wrapping `ast::MetaItem` with `P`,
 - moves string interning into `syntax::symbol` (`ast::Name` is a reexport of `symbol::Symbol` for now),
 - replaces `InternedString` with `Symbol` in the AST, HIR, and various other places, and
 - refactors `ast::CrateConfig` from a `Vec` to a `HashSet`.

r? @eddyb

1  2 
src/librustc/hir/map/def_collector.rs
src/librustc_metadata/creader.rs
src/librustc_mir/hair/cx/mod.rs
src/librustc_resolve/build_reduced_graph.rs
src/librustc_resolve/lib.rs
src/librustc_resolve/macros.rs
src/librustc_trans/mir/block.rs
src/librustc_typeck/check/mod.rs
src/libsyntax/feature_gate.rs
src/test/run-pass-fulldeps/auxiliary/custom_derive_partial_eq.rs

Simple merge
Simple merge
Simple merge
index 2bdfe734cf4173ce4e6ae2d665e2a31415d20909,26df986825b8452431973c911100c7cef516e854..c72ba7bb6876607ddc41b05295dea45eaae651b4
@@@ -1458,9 -1460,8 +1458,8 @@@ impl<'a> Resolver<'a> 
          // modules as we go.
          while index < module_path_len {
              let name = module_path[index].name;
 -            match self.resolve_name_in_module(search_module, name, TypeNS, false, false, span) {
 +            match self.resolve_name_in_module(search_module, name, TypeNS, false, span) {
                  Failed(_) => {
-                     let segment_name = name.as_str();
                      let module_name = module_to_string(search_module);
                      let msg = if "???" == &module_name {
                          let current_module = self.current_module;
Simple merge
Simple merge
Simple merge
Simple merge