diff options
Diffstat (limited to '')
-rw-r--r-- | compiler/rustc_session/src/output.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_session/src/output.rs b/compiler/rustc_session/src/output.rs index 8ee3057de..c3f0c4b58 100644 --- a/compiler/rustc_session/src/output.rs +++ b/compiler/rustc_session/src/output.rs @@ -29,9 +29,9 @@ pub fn out_filename( out_filename } -/// Make sure files are writeable. Mac, FreeBSD, and Windows system linkers +/// Make sure files are writeable. Mac, FreeBSD, and Windows system linkers /// check this already -- however, the Linux linker will happily overwrite a -/// read-only file. We should be consistent. +/// read-only file. We should be consistent. pub fn check_file_is_writeable(file: &Path, sess: &Session) { if !is_writeable(file) { sess.emit_fatal(FileIsNotWriteable { file }); @@ -45,7 +45,7 @@ fn is_writeable(p: &Path) -> bool { } } -pub fn find_crate_name(sess: &Session, attrs: &[ast::Attribute], input: &Input) -> Symbol { +pub fn find_crate_name(sess: &Session, attrs: &[ast::Attribute]) -> Symbol { let validate = |s: Symbol, span: Option<Span>| { validate_crate_name(sess, s, span); s @@ -71,7 +71,7 @@ pub fn find_crate_name(sess: &Session, attrs: &[ast::Attribute], input: &Input) if let Some((attr, s)) = attr_crate_name { return validate(s, Some(attr.span)); } - if let Input::File(ref path) = *input { + if let Input::File(ref path) = sess.io.input { if let Some(s) = path.file_stem().and_then(|s| s.to_str()) { if s.starts_with('-') { sess.emit_err(CrateNameInvalid { s }); |