-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Since #45545 is merged, when an error happens in an external macro, rustc will suggest the user to supply the unstable flag -Z external-macro-backtrace
to see the detailed backtrace:
error[E0282]: type annotations needed
--> $DIR/cannot_infer_local_or_vec.rs:12:13
|
12 | let x = vec![];
| - ^^^^^^ cannot infer type for `T`
| |
| consider giving `x` a type
|
= note: this error originates in a macro outside of the current crate (run with -Z external-macro-backtrace for more info)
error: aborting due to previous error
The problem is that -Z
flags cannot be used in beta/stable, so the suggestion will be wrong. The question would be:
- Should we explicitly specify the flag is only available in nightly, e.g.
(in nightly, run with -Z external-macro-backtrace for more info)
- Or should we just hide the message in the stable channel?
- If we do so, how should we manage the affected UI test files?
See #45545 (comment) for detail.
cc @durka
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.