Conversation
|
This PR modifies |
This comment has been minimized.
This comment has been minimized.
fd49d2a to
298dec7
Compare
| error[E0433]: cannot find `bar` in `Foo` | ||
| --> $DIR/extern-macro.rs:5:13 | ||
| | | ||
| LL | let _ = Foo::bar!(); |
There was a problem hiding this comment.
This is a diagnostic that needs improvement regardless: we need to explain that Foo is a type and that macros can't be in them. It would be particularly bad if Foo had an associated item bar as well.
There was a problem hiding this comment.
Changed the output to be
error[E0433]: cannot find macro `bar` in enum `Foo`
--> $DIR/extern-macro.rs:5:13
|
LL | let _ = Foo::bar!();
| ^^^^^^^^ a macro can't exist within an enum
Not perfect, but I feel it's more informative than we used to be.
| | | ||
|
|
||
| error[E0433]: failed to resolve: function `bar` is not a crate or module | ||
| error[E0433]: cannot find `bar` in this scope |
There was a problem hiding this comment.
Ah, I found I'd opened a separate PR already with some of these changes, and you had a comment about this change in particular
I agree that this isn't an improvement, but the primary label does still mention the intended issue. I'll see over the weekend what I can do about this.
This comment has been minimized.
This comment has been minimized.
Remove "failed to resolve" and use the same format we use in other resolution errors "cannot find `name`". ``` error[E0433]: cannot find `nonexistent` in `existent` --> $DIR/custom_attr_multisegment_error.rs:5:13 | LL | #[existent::nonexistent] | ^^^^^^^^^^^ could not find `nonexistent` in `existent` ```
298dec7 to
0b0bd12
Compare
0b0bd12 to
f6ce33d
Compare
| error[E0433]: cannot find derive macro `Anything` in trait `Foo` | ||
| --> $DIR/issue-46101.rs:2:10 | ||
| | | ||
| LL | #[derive(Foo::Anything)] | ||
| | ^^^^^^^^^^^^^ partially resolved path in a derive macro | ||
| | ^^^^^^^^^^^^^ a derive macro can't exist within a trait |
There was a problem hiding this comment.
Let me know if there's a wording you'd prefer for the label. I want to communicate the impossibility of the macro being in ADTs and traits in the first place.
This comment has been minimized.
This comment has been minimized.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
☔ The latest upstream changes (presumably #147074) made this pull request unmergeable. Please resolve the merge conflicts. |
Remove "failed to resolve" from the main error message and use the same format we use in other resolution errors "cannot find
name":The intent behind this is to end up with all resolve errors eventually be on the form of
A category of errors that is interest are those that involve keywords. For example:
and
For these the label provides the actual help, while the message is less informative beyond telling you "couldn't find
name".This is an off-shoot of #126810 and #128086, a subset of the intended changes there with review comments applied.
r? @petrochenkov