Commit 762a037
committed
Auto merge of #39444 - keeperofdakeys:derive-error, r=jseyfried
[beta] Give a better error message for unknown derive messages
This PR improves the error message for unknown derive macros.
Currently unknown derives give the following error, which is very misleading:
```
`#[derive]` for custom traits is not stable enough for use. It is deprecated and will be removed in v1.15 (see issue #29644)
```
I'm currently working on a PR that will change this (#39442) to the following:
```
cannot find derive macro `Foo` in this scope
```
This PR backports the (as yet unmerged) error message to beta/1.16 (it's a pity that this is probably too late for 1.15).
r? @jseyfriedFile tree
4 files changed
+17
-66
lines changed- src
- libsyntax_ext/deriving
- test
- compile-fail
- pretty
4 files changed
+17
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
161 | 162 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
| |||
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
178 | | - | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | 225 | | |
227 | 226 | | |
228 | 227 | | |
| |||
248 | 247 | | |
249 | 248 | | |
250 | 249 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
255 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
256 | 258 | | |
257 | 259 | | |
258 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
This file was deleted.
0 commit comments