-
Notifications
You must be signed in to change notification settings - Fork 13k
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
ICE: unsized_tuple_coercion with debuginfo=2 #93871
Comments
cc @michaelwoerister |
@matthiaskrgr reports in zulip that this test case fails at that same injection point when combined with ./src/test/run-pass-valgrind/dst-dtor-4.rs : Content of above file#![feature(unsized_tuple_coercion)]
static mut DROP_RAN: isize = 0;
struct Foo;
impl Drop for Foo {
fn drop(&mut self) {
unsafe { DROP_RAN += 1; }
}
}
pub fn main() {
{
let _x: Box<(i32, [Foo])> = Box::<(i32, [Foo; 3])>::new((42, [Foo, Foo, Foo]));
}
unsafe {
assert_eq!(DROP_RAN, 3);
}
} |
Files that reproduce the ice one way or another with
|
Thanks for the bug report, @matthiaskrgr! I'll look into it. |
Looks like this should be an easy fix. The code just doesn't expect tuples to be unsized (which of course it should). |
Code
code from
./src/tools/miri/tests/run-pass/unsized-tuple-impls.rs
Meta
rustc --version --verbose
:Error output
rustc ./src/tools/miri/tests/run-pass/unsized-tuple-impls.rs -Cdebuginfo=2
Backtrace
The text was updated successfully, but these errors were encountered: