11error: `#[derive(SessionDiagnostic)]` can only be used on structs
2- --> $DIR/session-derive-errors.rs:28 :1
2+ --> $DIR/session-derive-errors.rs:34 :1
33 |
44LL | / #[error = "E0123"]
55LL | |
@@ -10,51 +10,51 @@ LL | | }
1010 | |_^
1111
1212error: `#[label = ...]` is not a valid SessionDiagnostic struct attribute
13- --> $DIR/session-derive-errors.rs:37 :1
13+ --> $DIR/session-derive-errors.rs:43 :1
1414 |
1515LL | #[label = "This is in the wrong place"]
1616 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1717
1818error: `#[suggestion = ...]` is not a valid SessionDiagnostic field attribute
19- --> $DIR/session-derive-errors.rs:44 :5
19+ --> $DIR/session-derive-errors.rs:50 :5
2020 |
2121LL | #[suggestion = "this is the wrong kind of attribute"]
2222 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2323
2424error: `error` specified multiple times
25- --> $DIR/session-derive-errors.rs:52 :11
25+ --> $DIR/session-derive-errors.rs:58 :11
2626 |
2727LL | #[error = "E0456"]
2828 | ^^^^^^^
2929
3030error: `lint` specified when `error` was already specified
31- --> $DIR/session-derive-errors.rs:58 :10
31+ --> $DIR/session-derive-errors.rs:64 :10
3232 |
3333LL | #[lint = "some_useful_lint"]
3434 | ^^^^^^^^^^^^^^^^^^
3535
3636error: `code` not specified
37- --> $DIR/session-derive-errors.rs:67 :1
37+ --> $DIR/session-derive-errors.rs:73 :1
3838 |
3939LL | struct ErrorCodeNotProvided {}
4040 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4141 |
4242 = help: use the [code = "..."] attribute to set this diagnostic's error code
4343
4444error: 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
4646 |
4747LL | #[message = "this message is applied to a String field"]
4848 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4949
5050error: `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
5252 |
5353LL | #[message = "This error has a field, and references {name}"]
5454 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5555
5656error: invalid format string: expected `'}'` but string was terminated
57- --> $DIR/session-derive-errors.rs:110 :1
57+ --> $DIR/session-derive-errors.rs:116 :1
5858 |
5959LL | #[error = "E0123"]
6060 | - because of this opening brace
@@ -65,7 +65,7 @@ LL | #[message = "This is missing a closing brace: {name"]
6565 = note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
6666
6767error: invalid format string: unmatched `}` found
68- --> $DIR/session-derive-errors.rs:119 :1
68+ --> $DIR/session-derive-errors.rs:125 :1
6969 |
7070LL | #[message = "This is missing an opening brace: name}"]
7171 | ^ unmatched `}` in format string
@@ -74,33 +74,33 @@ LL | #[message = "This is missing an opening brace: name}"]
7474 = note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
7575
7676error: 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
7878 |
7979LL | #[label = "See here"]
8080 | ^^^^^^^^^^^^^^^^^^^^^
8181
8282error: `nonsense` is not a valid key for `#[suggestion(...)]`
83- --> $DIR/session-derive-errors.rs:163 :18
83+ --> $DIR/session-derive-errors.rs:169 :18
8484 |
8585LL | #[suggestion(nonsense = "This is nonsense")]
8686 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8787
8888error: `msg` is not a valid key for `#[suggestion(...)]`
89- --> $DIR/session-derive-errors.rs:171 :18
89+ --> $DIR/session-derive-errors.rs:177 :18
9090 |
9191LL | #[suggestion(msg = "This is a suggestion")]
9292 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9393
9494error: missing suggestion message
95- --> $DIR/session-derive-errors.rs:179 :7
95+ --> $DIR/session-derive-errors.rs:185 :7
9696 |
9797LL | #[suggestion(code = "This is suggested code")]
9898 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9999 |
100100 = help: provide a suggestion message using #[suggestion(message = "...")]
101101
102102error: wrong field type for suggestion
103- --> $DIR/session-derive-errors.rs:194 :5
103+ --> $DIR/session-derive-errors.rs:200 :5
104104 |
105105LL | / #[suggestion(message = "This is a message", code = "This is suggested code")]
106106LL | |
@@ -110,23 +110,23 @@ LL | | suggestion: Applicability,
110110 = help: #[suggestion(...)] should be applied to fields of type Span or (Span, Applicability)
111111
112112error: 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
114114 |
115115LL | / #[suggestion(message = "This is a message", code = "This is suggested code")]
116116LL | |
117117LL | | suggestion: (Span, Span, Applicability),
118118 | |___________________________________________^
119119
120120error: 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
122122 |
123123LL | / #[suggestion(message = "This is a message", code = "This is suggested code")]
124124LL | |
125125LL | | suggestion: (Applicability, Applicability, Span),
126126 | |____________________________________________________^
127127
128128error: invalid annotation list `#[label(...)]`
129- --> $DIR/session-derive-errors.rs:225 :7
129+ --> $DIR/session-derive-errors.rs:231 :7
130130 |
131131LL | #[label("wrong kind of annotation for label")]
132132 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments