diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-01-11 13:15:20 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-02-01 18:54:56 +0100 |
| commit | 93a8283614e995a0cf7a866356609b7522cfda24 (patch) | |
| tree | 6397f332880b5a73af9eec5cb3757e442a61ff90 /src/librustc_interface | |
| parent | 9be73dc63a63bc8692423bdac073c591dff80ccd (diff) | |
| download | rust-93a8283614e995a0cf7a866356609b7522cfda24.tar.gz rust-93a8283614e995a0cf7a866356609b7522cfda24.zip | |
Move builtin attribute logic to new rustc_attr crate.
For now, this is all the crate contains, but more attribute logic & types will be moved there over time.
Diffstat (limited to 'src/librustc_interface')
| -rw-r--r-- | src/librustc_interface/Cargo.toml | 1 | ||||
| -rw-r--r-- | src/librustc_interface/util.rs | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc_interface/Cargo.toml b/src/librustc_interface/Cargo.toml index 1fe5248dbf4..de7a9f4f5af 100644 --- a/src/librustc_interface/Cargo.toml +++ b/src/librustc_interface/Cargo.toml @@ -14,6 +14,7 @@ log = "0.4" rayon = { version = "0.3.0", package = "rustc-rayon" } smallvec = { version = "1.0", features = ["union", "may_dangle"] } syntax = { path = "../libsyntax" } +rustc_attr = { path = "../librustc_attr" } rustc_builtin_macros = { path = "../librustc_builtin_macros" } rustc_expand = { path = "../librustc_expand" } rustc_parse = { path = "../librustc_parse" } diff --git a/src/librustc_interface/util.rs b/src/librustc_interface/util.rs index 6bda85ded2b..56121fba2d5 100644 --- a/src/librustc_interface/util.rs +++ b/src/librustc_interface/util.rs @@ -32,7 +32,7 @@ use syntax::ast::{AttrVec, BlockCheckMode}; use syntax::mut_visit::{visit_clobber, MutVisitor, *}; use syntax::ptr::P; use syntax::util::lev_distance::find_best_match_for_name; -use syntax::{self, ast, attr}; +use syntax::{self, ast}; /// Adds `target_feature = "..."` cfgs for a variety of platform /// specific features (SSE, NEON etc.). @@ -547,7 +547,7 @@ pub fn build_output_filenames( .opts .crate_name .clone() - .or_else(|| attr::find_crate_name(attrs).map(|n| n.to_string())) + .or_else(|| rustc_attr::find_crate_name(attrs).map(|n| n.to_string())) .unwrap_or_else(|| input.filestem().to_owned()); OutputFilenames::new( |
