Make incremental sessions identity no longer depend on the crate names provided by source code

This commit is contained in:
John Kåre Alsaker
2024-02-28 22:42:31 +01:00
parent 9ce37dc729
commit 12cd322062
10 changed files with 101 additions and 99 deletions

View File

@@ -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,