1
1
error: `#[derive(SessionDiagnostic)]` can only be used on structs
2
- --> $DIR/session-derive-errors.rs:28 :1
2
+ --> $DIR/session-derive-errors.rs:34 :1
3
3
|
4
4
LL | / #[error = "E0123"]
5
5
LL | |
@@ -10,51 +10,51 @@ LL | | }
10
10
| |_^
11
11
12
12
error: `#[label = ...]` is not a valid SessionDiagnostic struct attribute
13
- --> $DIR/session-derive-errors.rs:37 :1
13
+ --> $DIR/session-derive-errors.rs:43 :1
14
14
|
15
15
LL | #[label = "This is in the wrong place"]
16
16
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17
17
18
18
error: `#[suggestion = ...]` is not a valid SessionDiagnostic field attribute
19
- --> $DIR/session-derive-errors.rs:44 :5
19
+ --> $DIR/session-derive-errors.rs:50 :5
20
20
|
21
21
LL | #[suggestion = "this is the wrong kind of attribute"]
22
22
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23
23
24
24
error: `error` specified multiple times
25
- --> $DIR/session-derive-errors.rs:52 :11
25
+ --> $DIR/session-derive-errors.rs:58 :11
26
26
|
27
27
LL | #[error = "E0456"]
28
28
| ^^^^^^^
29
29
30
30
error: `lint` specified when `error` was already specified
31
- --> $DIR/session-derive-errors.rs:58 :10
31
+ --> $DIR/session-derive-errors.rs:64 :10
32
32
|
33
33
LL | #[lint = "some_useful_lint"]
34
34
| ^^^^^^^^^^^^^^^^^^
35
35
36
36
error: `code` not specified
37
- --> $DIR/session-derive-errors.rs:67 :1
37
+ --> $DIR/session-derive-errors.rs:73 :1
38
38
|
39
39
LL | struct ErrorCodeNotProvided {}
40
40
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41
41
|
42
42
= help: use the [code = "..."] attribute to set this diagnostic's error code
43
43
44
44
error: the `#[message = "..."]` attribute can only be applied to fields of type Span
45
- --> $DIR/session-derive-errors.rs:95 :5
45
+ --> $DIR/session-derive-errors.rs:101 :5
46
46
|
47
47
LL | #[message = "this message is applied to a String field"]
48
48
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49
49
50
50
error: `name` doesn't refer to a field on this type
51
- --> $DIR/session-derive-errors.rs:102 :1
51
+ --> $DIR/session-derive-errors.rs:108 :1
52
52
|
53
53
LL | #[message = "This error has a field, and references {name}"]
54
54
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55
55
56
56
error: invalid format string: expected `'}'` but string was terminated
57
- --> $DIR/session-derive-errors.rs:110 :1
57
+ --> $DIR/session-derive-errors.rs:116 :1
58
58
|
59
59
LL | #[error = "E0123"]
60
60
| - because of this opening brace
@@ -65,7 +65,7 @@ LL | #[message = "This is missing a closing brace: {name"]
65
65
= note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
66
66
67
67
error: invalid format string: unmatched `}` found
68
- --> $DIR/session-derive-errors.rs:119 :1
68
+ --> $DIR/session-derive-errors.rs:125 :1
69
69
|
70
70
LL | #[message = "This is missing an opening brace: name}"]
71
71
| ^ unmatched `}` in format string
@@ -74,33 +74,33 @@ LL | #[message = "This is missing an opening brace: name}"]
74
74
= note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
75
75
76
76
error: The `#[label = ...]` attribute can only be applied to fields of type Span
77
- --> $DIR/session-derive-errors.rs:138 :5
77
+ --> $DIR/session-derive-errors.rs:144 :5
78
78
|
79
79
LL | #[label = "See here"]
80
80
| ^^^^^^^^^^^^^^^^^^^^^
81
81
82
82
error: `nonsense` is not a valid key for `#[suggestion(...)]`
83
- --> $DIR/session-derive-errors.rs:163 :18
83
+ --> $DIR/session-derive-errors.rs:169 :18
84
84
|
85
85
LL | #[suggestion(nonsense = "This is nonsense")]
86
86
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87
87
88
88
error: `msg` is not a valid key for `#[suggestion(...)]`
89
- --> $DIR/session-derive-errors.rs:171 :18
89
+ --> $DIR/session-derive-errors.rs:177 :18
90
90
|
91
91
LL | #[suggestion(msg = "This is a suggestion")]
92
92
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
93
93
94
94
error: missing suggestion message
95
- --> $DIR/session-derive-errors.rs:179 :7
95
+ --> $DIR/session-derive-errors.rs:185 :7
96
96
|
97
97
LL | #[suggestion(code = "This is suggested code")]
98
98
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
99
99
|
100
100
= help: provide a suggestion message using #[suggestion(message = "...")]
101
101
102
102
error: wrong field type for suggestion
103
- --> $DIR/session-derive-errors.rs:194 :5
103
+ --> $DIR/session-derive-errors.rs:200 :5
104
104
|
105
105
LL | / #[suggestion(message = "This is a message", code = "This is suggested code")]
106
106
LL | |
@@ -110,23 +110,23 @@ LL | | suggestion: Applicability,
110
110
= help: #[suggestion(...)] should be applied to fields of type Span or (Span, Applicability)
111
111
112
112
error: type of field annotated with `#[suggestion(...)]` contains more than one Span
113
- --> $DIR/session-derive-errors.rs:209 :5
113
+ --> $DIR/session-derive-errors.rs:215 :5
114
114
|
115
115
LL | / #[suggestion(message = "This is a message", code = "This is suggested code")]
116
116
LL | |
117
117
LL | | suggestion: (Span, Span, Applicability),
118
118
| |___________________________________________^
119
119
120
120
error: type of field annotated with `#[suggestion(...)]` contains more than one Applicability
121
- --> $DIR/session-derive-errors.rs:217 :5
121
+ --> $DIR/session-derive-errors.rs:223 :5
122
122
|
123
123
LL | / #[suggestion(message = "This is a message", code = "This is suggested code")]
124
124
LL | |
125
125
LL | | suggestion: (Applicability, Applicability, Span),
126
126
| |____________________________________________________^
127
127
128
128
error: invalid annotation list `#[label(...)]`
129
- --> $DIR/session-derive-errors.rs:225 :7
129
+ --> $DIR/session-derive-errors.rs:231 :7
130
130
|
131
131
LL | #[label("wrong kind of annotation for label")]
132
132
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments