]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_codegen_utils/link.rs
Rollup merge of #69577 - GuillaumeGomez:cleanup-e0375, r=Dylan-DPC
[rust.git] / src / librustc_codegen_utils / link.rs
index 4dab4545b422fa16f9ec58a7bc96f1baf259e422..524fb0a59c2f19712d655b581b137495b13b80b6 100644 (file)
@@ -1,9 +1,9 @@
 use rustc::session::config::{self, Input, OutputFilenames, OutputType};
 use rustc::session::Session;
+use rustc_ast::{ast, attr};
 use rustc_span::symbol::sym;
 use rustc_span::Span;
 use std::path::{Path, PathBuf};
-use syntax::{ast, attr};
 
 pub fn out_filename(
     sess: &Session,
@@ -78,7 +78,7 @@ pub fn find_crate_name(sess: Option<&Session>, attrs: &[ast::Attribute], input:
     }
     if let Input::File(ref path) = *input {
         if let Some(s) = path.file_stem().and_then(|s| s.to_str()) {
-            if s.starts_with("-") {
+            if s.starts_with('-') {
                 let msg = format!(
                     "crate names cannot start with a `-`, but \
                                    `{}` has a leading hyphen",