diff options
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/output.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_session/src/parse.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_session/src/utils.rs | 4 |
3 files changed, 11 insertions, 5 deletions
diff --git a/compiler/rustc_session/src/output.rs b/compiler/rustc_session/src/output.rs index 7a57b0621cd..9cd96895a61 100644 --- a/compiler/rustc_session/src/output.rs +++ b/compiler/rustc_session/src/output.rs @@ -186,10 +186,14 @@ pub fn invalid_output_for_target(sess: &Session, crate_type: CrateType) -> bool return true; } } - if let CrateType::ProcMacro | CrateType::Dylib = crate_type && sess.target.only_cdylib { + if let CrateType::ProcMacro | CrateType::Dylib = crate_type + && sess.target.only_cdylib + { return true; } - if let CrateType::Executable = crate_type && !sess.target.executables { + if let CrateType::Executable = crate_type + && !sess.target.executables + { return true; } diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index 671204c0d8e..abb0ab5630c 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -39,7 +39,7 @@ pub struct GatedSpans { impl GatedSpans { /// Feature gate the given `span` under the given `feature` - /// which is same `Symbol` used in `active.rs`. + /// which is same `Symbol` used in `unstable.rs`. pub fn gate(&self, feature: Symbol, span: Span) { self.spans.borrow_mut().entry(feature).or_default().push(span); } @@ -78,7 +78,7 @@ impl SymbolGallery { } /// Construct a diagnostic for a language feature error due to the given `span`. -/// The `feature`'s `Symbol` is the one you used in `active.rs` and `rustc_span::symbols`. +/// The `feature`'s `Symbol` is the one you used in `unstable.rs` and `rustc_span::symbols`. #[track_caller] pub fn feature_err( sess: &ParseSess, diff --git a/compiler/rustc_session/src/utils.rs b/compiler/rustc_session/src/utils.rs index aea7c6c2842..3ed044ad769 100644 --- a/compiler/rustc_session/src/utils.rs +++ b/compiler/rustc_session/src/utils.rs @@ -161,7 +161,9 @@ pub fn extra_compiler_flags() -> Option<(Vec<String>, bool)> { pub(crate) fn is_ascii_ident(string: &str) -> bool { let mut chars = string.chars(); - if let Some(start) = chars.next() && (start.is_ascii_alphabetic() || start == '_') { + if let Some(start) = chars.next() + && (start.is_ascii_alphabetic() || start == '_') + { chars.all(|char| char.is_ascii_alphanumeric() || char == '_') } else { false |
