Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7e39015
Fix `@needs-backends` compiletest directive
eggyal Jan 21, 2026
01290cc
Fix `SourceFile::normalized_byte_pos`
eggyal Jan 21, 2026
6de0591
Split ol mapper into more specific to/kernel/from mapper and move ini…
ZuseZ4 Feb 8, 2026
7c5ea7f
Fix bound var resolution for trait aliases
rynewang Feb 7, 2026
118372e
Replace some `feature(core_intrinsics)` with stable hints
Zalathar Feb 8, 2026
953aa57
Fix suggestion on `AutoTraitItems` diagnostic
JonathanBrouwer Feb 8, 2026
ea87331
Remove `DiagMessage::FluentIdentifier`
JonathanBrouwer Feb 6, 2026
62dd371
Remove slugs from the `#[derive(Diagnostic)]` macro
JonathanBrouwer Feb 6, 2026
2289e6c
Adjust expected uitests results for the updated `derive(Diagnostic)` …
JonathanBrouwer Feb 8, 2026
0db0acd
Remove the fallback bundle
JonathanBrouwer Feb 6, 2026
81d4214
Remove fluent tests in `rustc_error`
JonathanBrouwer Feb 6, 2026
842bed6
Parse #[rustc_delayed_bug_from_inside_query]
Ozzy1423 Feb 4, 2026
7668496
Parse #[rustc_evaluate_where_clauses]
Ozzy1423 Feb 4, 2026
6361d5f
Parse #[rustc_outlives]
Ozzy1423 Feb 4, 2026
fb55b5d
diagnostics: fix ICE in closure signature mismatch
JonatanLindh Feb 8, 2026
053f76e
`cfg_select!`: allow optional comma after { /* ... */ }
folkertdev Feb 8, 2026
8aa0e90
Fix suggestion on `CallToDeprecatedSafeFnRequiresUnsafe` diagnostic
JonathanBrouwer Feb 8, 2026
d14c26f
Fix help on `AmbiguousMissingKwForItemSub` diagnostic
JonathanBrouwer Feb 8, 2026
329353e
Rollup merge of #151455 - eggyal:normalized-byte-pos, r=cjgillot
JonathanBrouwer Feb 8, 2026
7fbde8b
Rollup merge of #152250 - JonathanBrouwer:convert_finish, r=jdonszelmann
JonathanBrouwer Feb 8, 2026
b74d085
Rollup merge of #152322 - Zalathar:core-intrinsics, r=fmease
JonathanBrouwer Feb 8, 2026
0d9b0ab
Rollup merge of #152328 - JonathanBrouwer:fix_diags, r=JonathanBrouwer
JonathanBrouwer Feb 8, 2026
16c7ee5
Rollup merge of #151640 - ZuseZ4:cleanup-datatransfer, r=nnethercote
JonathanBrouwer Feb 8, 2026
769bf26
Rollup merge of #152212 - Ozzy1423:three-attrs, r=JonathanBrouwer
JonathanBrouwer Feb 8, 2026
6521fcf
Rollup merge of #152309 - rynewang:fix/ice-152158-rtn-trait-alias, r=…
JonathanBrouwer Feb 8, 2026
e01abd7
Rollup merge of #152339 - JonatanLindh:fix-issue-152331, r=Urgau
JonathanBrouwer Feb 8, 2026
78bd6ab
Rollup merge of #152341 - folkertdev:cfg-select-optional-comma, r=Jon…
JonathanBrouwer Feb 8, 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
2 changes: 1 addition & 1 deletion compiler/rustc_ast_passes/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ pub(crate) struct AutoTraitItems {
#[primary_span]
pub spans: Vec<Span>,
#[suggestion(
"remove the super traits or lifetime bounds",
"remove the associated items",
code = "",
applicability = "machine-applicable",
style = "tool-only"
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_mir_build/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub(crate) struct CallToDeprecatedSafeFnRequiresUnsafe {

#[derive(Subdiagnostic)]
#[multipart_suggestion(
"you can wrap the call in an `unsafe` block if you can guarantee that the environment access only happens in single-threaded code",
"you can wrap the call in an `unsafe` block if you can guarantee {$guarantee}",
applicability = "machine-applicable"
)]
pub(crate) struct CallToDeprecatedSafeFnRequiresUnsafeSub {
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_parse/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2266,7 +2266,9 @@ pub(crate) enum AmbiguousMissingKwForItemSub {
span: Span,
snippet: String,
},
#[help("you likely meant to define an item, e.g., `{$vis} fn foo() {\"{}\"}`")]
#[help(
"if you meant to call a macro, remove the `pub` and add a trailing `!` after the identifier"
)]
HelpMacro,
}

Expand Down
9 changes: 5 additions & 4 deletions tests/ui/auto-traits/assoc-ty.current.stderr
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
error[E0380]: auto traits cannot have associated items
--> $DIR/assoc-ty.rs:10:10
--> $DIR/assoc-ty.rs:11:10
|
LL | auto trait Trait {
| ----- auto traits cannot have associated items
LL |
...
LL | type Output;
| ^^^^^^

Expand All @@ -12,8 +12,9 @@ error[E0658]: auto traits are experimental and possibly buggy
|
LL | / auto trait Trait {
LL | |
LL | | type Output;
LL | |
LL | | type Output;
... |
LL | | }
| |_^
|
Expand All @@ -22,7 +23,7 @@ LL | | }
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0308]: mismatched types
--> $DIR/assoc-ty.rs:15:36
--> $DIR/assoc-ty.rs:17:36
|
LL | let _: <() as Trait>::Output = ();
| --------------------- ^^ expected associated type, found `()`
Expand Down
11 changes: 6 additions & 5 deletions tests/ui/auto-traits/assoc-ty.next.stderr
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
error[E0380]: auto traits cannot have associated items
--> $DIR/assoc-ty.rs:10:10
--> $DIR/assoc-ty.rs:11:10
|
LL | auto trait Trait {
| ----- auto traits cannot have associated items
LL |
...
LL | type Output;
| ^^^^^^

Expand All @@ -12,8 +12,9 @@ error[E0658]: auto traits are experimental and possibly buggy
|
LL | / auto trait Trait {
LL | |
LL | | type Output;
LL | |
LL | | type Output;
... |
LL | | }
| |_^
|
Expand All @@ -22,13 +23,13 @@ LL | | }
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0271]: type mismatch resolving `<() as Trait>::Output normalizes-to _`
--> $DIR/assoc-ty.rs:15:12
--> $DIR/assoc-ty.rs:17:12
|
LL | let _: <() as Trait>::Output = ();
| ^^^^^^^^^^^^^^^^^^^^^ types differ

error[E0271]: type mismatch resolving `<() as Trait>::Output normalizes-to _`
--> $DIR/assoc-ty.rs:15:12
--> $DIR/assoc-ty.rs:17:12
|
LL | let _: <() as Trait>::Output = ();
| ^^^^^^^^^^^^^^^^^^^^^ types differ
Expand Down
5 changes: 4 additions & 1 deletion tests/ui/auto-traits/assoc-ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@

auto trait Trait {
//~^ ERROR auto traits are experimental and possibly buggy
//~| HELP add `#![feature(auto_traits)]` to the crate attributes to enable
type Output;
//~^ ERROR auto traits cannot have associated items
//~| HELP remove the associated items
}

fn main() {
let _: <() as Trait>::Output = ();
//[current]~^ ERROR mismatched types
//[next]~^^ ERROR type mismatch resolving `<() as Trait>::Output normalizes-to _`
//[current]~| HELP consider constraining the associated type `<() as Trait>::Output` to `()` or calling a method that returns `<() as Trait>::Output`
//[next]~^^^ ERROR type mismatch resolving `<() as Trait>::Output normalizes-to _`
//[next]~| ERROR type mismatch resolving `<() as Trait>::Output normalizes-to _`
}
2 changes: 2 additions & 0 deletions tests/ui/macros/metavar-expressions/usage-errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ curly__rhs_dollar__no_round !(a);
macro_rules! no_curly__no_rhs_dollar__round {
( $( $i:ident ),* ) => { count(i) };
//~^ ERROR missing `fn` or `struct` for function or struct definition
//~| HELP if you meant to call a macro, try
}
no_curly__no_rhs_dollar__round !(a, b, c);

#[rustfmt::skip] // autoformatters can break a few of the error traces
macro_rules! no_curly__no_rhs_dollar__no_round {
( $i:ident ) => { count(i) };
//~^ ERROR missing `fn` or `struct` for function or struct definition
//~| HELP if you meant to call a macro, try
}
no_curly__no_rhs_dollar__no_round !(a);

Expand Down
8 changes: 4 additions & 4 deletions tests/ui/macros/metavar-expressions/usage-errors.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ LL | ( $( $i:ident ),* ) => { count!(i) };
| +

error: missing `fn` or `struct` for function or struct definition
--> $DIR/usage-errors.rs:35:23
--> $DIR/usage-errors.rs:36:23
|
LL | ( $i:ident ) => { count(i) };
| ^^^^^
Expand All @@ -41,13 +41,13 @@ LL | ( $i:ident ) => { count!(i) };
| +

error: variable `i` is still repeating at this depth
--> $DIR/usage-errors.rs:42:36
--> $DIR/usage-errors.rs:44:36
|
LL | ( $( $i:ident ),* ) => { count($i) };
| ^^

error[E0425]: cannot find value `a` in this scope
--> $DIR/usage-errors.rs:52:49
--> $DIR/usage-errors.rs:54:49
|
LL | ( $i:ident ) => { count($i) };
| -- due to this macro variable
Expand All @@ -56,7 +56,7 @@ LL | const _: u32 = no_curly__rhs_dollar__no_round! (a);
| ^ not found in this scope

error[E0425]: cannot find function `count` in this scope
--> $DIR/usage-errors.rs:49:23
--> $DIR/usage-errors.rs:51:23
|
LL | ( $i:ident ) => { count($i) };
| ^^^^^ not found in this scope
Expand Down
18 changes: 18 additions & 0 deletions tests/ui/rust-2024/unsafe-before_exec-suggestion.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//@ edition:2015
//@ only-unix
//@ run-rustfix

#![deny(deprecated_safe_2024)]

use std::process::Command;
use std::os::unix::process::CommandExt;

#[allow(deprecated)]
fn main() {
let mut cmd = Command::new("sleep");
// TODO: Audit that the closure is async-signal-safe.
unsafe { cmd.before_exec(|| Ok(())) };
//~^ ERROR call to deprecated safe function
//~| WARN this is accepted in the current edition
drop(cmd);
}
17 changes: 17 additions & 0 deletions tests/ui/rust-2024/unsafe-before_exec-suggestion.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//@ edition:2015
//@ only-unix
//@ run-rustfix

#![deny(deprecated_safe_2024)]

use std::process::Command;
use std::os::unix::process::CommandExt;

#[allow(deprecated)]
fn main() {
let mut cmd = Command::new("sleep");
cmd.before_exec(|| Ok(()));
//~^ ERROR call to deprecated safe function
//~| WARN this is accepted in the current edition
drop(cmd);
}
21 changes: 21 additions & 0 deletions tests/ui/rust-2024/unsafe-before_exec-suggestion.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
error: call to deprecated safe function `std::os::unix::process::CommandExt::before_exec` is unsafe and requires unsafe block
--> $DIR/unsafe-before_exec-suggestion.rs:13:5
|
LL | cmd.before_exec(|| Ok(()));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024!
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/newly-unsafe-functions.html>
note: the lint level is defined here
--> $DIR/unsafe-before_exec-suggestion.rs:5:9
|
LL | #![deny(deprecated_safe_2024)]
| ^^^^^^^^^^^^^^^^^^^^
help: you can wrap the call in an `unsafe` block if you can guarantee that the closure is async-signal-safe
|
LL + // TODO: Audit that the closure is async-signal-safe.
LL ~ unsafe { cmd.before_exec(|| Ok(())) };
|

error: aborting due to 1 previous error