-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
representable check fails if an enum references another enum that is cyclic #3008
Comments
Just to make this concrete: both of the cases that Niko describes yield ICE's. The first (the |
I don't believe this is backwards incompatible, renominating. |
accepted for production-ready milestone |
appears to be properly classified |
Accepting for P-high. |
Tagging as mentorship bug, with @nikomatsakis as mentor |
This code triggers the same infinite recursion in type_structurally_contains: enum E { A, B(Bad) }
struct Bad { x: Bad } |
I have a fix for this written, in case anyone is wondering whether to start working on it. I'll submit a pull request soon. |
bump ui test crate The recommended way to run tests locally is `./miri bless -- -- --quiet`, which will show * progress bars * the currently running tests (allowing you to see which ones are still running towards the end of the test suite) * the output of the currently running tests (if they are slow). This means slow running tests can output lines to `stderr` and the last line will be shown after the test name and updated every few hundred milliseconds. As a side effect this PR also fixes rust-lang#2998 and only builds dependencies if any tests actually need them (this means that with the next ui_test update we'll be able to merge all our test suites). Also fixes rust-lang/miri#3052.
Resolves model-checking/kani#3007. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses. --------- Signed-off-by: Felipe R. Monteiro <[email protected]>
Here is a test case:
I think the right approach is to replace
ty_structurally_contains()
with something likewalk_interior_tys()
. then we have to keeep a stack of def-ids and when we enter a new nominal type check that we do not already have it on the stack. i started this then realized it was a big distraction from what I'm trying to do, so filing a bug instead. Marking as A-typesystem as this check is performed inmiddle/typeck/check.rs
The text was updated successfully, but these errors were encountered: