Commit Graph

25 Commits

Author SHA1 Message Date
Esteban Küber b849e10d38 Make span_suggestions always verbose
`span_suggestions` is to provide mutually exclusive suggestions. When it was introduced, we made its behavior be that if a single suggestion is given to it, we present the suggestion inline, otherwise in patch format. Changing this to make all of its uses be verbose, as that is closer in intent of output.
2026-04-15 01:38:14 +00: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
Jonathan Brouwer 07bf6ae810 Use the new parser throughout the compiler
Co-authored-by: Jana Dönszelmann <jana@donsz.nl>
2026-02-24 09:34:59 +01:00
Esteban Küber c73b3d20c6 Unify wording of resolve error
Remove "failed to resolve" and use the same format we use in other resolution errors "cannot find `name`".

```
error[E0433]: cannot find `nonexistent` in `existent`
  --> $DIR/custom_attr_multisegment_error.rs:5:13
   |
LL | #[existent::nonexistent]
   |             ^^^^^^^^^^^ could not find `nonexistent` in `existent`
```
2026-02-17 16:51:44 +00:00
mejrs 959d6de1a9 refactor AttributeGate and rustc_attr! to emit notes during feature checking 2025-06-09 11:44:24 +02:00
Camille GILLOT 280a1d8edb Do not visit whole crate to compute lints_that_dont_need_to_run. 2025-04-04 12:37:38 +00:00
Vadim Petrochenkov 8d5109aa6e compiletest: Support matching on diagnostics without a span 2025-03-25 17:33:09 +03:00
jyn 10bc5acf0d Document #![register_tool] 2025-03-17 01:16:47 -04:00
Esteban Küber dd52bfc76e Reword "crate not found" resolve message
```
error[E0432]: unresolved import `some_novel_crate`
 --> file.rs:1:5
  |
1 | use some_novel_crate::Type;
  |     ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate`
```

On resolve errors where there might be a missing crate, mention `cargo add foo`:

```
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope`
  --> $DIR/conflicting-impl-with-err.rs:4:11
   |
LL | impl From<nope::Thing> for Error {
   |           ^^^^ use of unresolved module or unlinked crate `nope`
   |
   = help: if you wanted to use a crate named `nope`, use `cargo add nope` to add it to your `Cargo.toml`
```
2025-01-24 01:19:50 +00:00
Michael Goulet b893221517 Always run tail_expr_drop_order lint on promoted MIR 2024-12-23 20:25:41 +00:00
Michael Goulet 12ae282987 Fix diagnostic and add a test for it 2024-07-10 18:56:06 -04:00
Michael Goulet ffd72b1700 Fix remaining cases 2024-06-21 19:00:18 -04:00
Jubilee Young d89500843c Move 100 entries from tests/ui into subdirs
- Move super-fast-paren-parsing test into ui/parser
- Move stmt_expr_attrs test into ui/feature-gates
- Move macro tests into ui/macros
- Move global_asm tests into ui/asm
- Move env tests into ui/process
- Move xcrate tests into ui/cross-crate
- Move unop tests into ui/unop
- Move backtrace tests into ui/backtrace
- Move check-static tests into ui/statics
- Move expr tests into ui/expr
- Move optimization fuel tests into ui/fuel
- Move ffi attribute tests into ui/ffi-attrs
- Move suggestion tests into ui/suggestions
- Move main tests into ui/fn-main
- Move lint tests into ui/lint
- Move repr tests into ui/repr
- Move intrinsics tests into ui/intrinsics
- Move tool lint tests into ui/tool-attributes
- Move return tests into ui/return
- Move pattern tests into ui/patttern
- Move range tests into ui/range
- Move foreign-fn tests into ui/foreign
- Move orphan-check tests into ui/coherence
- Move inference tests into ui/inference
- Reduce ROOT_ENTRY_LIMIT
2024-05-20 19:55:59 -07:00
许杰友 Jieyou Xu (Joe) ec2cc761bc [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
George-lewis d56cdd48cb Bless tests
Update tests
2024-01-13 12:46:58 -05:00
Nilstrieb 41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
Alex Macleod 5453a9f34d Add a note to duplicate diagnostics 2023-10-05 01:04:41 +00:00
Tom Martin 18388c9f73 Rewrite added diagnostics as translatable
Start messages with lowercase
2023-04-07 08:33:56 +01:00
Tom Martin 86230dcde6 Bless 2023-04-01 03:52:58 +01:00
Tom Martin 10c36445ff Update non-derive macro error message to match suggestion
It's now split between two errors, one to remove the invalid derive macro
and one suggesting adding a new non-derive macro
2023-03-30 21:43:32 +01:00
Tom Martin 42f2be8a8c Add suggestion to remove derive() if invoked macro is non-derive 2023-03-26 16:01:25 +01:00
Camille GILLOT 752ddd028c Merge the two diagnostics. 2023-02-26 10:29:25 +00:00
clubby789 4332a27c2d Fix ICE in 'duplicate diagnostic item' diagnostic 2023-02-23 14:58:48 +00:00
Albert Larsan cf2dff2b1e Move /src/test to /tests 2023-01-11 09:32:08 +00:00