Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
bc1a566
Prepare for merging from rust-lang/rust
Feb 17, 2026
d58d3e2
Merge ref '3c9faa0d037b' from rust-lang/rust
Feb 17, 2026
b3b48e5
Merge pull request #4861 from rust-lang/rustup-2026-02-17
oli-obk Feb 17, 2026
7f17343
Prepare for merging from rust-lang/rust
Feb 18, 2026
61065bb
Merge ref '8387095803f2' from rust-lang/rust
Feb 18, 2026
c1e4c33
Merge pull request #4864 from rust-lang/rustup-2026-02-18
RalfJung Feb 18, 2026
c57ecb0
Prepare for merging from rust-lang/rust
Feb 19, 2026
9437c83
Merge ref 'e0cb264b8145' from rust-lang/rust
Feb 19, 2026
8b03e83
fix genmc build
RalfJung Feb 19, 2026
d4b4ba8
Merge pull request #4865 from rust-lang/rustup-2026-02-19
RalfJung Feb 19, 2026
054d4af
Print a warning when trying to open a file in `/proc`
y1lan Feb 13, 2026
220d514
clean up path check
RalfJung Feb 21, 2026
1650751
Merge pull request #4857 from y1lan/warning_of_openning_proc_files
RalfJung Feb 21, 2026
e3062fa
Avoid keeping ThreadData borrowed while formatting tracing arguments
Stypox Feb 16, 2026
041e3a5
Remove RDTSC timer and always rely on Instant instead
Stypox Feb 16, 2026
b0b2e8c
Update documentation for tracing
Stypox Feb 16, 2026
e077016
Merge pull request #4860 from Stypox/fix-nested-tracing
RalfJung Feb 21, 2026
7be6269
Fix typo in tracing.md for `tracing_separate_thread`
willschlitzer Feb 22, 2026
4a2f129
Prepare for merging from rust-lang/rust
Feb 22, 2026
40289de
Merge ref '5fb2ff8611e5' from rust-lang/rust
Feb 22, 2026
20de36c
Merge pull request #4866 from willschlitzer/patch-1
RalfJung Feb 22, 2026
3607191
register Miri-specific symbols with the interner
RalfJung Feb 22, 2026
361416e
Merge pull request #4867 from rust-lang/rustup-2026-02-22
RalfJung Feb 22, 2026
e7e512d
Prepare for merging from rust-lang/rust
Feb 23, 2026
93e3234
Merge ref 'c78a29473a68' from rust-lang/rust
Feb 23, 2026
ca026f5
Merge pull request #4869 from rust-lang/rustup-2026-02-23
RalfJung Feb 23, 2026
7ed7b2b
Prepare for merging from rust-lang/rust
RalfJung Feb 24, 2026
4c14efb
Merge ref 'b3869b94cd1e' from rust-lang/rust
RalfJung Feb 24, 2026
4ab624f
Merge pull request #4870 from RalfJung/rustup
RalfJung Feb 24, 2026
2e17c9b
remove FIXME about size of Pointer type
RalfJung Feb 24, 2026
b6c1924
Merge pull request #4872 from RalfJung/ptr-size-comment
RalfJung Feb 25, 2026
d398074
Start socket shim
WhySoBad Feb 22, 2026
e4d35f5
Merge pull request #4868 from WhySoBad/network-socket-start
RalfJung Feb 26, 2026
6d271ba
Prepare for merging from rust-lang/rust
RalfJung Feb 26, 2026
8ebf937
Merge ref 'bb779a91568a' from rust-lang/rust
RalfJung Feb 26, 2026
470706d
silence clippy lint that makes code harder to read
RalfJung Feb 26, 2026
b8d5538
add test for deallocating partially-interior-mutable ref
RalfJung Feb 26, 2026
7ca67a4
Merge pull request #4874 from RalfJung/rustup
RalfJung Feb 26, 2026
3c492b4
Merge pull request #4875 from RalfJung/cell-dealloc-test
RalfJung Feb 26, 2026
dda4f84
Add `#[must_use]` attribute to `HashMap` and `HashSet` constructors
xtqqczze Feb 28, 2026
7b8534e
Prepare for merging from rust-lang/rust
RalfJung Feb 28, 2026
c64335d
Merge ref 'ba1567989ee7' from rust-lang/rust
RalfJung Feb 28, 2026
1e25d52
Merge pull request #4878 from RalfJung/rustup
RalfJung Feb 28, 2026
a49c083
native-lib: better organize fn ptr tests
RalfJung Mar 1, 2026
71f4b75
native-lib: also test fn ptrs that are instances of generics
RalfJung Mar 1, 2026
1472b9f
Merge pull request #4880 from RalfJung/native-lib-fnptr
RalfJung Mar 1, 2026
a36fc5c
FCNTL F_SETFL Ignore creation flags
MousseARaser06 Feb 1, 2026
7dc80de
use ignorelist instead of allowlist for file flags
RalfJung Mar 1, 2026
0500cdc
Merge pull request #4881 from RalfJung/setfl
RalfJung Mar 1, 2026
7f3bbe3
Report unused features
mu001999 Feb 5, 2026
28b6bcb
Add tests for unused-features
mu001999 Feb 5, 2026
d0a182f
Remove unused features in compiler
mu001999 Mar 1, 2026
0ecb437
Relax target of `#[rustc_{dump_predicates,object_lifetime_default,var…
fmease Mar 2, 2026
853967a
Don't crash if `#[rustc_{dump_item_bounds,variance}]` was applied to …
fmease Mar 2, 2026
ec324dc
Don't ignore `#[rustc_variance]` on associated functions
fmease Mar 2, 2026
c3a40e2
Rename `#[rustc_outlives]` to `#[rustc_dump_inferred_outlives]`
fmease Mar 2, 2026
6bb6b11
Rename `#[rustc_variance]` to `#[rustc_dump_variances]`
fmease Mar 2, 2026
6af7889
Rename `#![rustc_variance_of_opaques]` to `#![rustc_dump_variances_of…
fmease Mar 2, 2026
722fcbb
Rename `#[rustc_object_lifetime_default]` to `#[rustc_dump_object_lif…
fmease Mar 2, 2026
dc3db23
Slightly simplify write_bitcode_to_file handling
bjorn3 Feb 13, 2026
9e917ee
Replace spawn_named_thread method with thread_profiler
bjorn3 Feb 15, 2026
22d4bb2
Move print_pass_timings and print_statistics calls to rustc_interface
bjorn3 Feb 15, 2026
eff0d4c
Fuse codegen into LTO optimize methods
bjorn3 Feb 15, 2026
6ea5244
Move some methods to WriteBackendMethods
bjorn3 Feb 15, 2026
52b4de3
Abort after printing infinite type errors.
nnethercote Feb 27, 2026
ff3d308
Eliminate `Representability::Infinite`.
nnethercote Feb 27, 2026
cbd443d
Remove unused features in tools
mu001999 Feb 12, 2026
7ffaa41
Remove unused features in library tests
mu001999 Feb 20, 2026
0436634
Remove unused features in tests
mu001999 Feb 28, 2026
b3434a2
Prepare for merging from rust-lang/rust
Mar 4, 2026
12dbc5e
Merge ref 'd933cf483edf' from rust-lang/rust
Mar 4, 2026
a512d62
Merge pull request #4884 from rust-lang/rustup-2026-03-04
oli-obk Mar 4, 2026
91c7627
Remove `cycle_fatal` query modifier
Zoxc Mar 2, 2026
ee855c0
Migrate `rustc_pattern_analysis` lint to `Diagnostic`
GuillaumeGomez Mar 4, 2026
c29a26e
Remove `LintDiagnostic` implementation on `rustc_middle::Deprecated`
GuillaumeGomez Mar 4, 2026
66246a6
use `minicore` in some `run-make` tests
folkertdev Mar 4, 2026
b6fb486
add `rustc_minicore` helper function
folkertdev Mar 4, 2026
c9529f3
triagebot: remove a ping for `jieyouxu`
jieyouxu Mar 4, 2026
7ceb8ea
Remove unused `LintDiagnostic` trait
GuillaumeGomez Mar 4, 2026
828398e
Remove `LintDiagnostic` derive proc-macro
GuillaumeGomez Mar 4, 2026
d9ca8c9
Update `rustc-dev-guide` to remove mentions of `LintDiagnostic`
GuillaumeGomez Mar 4, 2026
e805d8c
Remove mentions of `LintDiagnostic`
GuillaumeGomez Mar 4, 2026
72de815
reference local MAIN_SEPARATOR_STR
MikkelPaulson Feb 27, 2026
d809214
Rename translation -> formatting
JonathanBrouwer Mar 4, 2026
098b1b9
make path separators available in const context
MikkelPaulson Feb 27, 2026
61b1838
Rollup merge of #153402 - RalfJung:miri, r=RalfJung
JonathanBrouwer Mar 4, 2026
1c44dbd
Rollup merge of #152164 - mu001999-contrib:lint/unused_features, r=Jo…
JonathanBrouwer Mar 4, 2026
552b316
Rollup merge of #152801 - bjorn3:lto_refactors14, r=jackh726
JonathanBrouwer Mar 4, 2026
5ff104c
Rollup merge of #153196 - MikkelPaulson:const-path-separators, r=joboet
JonathanBrouwer Mar 4, 2026
ed9d772
Rollup merge of #153204 - xtqqczze:must-use-map, r=Amanieu,joboet
JonathanBrouwer Mar 4, 2026
febe0bc
Rollup merge of #153317 - nnethercote:abort-after-infinite-errors, r=…
JonathanBrouwer Mar 4, 2026
fdb18d9
Rollup merge of #153276 - Zoxc:rem-fatal-cycle, r=nnethercote
JonathanBrouwer Mar 4, 2026
23e2734
Rollup merge of #153300 - fmease:test-attrs-tweaks, r=JonathanBrouwer
JonathanBrouwer Mar 4, 2026
9fe1c28
Rollup merge of #153396 - folkertdev:run-make-minicore, r=jieyouxu
JonathanBrouwer Mar 4, 2026
1500680
Rollup merge of #153401 - GuillaumeGomez:migrate-diag, r=JonathanBrouwer
JonathanBrouwer Mar 4, 2026
12b6699
Rollup merge of #153406 - jieyouxu:adjust-notifs, r=jieyouxu
JonathanBrouwer Mar 4, 2026
53ef4d2
Rollup merge of #153414 - JonathanBrouwer:translate_cleanup, r=Kivooeo
JonathanBrouwer Mar 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
89 changes: 85 additions & 4 deletions compiler/rustc_attr_parsing/src/attributes/rustc_dump.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use rustc_hir::Target;
use rustc_hir::attrs::AttributeKind;
use rustc_hir::{MethodKind, Target};
use rustc_span::{Span, Symbol, sym};

use crate::attributes::prelude::Allow;
Expand All @@ -25,6 +25,20 @@ impl<S: Stage> NoArgsAttributeParser<S> for RustcDumpDefParentsParser {
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcDumpDefParents;
}

pub(crate) struct RustcDumpInferredOutlivesParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcDumpInferredOutlivesParser {
const PATH: &[Symbol] = &[sym::rustc_dump_inferred_outlives];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Struct),
Allow(Target::Enum),
Allow(Target::Union),
Allow(Target::TyAlias),
]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcDumpInferredOutlives;
}

pub(crate) struct RustcDumpItemBoundsParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcDumpItemBoundsParser {
Expand All @@ -34,21 +48,88 @@ impl<S: Stage> NoArgsAttributeParser<S> for RustcDumpItemBoundsParser {
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcDumpItemBounds;
}

pub(crate) struct RustcDumpObjectLifetimeDefaultsParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcDumpObjectLifetimeDefaultsParser {
const PATH: &[Symbol] = &[sym::rustc_dump_object_lifetime_defaults];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::AssocConst),
Allow(Target::AssocTy),
Allow(Target::Const),
Allow(Target::Enum),
Allow(Target::Fn),
Allow(Target::ForeignFn),
Allow(Target::Impl { of_trait: false }),
Allow(Target::Impl { of_trait: true }),
Allow(Target::Method(MethodKind::Inherent)),
Allow(Target::Method(MethodKind::Trait { body: false })),
Allow(Target::Method(MethodKind::Trait { body: true })),
Allow(Target::Method(MethodKind::TraitImpl)),
Allow(Target::Struct),
Allow(Target::Trait),
Allow(Target::TraitAlias),
Allow(Target::TyAlias),
Allow(Target::Union),
]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcDumpObjectLifetimeDefaults;
}

pub(crate) struct RustcDumpPredicatesParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcDumpPredicatesParser {
const PATH: &[Symbol] = &[sym::rustc_dump_predicates];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Struct),
Allow(Target::AssocConst),
Allow(Target::AssocTy),
Allow(Target::Const),
Allow(Target::Delegation { mac: false }),
Allow(Target::Delegation { mac: true }),
Allow(Target::Enum),
Allow(Target::Union),
Allow(Target::Fn),
Allow(Target::Impl { of_trait: false }),
Allow(Target::Impl { of_trait: true }),
Allow(Target::Method(MethodKind::Inherent)),
Allow(Target::Method(MethodKind::Trait { body: false })),
Allow(Target::Method(MethodKind::Trait { body: true })),
Allow(Target::Method(MethodKind::TraitImpl)),
Allow(Target::Struct),
Allow(Target::Trait),
Allow(Target::AssocTy),
Allow(Target::TraitAlias),
Allow(Target::TyAlias),
Allow(Target::Union),
]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcDumpPredicates;
}

pub(crate) struct RustcDumpVariancesParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcDumpVariancesParser {
const PATH: &[Symbol] = &[sym::rustc_dump_variances];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Enum),
Allow(Target::Fn),
Allow(Target::Method(MethodKind::Inherent)),
Allow(Target::Method(MethodKind::Trait { body: false })),
Allow(Target::Method(MethodKind::Trait { body: true })),
Allow(Target::Method(MethodKind::TraitImpl)),
Allow(Target::Struct),
Allow(Target::Union),
]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcDumpVariances;
}

pub(crate) struct RustcDumpVariancesOfOpaquesParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcDumpVariancesOfOpaquesParser {
const PATH: &[Symbol] = &[sym::rustc_dump_variances_of_opaques];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Crate)]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcDumpVariancesOfOpaques;
}

pub(crate) struct RustcDumpVtableParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcDumpVtableParser {
Expand Down
9 changes: 0 additions & 9 deletions compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,15 +588,6 @@ impl<S: Stage> NoArgsAttributeParser<S> for RustcLintUntrackedQueryInformationPa
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcLintUntrackedQueryInformation;
}

pub(crate) struct RustcObjectLifetimeDefaultParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcObjectLifetimeDefaultParser {
const PATH: &[Symbol] = &[sym::rustc_object_lifetime_default];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Struct)]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcObjectLifetimeDefault;
}

pub(crate) struct RustcSimdMonomorphizeLaneLimitParser;

impl<S: Stage> SingleAttributeParser<S> for RustcSimdMonomorphizeLaneLimitParser {
Expand Down
36 changes: 0 additions & 36 deletions compiler/rustc_attr_parsing/src/attributes/test_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,28 +93,6 @@ impl<S: Stage> SingleAttributeParser<S> for ShouldPanicParser {
}
}

pub(crate) struct RustcVarianceParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcVarianceParser {
const PATH: &[Symbol] = &[sym::rustc_variance];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Struct),
Allow(Target::Enum),
Allow(Target::Union),
]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcVariance;
}

pub(crate) struct RustcVarianceOfOpaquesParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcVarianceOfOpaquesParser {
const PATH: &[Symbol] = &[sym::rustc_variance_of_opaques];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Crate)]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcVarianceOfOpaques;
}

pub(crate) struct ReexportTestHarnessMainParser;

impl<S: Stage> SingleAttributeParser<S> for ReexportTestHarnessMainParser {
Expand Down Expand Up @@ -215,20 +193,6 @@ impl<S: Stage> NoArgsAttributeParser<S> for RustcEvaluateWhereClausesParser {
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcEvaluateWhereClauses;
}

pub(crate) struct RustcOutlivesParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcOutlivesParser {
const PATH: &[Symbol] = &[sym::rustc_outlives];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Struct),
Allow(Target::Enum),
Allow(Target::Union),
Allow(Target::TyAlias),
]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcOutlives;
}

pub(crate) struct TestRunnerParser;

impl<S: Stage> SingleAttributeParser<S> for TestRunnerParser {
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,13 @@ attribute_parsers!(
Single<WithoutArgs<RustcDenyExplicitImplParser>>,
Single<WithoutArgs<RustcDoNotConstCheckParser>>,
Single<WithoutArgs<RustcDumpDefParentsParser>>,
Single<WithoutArgs<RustcDumpInferredOutlivesParser>>,
Single<WithoutArgs<RustcDumpItemBoundsParser>>,
Single<WithoutArgs<RustcDumpObjectLifetimeDefaultsParser>>,
Single<WithoutArgs<RustcDumpPredicatesParser>>,
Single<WithoutArgs<RustcDumpUserArgsParser>>,
Single<WithoutArgs<RustcDumpVariancesOfOpaquesParser>>,
Single<WithoutArgs<RustcDumpVariancesParser>>,
Single<WithoutArgs<RustcDumpVtableParser>>,
Single<WithoutArgs<RustcDynIncompatibleTraitParser>>,
Single<WithoutArgs<RustcEffectiveVisibilityParser>>,
Expand All @@ -306,9 +310,7 @@ attribute_parsers!(
Single<WithoutArgs<RustcNonConstTraitMethodParser>>,
Single<WithoutArgs<RustcNonnullOptimizationGuaranteedParser>>,
Single<WithoutArgs<RustcNounwindParser>>,
Single<WithoutArgs<RustcObjectLifetimeDefaultParser>>,
Single<WithoutArgs<RustcOffloadKernelParser>>,
Single<WithoutArgs<RustcOutlivesParser>>,
Single<WithoutArgs<RustcParenSugarParser>>,
Single<WithoutArgs<RustcPassByValueParser>>,
Single<WithoutArgs<RustcPassIndirectlyInNonRusticAbisParser>>,
Expand All @@ -323,8 +325,6 @@ attribute_parsers!(
Single<WithoutArgs<RustcStrictCoherenceParser>>,
Single<WithoutArgs<RustcTrivialFieldReadsParser>>,
Single<WithoutArgs<RustcUnsafeSpecializationMarkerParser>>,
Single<WithoutArgs<RustcVarianceOfOpaquesParser>>,
Single<WithoutArgs<RustcVarianceParser>>,
Single<WithoutArgs<ThreadLocalParser>>,
Single<WithoutArgs<TrackCallerParser>>,
// tidy-alphabetical-end
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/diagnostics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
{
let mut span: MultiSpan = spans.clone().into();
err.arg("ty", param_ty.to_string());
let msg = err.dcx.eagerly_translate_to_string(
let msg = err.dcx.eagerly_format_to_string(
msg!("`{$ty}` is made to be an `FnOnce` closure here"),
err.args.iter(),
);
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_builtin_macros/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ pub(crate) struct FormatUnusedArg {
impl Subdiagnostic for FormatUnusedArg {
fn add_to_diag<G: EmissionGuarantee>(self, diag: &mut Diag<'_, G>) {
diag.arg("named", self.named);
let msg = diag.eagerly_translate(msg!(
let msg = diag.eagerly_format(msg!(
"{$named ->
[true] named argument
*[false] argument
Expand Down Expand Up @@ -947,8 +947,8 @@ pub(crate) struct AsmClobberNoReg {
impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for AsmClobberNoReg {
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, G> {
// eager translation as `span_labels` takes `AsRef<str>`
let lbl1 = dcx.eagerly_translate_to_string(msg!("clobber_abi"), [].into_iter());
let lbl2 = dcx.eagerly_translate_to_string(msg!("generic outputs"), [].into_iter());
let lbl1 = dcx.eagerly_format_to_string(msg!("clobber_abi"), [].into_iter());
let lbl2 = dcx.eagerly_format_to_string(msg!("generic outputs"), [].into_iter());
Diag::new(
dcx,
level,
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_codegen_gcc/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ use object::read::archive::ArchiveFile;
use rustc_codegen_ssa::back::lto::SerializedModule;
use rustc_codegen_ssa::back::write::{CodegenContext, FatLtoInput, SharedEmitter};
use rustc_codegen_ssa::traits::*;
use rustc_codegen_ssa::{ModuleCodegen, ModuleKind, looks_like_rust_object_file};
use rustc_codegen_ssa::{CompiledModule, ModuleCodegen, ModuleKind, looks_like_rust_object_file};
use rustc_data_structures::memmap::Mmap;
use rustc_data_structures::profiling::SelfProfilerRef;
use rustc_errors::{DiagCtxt, DiagCtxtHandle};
use rustc_log::tracing::info;
use rustc_session::config::Lto;
use tempfile::{TempDir, tempdir};

use crate::back::write::save_temp_bitcode;
use crate::back::write::{codegen, save_temp_bitcode};
use crate::errors::LtoBitcodeFromRlib;
use crate::{GccCodegenBackend, GccContext, LtoMode, to_gcc_opt_level};

Expand Down Expand Up @@ -112,7 +112,7 @@ pub(crate) fn run_fat(
shared_emitter: &SharedEmitter,
each_linked_rlib_for_lto: &[PathBuf],
modules: Vec<FatLtoInput<GccCodegenBackend>>,
) -> ModuleCodegen<GccContext> {
) -> CompiledModule {
let dcx = DiagCtxt::new(Box::new(shared_emitter.clone()));
let dcx = dcx.handle();
let lto_data = prepare_lto(cgcx, each_linked_rlib_for_lto, dcx);
Expand All @@ -132,12 +132,12 @@ pub(crate) fn run_fat(
fn fat_lto(
cgcx: &CodegenContext,
prof: &SelfProfilerRef,
_dcx: DiagCtxtHandle<'_>,
dcx: DiagCtxtHandle<'_>,
modules: Vec<FatLtoInput<GccCodegenBackend>>,
mut serialized_modules: Vec<(SerializedModule<ModuleBuffer>, CString)>,
tmp_path: TempDir,
//symbols_below_threshold: &[String],
) -> ModuleCodegen<GccContext> {
) -> CompiledModule {
let _timer = prof.generic_activity("GCC_fat_lto_build_monolithic_module");
info!("going for a fat lto");

Expand Down Expand Up @@ -260,7 +260,7 @@ fn fat_lto(
// of now.
module.module_llvm.temp_dir = Some(tmp_path);

module
codegen(cgcx, prof, dcx, module, &cgcx.module_config)
}

pub struct ModuleBuffer(PathBuf);
Expand Down
11 changes: 3 additions & 8 deletions compiler/rustc_codegen_gcc/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ use std::{env, fs};

use gccjit::{Context, OutputKind};
use rustc_codegen_ssa::back::link::ensure_removed;
use rustc_codegen_ssa::back::write::{
BitcodeSection, CodegenContext, EmitObj, ModuleConfig, SharedEmitter,
};
use rustc_codegen_ssa::back::write::{BitcodeSection, CodegenContext, EmitObj, ModuleConfig};
use rustc_codegen_ssa::{CompiledModule, ModuleCodegen};
use rustc_data_structures::profiling::SelfProfilerRef;
use rustc_errors::DiagCtxt;
use rustc_errors::DiagCtxtHandle;
use rustc_fs_util::link_or_copy;
use rustc_log::tracing::debug;
use rustc_session::config::OutputType;
Expand All @@ -20,13 +18,10 @@ use crate::{GccContext, LtoMode};
pub(crate) fn codegen(
cgcx: &CodegenContext,
prof: &SelfProfilerRef,
shared_emitter: &SharedEmitter,
dcx: DiagCtxtHandle<'_>,
module: ModuleCodegen<GccContext>,
config: &ModuleConfig,
) -> CompiledModule {
let dcx = DiagCtxt::new(Box::new(shared_emitter.clone()));
let dcx = dcx.handle();

let _timer = prof.generic_activity_with_arg("GCC_module_codegen", &*module.name);
{
let context = &module.module_llvm.context;
Expand Down
Loading
Loading