about summary refs log tree commit diff
path: root/src/librustc_codegen_utils/link.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-05-08 13:21:18 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2019-05-13 09:29:22 +1000
commitfb084a48e2ca663de41b316dc6ece2dceb93e24e (patch)
treeb78379f996dceee6039ea4880c66e7fe30b3efad /src/librustc_codegen_utils/link.rs
parent79602c87b561e26fa1a8fe58b9130cca37375f90 (diff)
downloadrust-fb084a48e2ca663de41b316dc6ece2dceb93e24e.tar.gz
rust-fb084a48e2ca663de41b316dc6ece2dceb93e24e.zip
Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.
Diffstat (limited to 'src/librustc_codegen_utils/link.rs')
-rw-r--r--src/librustc_codegen_utils/link.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_codegen_utils/link.rs b/src/librustc_codegen_utils/link.rs
index f3a1b219f8a..30f37fefa7c 100644
--- a/src/librustc_codegen_utils/link.rs
+++ b/src/librustc_codegen_utils/link.rs
@@ -2,6 +2,7 @@ use rustc::session::config::{self, OutputFilenames, Input, OutputType};
 use rustc::session::Session;
 use std::path::{Path, PathBuf};
 use syntax::{ast, attr};
+use syntax::symbol::sym;
 use syntax_pos::Span;
 
 pub fn out_filename(sess: &Session,
@@ -49,7 +50,7 @@ pub fn find_crate_name(sess: Option<&Session>,
     // as used. After doing this, however, we still prioritize a crate name from
     // the command line over one found in the #[crate_name] attribute. If we
     // find both we ensure that they're the same later on as well.
-    let attr_crate_name = attr::find_by_name(attrs, "crate_name")
+    let attr_crate_name = attr::find_by_name(attrs, sym::crate_name)
         .and_then(|at| at.value_str().map(|s| (at, s)));
 
     if let Some(sess) = sess {