Uh oh!
There was an error while loading. Please reload this page.
Don't hide ICEs from previous incremental compiles - #65470
Conversation
rust-highfive
commented
Oct 16, 2019
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @matthewjasper (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
r? @michaelwoerister cc @eddyb |
jackh726
commented
Oct 16, 2019
You should add the mcve in the comment (#63154 (comment)) as a test (as in #65395). |
traxys
commented
Oct 16, 2019
If I understood the issue correctly, the test should be that when |
jackh726
commented
Oct 16, 2019
Here's an example of a test specifically for incremental compilation: #60697 |
The problem is now on how can I make the compiler ICE reliablely ? |
jackh726
commented
Oct 16, 2019
Oh, I misread the issue being solved! I'm not exactly sure the correct test for this. |
pnkfelix
commented
Oct 17, 2019
@jackh726 I can help and will do so tonight or tomorrow |
traxys
commented
Oct 18, 2019
Apart from needing the test, is the fix correct ? |
michaelwoerister
commented
Oct 21, 2019
The fix looks correct to me. Thanks, @traxys! |
michaelwoerister
commented
Oct 21, 2019
Here is some documentation on using "revisions" for test cases: https://rust-lang.github.io/rustc-guide/tests/adding.html#revisions |
pnkfelix
commented
Oct 25, 2019
In addition to @michaelwoerister 's point about using "revisions" for test cases, we also need to check about whether there is a good way to cause the compiler to ICE in a reliable fashion (i.e., something that we could put in a test suite and rely on going forward).
|
traxys
commented
Oct 25, 2019
I tried the |
pnkfelix
commented
Oct 29, 2019
@traxys okay. I think the way to go here would be to extend the E.g. something where If you want to have a go at implementing this yourself, the main places to look are here: rust/src/librustc_codegen_utils/lib.rs Lines 30 to 40 in d3d28a4 (which implements the actual handling of the attribute) and here: which implements the initial check that Based on my reading of the definition of rust/src/libsyntax/feature_gate/builtin_attrs.rs Lines 113 to 116 in d3d28a4 it seems like you should be able to get this going initially by just replacing |
traxys
commented
Oct 29, 2019
Should I do this in this PR or in another PR ? |
pnkfelix
commented
Oct 29, 2019
I'd say go ahead and do it in this PR, but as a separate commit. (If this |
@pnkfelix I added something that seems to be correct, the only problem is that it does not trigger the issue with the rustc affected by the issue, and I don't know why, I need to look in more details |
rust-highfive
commented
Oct 31, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
traxys
commented
Nov 1, 2019
michaelwoerister
commented
Nov 1, 2019
bors
commented
Nov 1, 2019
📌 Commit 5930551 has been approved by |
fnmain(){break rust;}ICEs "reliably", as long as this joke isn't removed (though it doesn't use |
bors
commented
Nov 1, 2019
⌛ Testing commit 5930551 with merge 1d506eca253e003f26ecb3a6ca5e3f0c8314d488... |
Don't hide ICEs from previous incremental compiles I think this fixesrust-lang#65401, the compiler does not fail to ICE after the first compilation, tested on the last snippet of [this comment](rust-lang#63154 (comment)). I am not very sure of the fix as I don't understand much of the structure of the compiler.
tmandry
commented
Nov 1, 2019
@bors retry rolled up |
Rollup of 16 pull requests Successful merges: - #65112 (Add lint and tests for unnecessary parens around types) - #65470 (Don't hide ICEs from previous incremental compiles) - #65471 (Add long error explanation for E0578) - #65857 (rustdoc: Resolve module-level doc references more locally) - #65902 (Make ItemContext available for better diagnositcs) - #65914 (Use structured suggestion for unnecessary bounds in type aliases) - #65946 (Make `promote_consts` emit the errors when required promotion fails) - #65960 (doc: reword iter module example and mention other methods) - #65963 (update submodules to rust-lang) - #65972 (Fix libunwind build: Define __LITTLE_ENDIAN__ for LE targets) - #65977 (Fix incorrect diagnostics for expected type in E0271 with an associated type) - #65995 (Add error code E0743 for "C-variadic has been used on a non-foreign function") - #65997 (Fix outdated rustdoc of Once::init_locking function) - #66002 (Stabilize float_to_from_bytes feature) - #66005 (vxWorks: remove code related unix socket) - #66018 (Revert PR 64324: dylibs export generics again (for now)) Failed merges: r? @ghost
I think this fixes#65401, the compiler does not fail to ICE after the first compilation, tested on the last snippet of this comment.
I am not very sure of the fix as I don't understand much of the structure of the compiler.