Remove Parser::missing_fragment_specifier.#95747
Remove Parser::missing_fragment_specifier.#95747nnethercote wants to merge 1 commit intorust-lang:masterfrom
Parser::missing_fragment_specifier.#95747Conversation
|
@petrochenkov: this is my attempt to implement what you suggested, but there are problems. Consider the program I mentioned previously: Currently, the first macro results in a hard error, the second in a lint error (which is ignorable). With this change, both macros result in a lint error (which is ignorable). If they are ignored, I get an ICE somewhere in codegen, getting a Layout: I suspect this is related to the fact that an invalid macro will get an empty I'm not sure if this is possible. The current mix of hard errors and lint errors seems hard to adjust. Or am I overlooking something? |
1936871 to
aa7d45d
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
Thinking this through some more...
In the past, attempts were made to change the lint errors to hard errors, but this broke too much existing code. This PR is about changing the hard errors to lint errors. But then, if we ignore what were previously hard errors, we can't continue compilation sensibly. So I can't see how to make this work. |
|
I missed the fact that they are reported as hard errors on actual match.
This is the less valuable part of this logic given that the compiler deduplicates identical error messages anyway, and given that it requires a piece of global mutable state. |
|
Closing in favor of #95808. |
expand: Remove `ParseSess::missing_fragment_specifiers` It was used for deduplicating some errors for legacy code which are mostly deduplicated even without that, but at cost of global mutable state, which is not a good tradeoff. cc rust-lang#95747 (comment) r? `@nnethercote`
expand: Remove `ParseSess::missing_fragment_specifiers` It was used for deduplicating some errors for legacy code which are mostly deduplicated even without that, but at cost of global mutable state, which is not a good tradeoff. cc rust-lang#95747 (comment) r? ``@nnethercote``
r? @ghost