Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
99e7c15
Add `_value` API for number literals in proc-macro
GuillaumeGomez Mar 30, 2026
ebb3161
Ignore `library/proc_macro/src/lib.rs` test on GCC backend due to pro…
GuillaumeGomez Mar 31, 2026
21b3889
cg_clif: don't show verbose run-make cmd output for passing tests
jieyouxu Apr 13, 2026
6fbf38b
Use versioned target triple
madsmtm Apr 17, 2026
e517ab9
test: add aarch64 CRC32 intrinsic regression test
bryancostanich Apr 25, 2026
7bc02ad
feat(aarch64): implement llvm.aarch64.crc32{,c}{b,h,w,x} intrinsics
bryancostanich Apr 25, 2026
aaf8e61
Implement `core::arch::return_address` and tests
chorman0773 Apr 26, 2026
eca571b
Merge commit '3b6080cb20924f0c4f94e47bbbbfcae8b07d82e5' into sync_cg_…
bjorn3 Apr 28, 2026
0fed1bd
Merge branch 'sync_from_rust'
bjorn3 Apr 28, 2026
f03e4db
Merge pull request rust-lang/rustc_codegen_cranelift#1643 from 0xmuon…
0xmuon Apr 29, 2026
6e0ebb8
Fix cranelift-release-branch GHA workflow
bjorn3 Apr 29, 2026
aa9af34
Merge pull request rust-lang/rustc_codegen_cranelift#1645 from rust-l…
bjorn3 Apr 29, 2026
3aee9f5
Merge pull request rust-lang/rustc_codegen_cranelift#1651 from bryanc…
bjorn3 Apr 29, 2026
9393532
Make bench job mandatory again in CI
bjorn3 Apr 29, 2026
95451c6
Overhaul stable hashing traits.
nnethercote Apr 3, 2026
5e16bda
debuginfo: embed external source
Mrmaxmeier Apr 30, 2026
dbc51b3
Copy byval argument to local stackslot if alignment is insufficient (…
0xmuon Apr 30, 2026
423aabe
Rollup merge of #155995 - Mrmaxmeier:debuginfo-embed-external-source,…
JonathanBrouwer May 1, 2026
61c06b3
Rename the `hash_stable` method as `stable_hash`.
nnethercote Apr 30, 2026
88f32e8
Rename the `HashStableContext` trait as `StableHashCtxt`.
nnethercote Apr 30, 2026
e51620c
Rename the `HashStable*` trait/derives as `StableHash*`.
nnethercote Apr 30, 2026
ce02adc
miri: remove retag statements, make typed copies retag implicitly ins…
RalfJung Mar 24, 2026
5cb6579
move box related tests into its folder
danieljofficial May 4, 2026
2c2dad1
add issue links and bless
danieljofficial May 4, 2026
e3c6cc0
Test `graviola` in CI
CathalMullan Mar 10, 2026
ad60353
rename `drop_in_place` lang item to `drop_glue`
WaffleLapkin Apr 3, 2026
b2a1b93
Merge pull request #1631 from CathalMullan/graviola-tests
bjorn3 May 5, 2026
1d3f4e6
Move CrateInfo computation after codegen_crate
bjorn3 Mar 4, 2026
09d16aa
Move invocation_temp into OutputFilenames
bjorn3 May 6, 2026
d8c63ee
Sync from rust 365c0e1d7a614ca94cb48431dcd2bc6d3b645db1
bjorn3 May 7, 2026
f5393cc
Rustup to rustc 1.97.0-nightly (365c0e1d7 2026-05-06)
bjorn3 May 7, 2026
3ac863c
Fix rustc test suite
bjorn3 May 7, 2026
aaf0090
core: drop unmapped ZSTs in array `map`
joboet May 5, 2026
b8574f7
Couple of clippy fixes
bjorn3 May 7, 2026
e9aa5ed
Rollup merge of #156243 - bjorn3:lto_refactors18, r=mu001999
JonathanBrouwer May 7, 2026
60b8860
Rollup merge of #155220 - jieyouxu:dont-verbose-print-success-cg-clif…
JonathanBrouwer May 7, 2026
777a486
Rollup merge of #156245 - bjorn3:move_invocation_temp, r=oli-obk
JonathanBrouwer May 7, 2026
87b8765
Reborrow traits
aapoalas Feb 26, 2026
8231456
Rollup merge of #152487 - joboet:array_map_zst, r=oli-obk
JonathanBrouwer May 7, 2026
14684c2
Rename `rustc_data_structures::stable_hasher` as `stable_hash`.
nnethercote May 1, 2026
e8395a5
Handle --print=backend-has-mnemonic in cg_clif
bjorn3 May 8, 2026
bff9870
Rollup merge of #156124 - nnethercote:StableHash-renamings-2, r=jieyouxu
jhpratt May 9, 2026
3d8bb37
Rollup merge of #154972 - chorman0773:return_address, r=Mark-Simulacrum
JonathanBrouwer May 10, 2026
60817df
Rollup merge of #156323 - bjorn3:clif_has_mnemonic, r=wesleywiser
JonathanBrouwer May 10, 2026
ff958e5
Sync from rust 4b0c9d76ae7d387229caea55cfa73c280b08b8a7
bjorn3 May 11, 2026
620a59d
Rustup to rustc 1.97.0-nightly (4b0c9d76a 2026-05-10)
bjorn3 May 11, 2026
cf5132e
try to manually fix cranelift patch file
RalfJung May 10, 2026
6a9fb93
Rollup merge of #156393 - RalfJung:core-miri-tests, r=tgross35
JonathanBrouwer May 12, 2026
a8559d2
Add Swift function call ABI
djc Apr 26, 2026
a6d5e8c
Move `FlatPat::new` into `match_pair.rs`
Zalathar May 13, 2026
b4f8806
Add an extra intermediate step in MIR building for patterns
Zalathar May 13, 2026
0224412
Implement aarch64 AES LLVM intrinsics
CathalMullan May 6, 2026
ac09e49
Implement aarch64 SHA-256 LLVM intrinsics
CathalMullan May 14, 2026
cd848fb
Implement aarch64 PMULL LLVM intrinsics
CathalMullan May 14, 2026
f26c70e
Enable `graviola` tests on aarch64
CathalMullan May 14, 2026
9446d0d
Update to Cranelift 0.132
bjorn3 May 24, 2026
3b177d6
Rustup to rustc 1.98.0-nightly (23a3312d9 2026-05-23)
bjorn3 May 24, 2026
b798116
Merge pull request #1654 from CathalMullan/graviola-aarch64
bjorn3 May 24, 2026
626d1ab
Add `char::to_casefold()`
Jules-Bertholet Apr 2, 2026
21a57cb
Add `str::to_casefold()`
Jules-Bertholet Apr 3, 2026
6584161
Add `str::eq_ignore_case()`
Jules-Bertholet Apr 3, 2026
db01ed4
Address review comments
Jules-Bertholet Apr 18, 2026
274ddfa
Fix doctest
Jules-Bertholet Apr 18, 2026
ee40444
Postfix method names with `_unnormalized`
Jules-Bertholet May 27, 2026
da14011
Add tracking issue
Jules-Bertholet May 27, 2026
71297e6
MIR inlining: allow backends to opt-in to inlining intrinsics
RalfJung May 10, 2026
694fa4b
Allow two object files for a single CGU in CompiledModule
bjorn3 May 27, 2026
b7e2806
Stop needing an alloca for `catch_unwind`
scottmcm May 23, 2026
3428640
Rollup merge of #156867 - scottmcm:WIP-no-alloca-for-catch-unwind, r=…
JonathanBrouwer May 29, 2026
b84dc32
Implement aarch64 SQDMULH LLVM intrinsics
CathalMullan May 29, 2026
9b4b659
compiler: `ops::RangeInclusive` → `range::RangeInclusive`
scottmcm May 30, 2026
56d26b3
Rollup merge of #157051 - bjorn3:lto_refactors20, r=saethlin
JonathanBrouwer May 30, 2026
8643006
Rollup merge of #157139 - scottmcm:abi-range-inclusive, r=oli-obk
JonathanBrouwer May 30, 2026
1bc3e5a
ci: update download-artifact action to v8
xtqqczze May 30, 2026
3d68072
Remove async_fut.
cjgillot May 16, 2026
1ec2ee9
Use `ascii::Char` in `convert_while_ascii`
Jules-Bertholet May 31, 2026
ee7f3dd
Document `to_casefold` debug assertions
Jules-Bertholet May 31, 2026
dab3956
Use a `ArrayVec` in `CastTarget`
alexcrichton May 29, 2026
10f9f14
Build a fully-applied trait ref in method-not-found suggestion
Dnreikronos Jun 1, 2026
7a16714
Rollup merge of #157130 - alexcrichton:refactor-cast-target-internals…
JonathanBrouwer Jun 2, 2026
e6d5e95
Revert "Use `ascii::Char` in `convert_while_ascii`"
Jules-Bertholet Jun 2, 2026
9d7cdfe
Sync from rust d595fce01043347bf7f80e85b76dcc41b59a3e6e
bjorn3 Jun 3, 2026
94ec971
Rustup to rustc 1.98.0-nightly (d595fce01 2026-06-02)
bjorn3 Jun 3, 2026
9479f9e
Fix rustc test suite
bjorn3 Jun 3, 2026
53cca10
Merge pull request #1657 from CathalMullan/sqdmulh
bjorn3 Jun 3, 2026
a195e46
Merge pull request #1658 from xtqqczze/patch-1
bjorn3 Jun 3, 2026
0f08db0
Implement aarch64 SADDLP/UADDLP LLVM intrinsics
CathalMullan May 30, 2026
a78a540
Merge pull request #1660 from CathalMullan/uaddlp
bjorn3 Jun 3, 2026
db13562
resolve deprecated note links separately from doc comments
TaKO8Ki Jun 3, 2026
a08267c
Re-enable std_example jit test
bjorn3 Jun 4, 2026
4d581d6
Fix warning
bjorn3 Jun 4, 2026
4919940
Revert "LLVM 23: Run AssignGUIDPass in some places"
zmodem Jun 3, 2026
0bd62d4
Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`
JonathanBrouwer Jun 5, 2026
20479b7
thread spawn hooks: rename `run` to make it clear that it also handle…
RalfJung Jun 5, 2026
7602e3f
thread_loca::guard: make the `enable` contract more explicit
RalfJung Jun 5, 2026
97b5f45
windows LazyKey: fix enabling the guard on all relevant threads
RalfJung Jun 5, 2026
7d5a8bb
disable fiber test on Miri
RalfJung Jun 5, 2026
d047870
Test accessing a thread local in a different thread when loading a cd…
ohadravid Jun 5, 2026
f25f4b4
compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo …
jieyouxu Jun 5, 2026
36742d8
Convert `QueryRegionConstraint` into a struct
Human9000-bit Jun 5, 2026
4e59f4c
add `extern "tail"` calling convention
folkertdev May 27, 2026
b58125b
remove solaris implementation for File::lock, it has the wrong semantics
RalfJung Jun 5, 2026
353aa6d
use cfg_select for unix file lock implementations
RalfJung Jun 5, 2026
ce94e80
Rename `SyncView::{as_pin => as_pin_ref}`
pthariensflame Jun 6, 2026
b064718
std tests: skip a slow test on Miri
RalfJung Jun 6, 2026
7583ec5
Rustup to rustc 1.98.0-nightly (8954863c8 2026-06-05)
bjorn3 Jun 6, 2026
fa706d4
Use -Zdisable-incr-comp-backend-caching instead of an env var
bjorn3 Jun 6, 2026
68471f1
Remove output_filenames field from GlobalAsmConfig
bjorn3 Jun 4, 2026
10b981d
Recreate GlobalAsmConfig per CGU
bjorn3 Jun 4, 2026
f780eb5
Extract background half of module_codegen into compile_cgu
bjorn3 Jun 4, 2026
a37ba16
Inline crate::allocator::codegen
bjorn3 Jun 4, 2026
8dd7b5e
Remove ModuleCodegenResult
bjorn3 Jun 4, 2026
83a54e1
Rename profiler var to prof in compile_fn
bjorn3 Jun 4, 2026
738a551
Merge emit_cgu and emit_module
bjorn3 Jun 4, 2026
ff7b47d
Introduce AotModule
bjorn3 Jun 4, 2026
aa05426
Make LTO a hard error
bjorn3 Jun 6, 2026
917dc00
Switch to the cg_ssa codegen coordinator
bjorn3 Jun 4, 2026
f2ef415
Merge pull request #1662 from rust-lang/use_cg_ssa_driver
bjorn3 Jun 6, 2026
eb31c84
Merge commit 'f2ef4150da1c50e5b04607cdab771530cac4ffe4' into sync_cg_…
bjorn3 Jun 6, 2026
c97c77b
Update tidy allowed deps list
bjorn3 Jun 6, 2026
8386c6d
Rename `rustc_ast_lowering/src/errors.rs` into `rustc_ast_lowering/sr…
GuillaumeGomez Jun 5, 2026
e19cf27
Rename `rustc_ast_passes/src/errors.rs` into `rustc_ast_passes/src/di…
GuillaumeGomez Jun 5, 2026
100b35f
Rename `rustc_builtin_macros/src/errors.rs` into `rustc_builtin_macro…
GuillaumeGomez Jun 5, 2026
7acfa11
Rollup merge of #157533 - bjorn3:sync_cg_clif-2026-06-06, r=bjorn3
JonathanBrouwer Jun 6, 2026
b0e3a89
Rollup merge of #154742 - Jules-Bertholet:casefold, r=Mark-Simulacrum
JonathanBrouwer Jun 6, 2026
06c6056
Rollup merge of #154608 - GuillaumeGomez:number_value_proc-macro_API,…
JonathanBrouwer Jun 6, 2026
a166643
Rollup merge of #155144 - Zalathar:inter-pat, r=Nadrieril
JonathanBrouwer Jun 6, 2026
e4dc37d
Rollup merge of #157016 - folkertdev:add-tailcc-abi, r=WaffleLapkin
JonathanBrouwer Jun 6, 2026
77cfa18
Rollup merge of #157264 - Dnreikronos:fix/method-suggest-trait-extra-…
JonathanBrouwer Jun 6, 2026
a809af4
Rollup merge of #157386 - TaKO8Ki:rustdoc-deprecated-note-links-separ…
JonathanBrouwer Jun 6, 2026
8eddb33
Rollup merge of #157483 - RalfJung:windows-gnu-tls-leak, r=ChrisDenton
JonathanBrouwer Jun 6, 2026
5ca070d
Rollup merge of #157488 - jieyouxu:jieyouxu/fix/windows-subsystem-hac…
JonathanBrouwer Jun 6, 2026
859c0f7
Rollup merge of #157509 - RalfJung:solaris-file-locks, r=the8472
JonathanBrouwer Jun 6, 2026
5a399c9
Rollup merge of #157521 - pthariensflame:syncview-as-pin, r=BurntSushi
JonathanBrouwer Jun 6, 2026
670074b
Rollup merge of #156136 - danieljofficial:move-tests-box, r=Kivooeo
JonathanBrouwer Jun 6, 2026
8f60ffc
Rollup merge of #157365 - zmodem:revert_assign_guids, r=cuviper
JonathanBrouwer Jun 6, 2026
a12edb2
Rollup merge of #157471 - JonathanBrouwer:builtin-map-assertion, r=mejrs
JonathanBrouwer Jun 6, 2026
cfb9da6
Rollup merge of #157485 - GuillaumeGomez:rename-err-to-diag, r=Jonath…
JonathanBrouwer Jun 6, 2026
2510236
Rollup merge of #157494 - Human9000-bit:queryregionconstrains-as-stru…
JonathanBrouwer Jun 6, 2026
bcff501
Rollup merge of #157526 - RalfJung:miri-slow, r=JonathanBrouwer
JonathanBrouwer Jun 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6070,6 +6070,7 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
name = "unicode-table-generator"
version = "0.1.0"
dependencies = [
"rustc-hash 2.1.1",
"ucd-parse",
]

Expand Down
7 changes: 6 additions & 1 deletion compiler/rustc_abi/src/canon_abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub enum CanonAbi {
Rust,
RustCold,
RustPreserveNone,
RustTail,

/// An ABI that rustc does not know how to call or define.
Custom,
Expand Down Expand Up @@ -59,7 +60,10 @@ pub enum CanonAbi {
impl CanonAbi {
pub fn is_rustic_abi(self) -> bool {
match self {
CanonAbi::Rust | CanonAbi::RustCold | CanonAbi::RustPreserveNone => true,
CanonAbi::Rust
| CanonAbi::RustCold
| CanonAbi::RustPreserveNone
| CanonAbi::RustTail => true,
CanonAbi::C
| CanonAbi::Custom
| CanonAbi::Swift
Expand All @@ -81,6 +85,7 @@ impl fmt::Display for CanonAbi {
CanonAbi::Rust => ExternAbi::Rust,
CanonAbi::RustCold => ExternAbi::RustCold,
CanonAbi::RustPreserveNone => ExternAbi::RustPreserveNone,
CanonAbi::RustTail => ExternAbi::RustTail,
CanonAbi::Custom => ExternAbi::Custom,
CanonAbi::Swift => ExternAbi::Swift,
CanonAbi::Arm(arm_call) => match arm_call {
Expand Down
9 changes: 8 additions & 1 deletion compiler/rustc_abi/src/extern_abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ pub enum ExternAbi {
/// forcing callers to save all registers.
RustPreserveNone,

/// Ensures that calls in tail position can always be optimized into a jump.
///
/// This ABI is not stable, and relies on LLVM implementation details.
RustTail,

/// Unstable impl detail that directly uses Rust types to describe the ABI to LLVM.
/// Even normally-compatible Rust types can become ABI-incompatible with this ABI!
Unadjusted,
Expand Down Expand Up @@ -205,6 +210,7 @@ abi_impls! {
System { unwind: true } =><= "system-unwind",
SysV64 { unwind: false } =><= "sysv64",
SysV64 { unwind: true } =><= "sysv64-unwind",
RustTail =><= "tail",
Thiscall { unwind: false } =><= "thiscall",
Thiscall { unwind: true } =><= "thiscall-unwind",
Unadjusted =><= "unadjusted",
Expand Down Expand Up @@ -280,7 +286,7 @@ impl ExternAbi {
/// - are subject to change between compiler versions
pub fn is_rustic_abi(self) -> bool {
use ExternAbi::*;
matches!(self, Rust | RustCall | RustCold | RustPreserveNone)
matches!(self, Rust | RustCall | RustCold | RustPreserveNone | RustTail)
}

/// Returns whether the ABI supports C variadics. This only controls whether we allow *imports*
Expand Down Expand Up @@ -354,6 +360,7 @@ impl ExternAbi {
| Self::SysV64 { .. }
| Self::Win64 { .. }
| Self::RustPreserveNone
| Self::RustTail
| Self::Swift => true,
}
}
Expand Down
7 changes: 4 additions & 3 deletions compiler/rustc_ast_lowering/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ use rustc_session::errors::feature_err;
use rustc_span::{Span, sym};
use rustc_target::asm;

use super::LoweringContext;
use super::errors::{
use crate::diagnostics::{
AbiSpecifiedMultipleTimes, AttSyntaxOnlyX86, ClobberAbiNotSupported,
InlineAsmUnsupportedTarget, InvalidAbiClobberAbi, InvalidAsmTemplateModifierConst,
InvalidAsmTemplateModifierLabel, InvalidAsmTemplateModifierRegClass,
InvalidAsmTemplateModifierRegClassSub, InvalidAsmTemplateModifierSym, InvalidRegister,
InvalidRegisterClass, RegisterClassOnlyClobber, RegisterClassOnlyClobberStable,
RegisterConflict,
};
use crate::{AllowReturnTypeNotation, ImplTraitContext, ImplTraitPosition, ParamMode};
use crate::{
AllowReturnTypeNotation, ImplTraitContext, ImplTraitPosition, LoweringContext, ParamMode,
};

impl<'hir> LoweringContext<'_, 'hir> {
pub(crate) fn lower_inline_asm(
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/delegation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ use rustc_span::symbol::kw;
use rustc_span::{ErrorGuaranteed, Ident, Span, Symbol};

use crate::delegation::generics::{GenericsGenerationResult, GenericsGenerationResults};
use crate::errors::{
use crate::diagnostics::{
CycleInDelegationSignatureResolution, DelegationAttemptedBlockWithDefsDeletion,
DelegationBlockSpecifiedWhenNoParams, UnresolvedDelegationCallee,
};
Expand Down
16 changes: 8 additions & 8 deletions compiler/rustc_ast_lowering/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ use visit::{Visitor, walk_expr};

mod closure;

use super::errors::{
use crate::diagnostics::{
AsyncCoroutinesNotSupported, AwaitOnlyInAsyncFnAndBlocks,
FunctionalRecordUpdateDestructuringAssignment, InclusiveRangeWithNoEnd, MatchArmWithNoBody,
MoveExprOnlyInPlainClosures, NeverPatternWithBody, NeverPatternWithGuard,
UnderscoreExprLhsAssign,
FunctionalRecordUpdateDestructuringAssignment, InclusiveRangeWithNoEnd,
InvalidLegacyConstGenericArg, MatchArmWithNoBody, MoveExprOnlyInPlainClosures,
NeverPatternWithBody, NeverPatternWithGuard, UnderscoreExprLhsAssign, UseConstGenericArg,
YieldInClosure,
};
use super::{
GenericArgsMode, ImplTraitContext, LoweringContext, ParamMode, ResolverAstLoweringExt,
use crate::{
AllowReturnTypeNotation, GenericArgsMode, ImplTraitContext, ImplTraitPosition, LoweringContext,
ParamMode, ResolverAstLoweringExt, TryBlockScope,
};
use crate::errors::{InvalidLegacyConstGenericArg, UseConstGenericArg, YieldInClosure};
use crate::{AllowReturnTypeNotation, ImplTraitPosition, TryBlockScope};

pub(super) struct WillCreateDefIdsVisitor;

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/expr/closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use rustc_span::Span;

use super::{LoweringContext, MoveExprInitializerFinder, MoveExprState};
use crate::FnDeclKind;
use crate::errors::{ClosureCannotBeStatic, CoroutineTooManyParameters};
use crate::diagnostics::{ClosureCannotBeStatic, CoroutineTooManyParameters};

impl<'hir> LoweringContext<'_, 'hir> {
// Entry point for `ExprKind::Closure`. Plain closures go through
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_ast_lowering/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ use smallvec::{SmallVec, smallvec};
use thin_vec::ThinVec;
use tracing::instrument;

use super::errors::{InvalidAbi, InvalidAbiSuggestion, TupleStructWithDefault, UnionWithDefault};
use super::diagnostics::{
InvalidAbi, InvalidAbiSuggestion, TupleStructWithDefault, UnionWithDefault,
};
use super::stability::{enabled_names, gate_unstable_abi};
use super::{
AstOwner, FnDeclKind, GenericArgsMode, ImplTraitContext, ImplTraitPosition, LoweringContext,
Expand Down
25 changes: 15 additions & 10 deletions compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ use smallvec::SmallVec;
use thin_vec::ThinVec;
use tracing::{debug, instrument, trace};

use crate::errors::{AssocTyParentheses, AssocTyParenthesesSub, MisplacedImplTrait};
use crate::diagnostics::{AssocTyParentheses, AssocTyParenthesesSub, MisplacedImplTrait};
use crate::item::Owners;

macro_rules! arena_vec {
Expand All @@ -83,7 +83,7 @@ mod asm;
mod block;
mod contract;
mod delegation;
mod errors;
mod diagnostics;
mod expr;
mod format;
mod index;
Expand Down Expand Up @@ -1145,17 +1145,21 @@ impl<'hir> LoweringContext<'_, 'hir> {
{
let err = match (&data.inputs[..], &data.output) {
([_, ..], FnRetTy::Default(_)) => {
errors::BadReturnTypeNotation::Inputs { span: data.inputs_span }
diagnostics::BadReturnTypeNotation::Inputs {
span: data.inputs_span,
}
}
([], FnRetTy::Default(_)) => {
errors::BadReturnTypeNotation::NeedsDots { span: data.inputs_span }
diagnostics::BadReturnTypeNotation::NeedsDots {
span: data.inputs_span,
}
}
// The case `T: Trait<method(..) -> Ret>` is handled in the parser.
(_, FnRetTy::Ty(ty)) => {
let span = data.inputs_span.shrink_to_hi().to(ty.span);
errors::BadReturnTypeNotation::Output {
diagnostics::BadReturnTypeNotation::Output {
span,
suggestion: errors::RTNSuggestion {
suggestion: diagnostics::RTNSuggestion {
output: span,
input: data.inputs_span,
},
Expand Down Expand Up @@ -1226,7 +1230,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
_ => None,
};

let guar = self.dcx().emit_err(errors::MisplacedAssocTyBinding {
let guar = self.dcx().emit_err(diagnostics::MisplacedAssocTyBinding {
span: constraint.span,
suggestion,
});
Expand Down Expand Up @@ -1529,7 +1533,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
ast::GenericBound::Use(_, span) => Some(span),
_ => None,
}) {
self.tcx.dcx().emit_err(errors::NoPreciseCapturesOnApit { span });
self.tcx.dcx().emit_err(diagnostics::NoPreciseCapturesOnApit { span });
}

let def_id = self.local_def_id(*def_node_id);
Expand Down Expand Up @@ -2123,7 +2127,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
.filter(|_| match source {
hir::GenericParamSource::Generics => true,
hir::GenericParamSource::Binder => {
self.dcx().emit_err(errors::GenericParamDefaultInBinder {
self.dcx().emit_err(diagnostics::GenericParamDefaultInBinder {
span: param.span(),
});

Expand Down Expand Up @@ -2154,7 +2158,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
.filter(|anon_const| match source {
hir::GenericParamSource::Generics => true,
hir::GenericParamSource::Binder => {
let err = errors::GenericParamDefaultInBinder { span: param.span() };
let err =
diagnostics::GenericParamDefaultInBinder { span: param.span() };
if expr::WillCreateDefIdsVisitor
.visit_expr(&anon_const.value)
.is_break()
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast_lowering/src/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use rustc_hir::{self as hir, LangItem, Target};
use rustc_middle::span_bug;
use rustc_span::{DesugaringKind, Ident, Span, Spanned, respan};

use super::errors::{
use crate::diagnostics::{
ArbitraryExpressionInPattern, ExtraDoubleDot, MisplacedDoubleDot, SubTupleBinding,
};
use super::{
use crate::{
AllowReturnTypeNotation, ImplTraitContext, ImplTraitPosition, LoweringContext, ParamMode,
};

Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast_lowering/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ use rustc_span::{BytePos, DUMMY_SP, DesugaringKind, Ident, Span, Symbol, sym};
use smallvec::smallvec;
use tracing::{debug, instrument};

use super::errors::{
use crate::diagnostics::{
AsyncBoundNotOnTrait, AsyncBoundOnlyForFnTraits, BadReturnTypeNotation,
GenericTypeWithParentheses, RTNSuggestion, UseAngleBrackets,
};
use super::{
use crate::{
AllowReturnTypeNotation, GenericArgsCtor, GenericArgsMode, ImplTraitContext, ImplTraitPosition,
LifetimeRes, LoweringContext, ParamMode,
};
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_ast_lowering/src/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ pub fn extern_abi_stability(abi: ExternAbi) -> Result<(), UnstableAbi> {
feature: sym::rust_preserve_none_cc,
explain: GateReason::Experimental,
}),
ExternAbi::RustTail => {
Err(UnstableAbi { abi, feature: sym::rust_tail_cc, explain: GateReason::Experimental })
}
ExternAbi::RustInvalid => {
Err(UnstableAbi { abi, feature: sym::rustc_attrs, explain: GateReason::ImplDetail })
}
Expand Down
Loading
Loading