572 Commits

Author SHA1 Message Date
mejrs d6bccac835 Fix error code example 2026-04-15 13:50:43 +02:00
Jonathan Brouwer 65745a1b95 Revert #152369 because of multiple regressions
The regressions are documented in the PR comments.
This reverts commit 2972b5e, reversing changes made to f908263.
2026-04-09 18:53:59 +02:00
Edvin Bryntesson bd864efa70 bless tests and tidy
also removes E0452 and splits
`tests/rustdoc-ui/lints/renamed-lint-still-applies` into 2 tests

this is because of delayed warn lint being lost on compiler aborting on
error
2026-04-03 11:08:11 +02:00
Jynn Nelson f1f0b4504a downgrade duplicate features from hard-error -> deny-by-default 2026-03-10 11:56:29 +01:00
León Orell Valerian Liehr 6bb6b11d9d Rename #[rustc_variance] to #[rustc_dump_variances] 2026-03-02 19:31:15 +01:00
mejrs 5f9a365964 Dele e0231 2026-02-24 10:50:39 +01:00
mejrs f944436c29 port over diagnostic::on_unimplemented 2026-02-24 10:50:38 +01:00
Jonathan Brouwer 2a58411a87 Port #[feature] to the new attribute parsing infrastructure
Co-authored-by: jdonszelmann <janabent@gmail.com>
2026-02-22 19:28:00 +01:00
mu001999 58e5475683 Rewrite build_reduced_graph_for_use_tree 2026-02-20 10:58:58 +08:00
Stuart Cook 910d4f4c09 Rollup merge of #152206 - tshepang:misc, r=davidtwco
misc doc improvements

These are things I collected as I was looking at code and docs
2026-02-17 13:02:23 +11:00
Ralf Jung 5e65109f21 add write_box_via_move intrinsic and use it for vec!
This allows us to get rid of box_new entirely
2026-02-16 17:27:40 +01:00
Jonathan Brouwer c61c2603cf Port #[lang] to the new attribute parsers 2026-02-13 16:04:19 +00:00
Tshepang Mbambo 638d23ce42 E0570: improve text 2026-02-07 04:25:02 +02:00
ritik chahar daaff44cbc Fix tidy formatting manually for E0423.md 2026-01-31 10:46:58 +05:30
ritik chahar 9cdcd0c3fa Document enum types used as values for E0423 2026-01-31 10:15:19 +05:30
Edvin Bryntesson acd6ba4edb Port #[instruction_set] to attribute parser 2025-12-31 03:01:05 +01:00
Matthias Krüger 185f7dc044 Rollup merge of #149949 - JonathanBrouwer:error_cleanup, r=jdonszelmann
Cleanup of attribute parsing errors

Removes the specific `UnknownMetaItem` and `IllFormedAttributeInputLint` errors.
Note that `IllFormedAttributeInputLint` is not a lint, contrary to its name

r? ``````@jdonszelmann``````
2025-12-14 20:04:56 +01:00
bors 3f4dc1e02d Auto merge of #146348 - jdonszelmann:eiiv3, r=lcnr,oli-obk
Externally implementable items

Supersedes https://github.com/rust-lang/rust/pull/140010
Tracking issue: https://github.com/rust-lang/rust/issues/125418

Getting started:

```rust
#![feature(eii)]

#[eii(eii1)]
pub fn decl1(x: u64)
// body optional (it's the default)
{
    println!("default {x}");
}

// in another crate, maybe
#[eii1]
pub fn decl2(x: u64) {
    println!("explicit {x}");
}

fn main() {
    decl1(4);
}
```

- tiny perf regression, underlying issue makes multiple things in the compiler slow, not just EII, planning to solve those separately.
- No codegen_gcc support, they don't have bindings for weak symbols yet but could
- No windows support yet for weak definitions

This PR merges the implementation of EII for just llvm + not windows, doesn't yet contain like a new panic handler implementation or alloc handler. With this implementation, it would support implementing the panic handler in terms of EII already since it requires no default implementation so no weak symbols

The PR has been open in various forms for about a year now, but I feel that having some implementation merged to build upon
2025-12-14 04:20:26 +00:00
Jonathan Brouwer 1da1a39c9a Remove UnknownMetaItem error 2025-12-13 13:44:57 +01:00
Jacob Pratt 6b29f18654 Rollup merge of #149903 - JonathanBrouwer:cfg_old_cleanup, r=jdonszelmann
Remove unused code in `cfg_old`

r? ```@jdonszelmann```

Fixes one of the todos from https://github.com/rust-lang/rust/issues/149865
2025-12-13 00:55:58 -05:00
Jonathan Brouwer 0ab4b8b9e0 Remove the E0536 error code 2025-12-12 14:38:12 +01:00
Jana Dönszelmann 52e0bfccb0 rename feature gate to extern_item_impls 2025-12-12 11:32:35 +01:00
Jana Dönszelmann a4abfad99b EII new error code 2025-12-12 11:32:26 +01:00
Matthias Krüger bf399241fe Rollup merge of #146584 - cyrgani:error-codes-macro, r=GuillaumeGomez
remove duplicated columns from `rustc_error_code::error_codes!`

Possible because of rust-lang/rust#146308 ~~, but currently still blocked on the next stage0 bump~~.
2025-12-11 22:09:52 +01:00
Matthias Krüger 02434fe718 Rollup merge of #148678 - xonx4l:EO412_replacement_with_EO425, r=Kivooeo
Merge E0412 into E0425

This PR merge E0412 into E0425  as both mean the same thing to users.

This fixes https://github.com/rust-lang/rust/issues/148558.
2025-12-02 22:02:30 +01:00
xonx4l 4b000cfacd Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
reddevilmidzy d4af0f0772 Fix indent in E0591.md 2025-11-30 21:24:33 +09:00
lcnr feb13036ef remove support for type-of 2025-11-25 10:19:44 +01:00
bjorn3 973c7527b4 Unify the configuration of the compiler docs
Previously it was rather inconsistent which crates got the rust logo and
which didn't and setting html_root_url was forgotten in many cases.
2025-11-05 11:25:27 +00:00
Jonathan Brouwer b78800fd5d Port cfg!() macro to the new attribute parsing system
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-11-03 18:23:41 +01:00
Matthias Krüger 7320d3ed61 Rollup merge of #146585 - hkBst:indexing-1, r=jdonszelmann
indexing: reword help

After looking at https://github.com/rust-lang/rust/issues/40850, I thought I'd try to improve wording around error E0608 a bit. Hopefully I've succeeded.
2025-10-02 10:27:49 +02:00
Marijn Schouten 86f2d424c8 indexing: reword help
Co-authored-by: beef <ent3rm4n@gmail.com>
2025-10-01 07:39:03 +00:00
cyrgani 321cd2aa25 remove duplicated columns from rustc_error_code::error_codes! 2025-09-27 12:29:54 +02:00
Jules Bertholet 60dd0df6e7 Address review comments 2025-09-24 13:52:33 -04:00
Jules Bertholet 389907a17e Enforce E0719 only for trait aliases 2025-09-18 09:16:58 -04:00
Jonathan Brouwer 7db1840569 Changes to the uitests
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-27 20:25:18 +02:00
Stuart Cook b955aa722e Rollup merge of #144944 - He1pa:E0793, r=compiler-errors
E0793: Clarify that it applies to unions as well

pick up inactive PR: https://github.com/rust-lang/rust/pull/131472

Also:
Adjust the language slightly to be more consistent with other similar messages (was created instead of got created).
Add a short section on union.
Add an example line showing referencing a field in a packed struct is safe if the field's type isn't more strictly aligned than the pack.

r? compiler-errors
2025-08-15 16:16:32 +10:00
Jonathan Brouwer 5245c39972 Remove the old target checking logic 2025-08-14 18:18:42 +02:00
Vadim Petrochenkov 772493d51d resolve: Split extern prelude into two scopes
One for `--extern` options and another for `extern crate` items.
2025-08-13 17:45:40 +03:00
黑怕 57901fe092 E0793: Clarify that it applies to unions as well 2025-08-12 11:38:33 +08:00
Noratrieb 870b58f4d0 Update E0562 to account for the new impl trait positions 2025-08-02 11:29:04 +02:00
Jonathan Brouwer 3303534dc8 Update uitest stderrs
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-23 13:33:23 +02:00
León Orell Valerian Liehr cdc3d701cb Don't reject *multiple* relaxed bounds, reject *duplicate* ones.
Having multiple relaxed bounds like `?Sized + ?Iterator` is actually *fine*.
We actually want to reject *duplicate* relaxed bounds like `?Sized + ?Sized`
because these most certainly represent a user error.

Note that this doesn't mean that we accept more code because a bound like
`?Iterator` is still invalid as it's not relaxing a *default* trait and
the only way to define / use more default bounds is under the experimental
and internal feature `more_maybe_bounds` plus `lang_items` plus unstable
flag `-Zexperimental-default-bounds` (historical context: for the longest
time, bounds like `?Iterator` were actually allowed and lead to a hard
warning).

Ultimately, this simply *reframes* the diagnostic. The scope of
`more_maybe_bounds` / `-Zexperimental-default-bounds` remains unchanged
as well.
2025-07-18 12:24:56 +02:00
Jonathan Brouwer 7a7c74ad89 New example for E0536 2025-07-15 09:21:27 +02:00
Jubilee Young 383d76106b compiler: Trim the misleading C of C-cmse from errors 2025-06-25 00:52:10 -07:00
Jana Dönszelmann b64fd13a04 convert the optimize attribute to a new parser 2025-06-18 13:48:42 +02:00
Jana Dönszelmann 5ab5f8a24a make error codes reflect reality better 2025-06-17 23:22:51 +02:00
Ralf Jung 8808c9d34b intrinsics: use const generic to set atomic ordering 2025-06-07 21:45:58 +02:00
maflcko 79fbc38867 doc: Fix inverted meaning in E0783.md 2025-06-05 12:27:08 +02:00
beetrees 467eeabbb5 Stabilise repr128 2025-05-28 15:14:34 +01:00