Uh oh!
There was an error while loading. Please reload this page.
Give a better error message for duplicate built-in macros - #76143
Conversation
rust-highfive
commented
Aug 31, 2020
Some changes occurred in diagnostic error codes |
c7dad7a to
245ad9fCompareUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
In practice the current span and the previous span are going to point to the same place though, if we are talking about issues like #75176.
There was a problem hiding this comment.
For #75176, it would have been the same, yes. However that in itself would have been helpful debugging the issue: it shows that the same crate is being loaded twice. And for problems that are less obscure this will be very helpful since it points straight to the other location that conflicts.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
petrochenkov
commented
Sep 1, 2020
r=me with #76143 (comment) addressed and commits squashed. |
Previously, this would say no such macro existed, but this was misleading, since the macro _did_ exist, it was just already seen. - Say where the macro was previously defined - Add long-form error message
65f25c2 to
be2947dComparejyn514
commented
Sep 1, 2020
@bors r=petrochenkov |
bors
commented
Sep 1, 2020
📌 Commit be2947d has been approved by |
Rollup of 14 pull requests Successful merges: - rust-lang#74880 (Add trailing comma support to matches macro) - rust-lang#76074 (Add new `-Z dump-mir-spanview` option) - rust-lang#76088 (Add more examples to lexicographic cmp on Iterators.) - rust-lang#76099 (Add info about `!` and `impl Trait`) - rust-lang#76126 (Use "Fira Sans" for crate list font) - rust-lang#76132 (Factor out StmtKind::MacCall fields into `MacCallStmt` struct) - rust-lang#76143 (Give a better error message for duplicate built-in macros) - rust-lang#76158 (Stabilise link-self-contained option) - rust-lang#76201 (Move to intra-doc links for library/core/src/panic.rs) - rust-lang#76206 (Make all methods of `std::net::Ipv6Addr` const) - rust-lang#76207 (# Move to intra-doc links for library/core/src/clone.rs) - rust-lang#76212 (Document lint missing_doc_code_examples is nightly-only) - rust-lang#76218 (lexer: Tiny improvement to shebang detection) - rust-lang#76221 (Clean up header in `iter` docs for `for` loops) Failed merges: r? @ghost
Minor follow-up to #75176 giving a better error message for duplicate builtin macros. This would have made it a little easier to debug.
r? @petrochenkov