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