diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2024-02-28 22:42:31 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2024-03-13 16:40:02 +0100 |
| commit | 12cd3220624fe50d039b268cc5ff35c7895ef293 (patch) | |
| tree | aa9033e56ad30fb82d8939f278bef3830c754a34 /compiler/rustc_session/src/errors.rs | |
| parent | 9ce37dc7290e60bd0dfc7a5d4fcdbbd836f989f0 (diff) | |
| download | rust-12cd3220624fe50d039b268cc5ff35c7895ef293.tar.gz rust-12cd3220624fe50d039b268cc5ff35c7895ef293.zip | |
Make incremental sessions identity no longer depend on the crate names provided by source code
Diffstat (limited to 'compiler/rustc_session/src/errors.rs')
| -rw-r--r-- | compiler/rustc_session/src/errors.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/errors.rs b/compiler/rustc_session/src/errors.rs index 5f04915a9e7..d523da1ad7e 100644 --- a/compiler/rustc_session/src/errors.rs +++ b/compiler/rustc_session/src/errors.rs @@ -10,7 +10,7 @@ use rustc_macros::Diagnostic; use rustc_span::{Span, Symbol}; use rustc_target::spec::{SplitDebuginfo, StackProtector, TargetTriple}; -use crate::parse::ParseSess; +use crate::{config::CrateType, parse::ParseSess}; pub struct FeatureGateError { pub span: MultiSpan, @@ -345,6 +345,13 @@ pub(crate) struct BinaryFloatLiteralNotSupported { pub span: Span, } +#[derive(Diagnostic)] +#[diag(session_unsupported_crate_type_for_target)] +pub struct UnsupportedCrateTypeForTarget<'a> { + pub crate_type: CrateType, + pub target_triple: &'a TargetTriple, +} + pub fn report_lit_error( psess: &ParseSess, err: LitError, |
