Closed
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