This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 1e450c7
committed
Remove redundancy in resolve error between main message and primary label
```
error[E0576]: cannot find method or associated constant `BAR`
--> $DIR/issue-87638.rs:20:27
|
LL | let _ = <S as Trait>::BAR;
| ^^^ not found in trait `Trait`
```
instead of
```
error[E0576]: cannot find method or associated constant `BAR` in trait `Trait`
--> $DIR/issue-87638.rs:20:27
|
LL | let _ = <S as Trait>::BAR;
| ^^^ not found in `Trait`
```
The general rule is that the primary span label should work well on its own
(suitable to be shown in editors), while the main message provides
additional context of the general case. When using `--error-format=short`,
we concatenate the main message and the primary labels, so they should be
complementary.1 parent 33422e7 commit 1e450c7
File tree
736 files changed
+1572
-1572
lines changed- compiler/rustc_resolve/src/late
- src/tools/clippy/tests/ui
- crashes
- tests
- rustdoc-ui
- doctest
- issues
- ui-fulldeps/session-diagnostic
- ui
- annotate-snippet
- argument-suggestions
- array-slice-vec
- asm
- associated-consts
- associated-item
- associated-type-bounds
- associated-types
- async-await
- async-closures
- async-fn
- drop-order
- in-trait
- attributes
- unsafe
- c-variadic
- cast
- cfg
- closures
- codemap_tests
- coercion
- coherence
- compiletest-self-test
- conditional-compilation
- const-generics
- early
- generic_const_exprs
- const_prop
- consts
- const-eval
- coroutine
- delegation
- derived-errors
- derives
- diagnostic_namespace
- did_you_mean
- dropck
- editions
- enum
- error-codes
- errors
- expr
- if
- malformed_closure
- extern
- feature-gates
- fmt
- for
- functions-closures
- generic-associated-types
- generics
- hygiene
- impl-trait
- in-trait
- issues
- precise-capturing
- implied-bounds
- imports
- issues
- keyword
- label
- lang-items
- layout
- let-else
- lifetimes
- lint
- internal
- loops
- lowering
- macros
- macro-metavar-expr-concat
- rfc-3086-metavar-expr
- match
- methods
- mir
- validate
- missing
- missing-items
- modules_and_files_visibility
- namespace
- object-safety
- offset-of
- panics
- parser
- attribute
- issues
- raw
- recover
- pattern
- usefulness
- privacy
- proc-macro
- query-system
- recursion
- regions
- reserved
- resolve
- rfcs
- rfc-2294-if-let-guard
- rfc-2632-const-trait-impl
- rmeta
- rust-2018
- rustdoc
- self
- elision
- sized
- span
- specialization
- min_specialization
- stability-attribute
- structs
- suggestions
- tool-attributes
- track-diagnostics
- trait-bounds
- traits
- associated_type_bound
- next-solver
- non_lifetime_binders
- transmutability
- malformed-program-gracefulness
- tuple/tuple-struct-fields
- type-alias-impl-trait
- type-alias
- typeck
- type
- ufcs
- unboxed-closures
- union
- unresolved
- wf
- where-clauses
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
736 files changed
+1572
-1572
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
| 350 | + | |
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
| 354 | + | |
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
805 | 805 | | |
806 | 806 | | |
807 | 807 | | |
808 | | - | |
| 808 | + | |
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
599 | | - | |
| 599 | + | |
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
603 | | - | |
| 603 | + | |
604 | 604 | | |
605 | | - | |
| 605 | + | |
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
| |||
0 commit comments