We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Spawned off of #20055 (and PR #21692 )
I thought I fixed this and wrote a test for it in PR #21692, but I was wrong -- the test for Box<Trait> was erroneous/incomplete at best.
Box<Trait>
Test case:
trait Boo { } impl Boo for [i8; 1] { } impl Boo for [i8; 2] { } impl Boo for [i8; 3] { } impl Boo for [i8; 4] { } pub fn foo(box_1: fn () -> Box<[i8; 1]>, box_2: fn () -> Box<[i8; 2]>, box_3: fn () -> Box<[i8; 3]>, box_4: fn () -> Box<[i8; 4]>, ) { let _b: Box<Boo> = match 3 { 1 => box_1(), 2 => box_2(), 3 => box_3(), _ => box_4(), }; } pub fn main() { fn box_1() -> Box<[i8; 1]> { Box::new( [1i8; 1] ) } fn box_2() -> Box<[i8; 2]> { Box::new( [1i8; 2] ) } fn box_3() -> Box<[i8; 3]> { Box::new( [1i8; 3] ) } fn box_4() -> Box<[i8; 4]> { Box::new( [1i8; 4] ) } println!("Hello World 1"); foo(box_1, box_2, box_3, box_4); println!("Hello World 2"); }
In the playpen, this currently prints:
Hello World 1 playpen: application terminated abnormally with signal 4 (Illegal instruction)
The text was updated successfully, but these errors were encountered:
(to be clear: the bug here is not that the code above should be rejected. The code above is legal Rust, and should be accepted and run without error.)
Sorry, something went wrong.
cc @nick29581
In unsize_unique_expr, do not need to convert scratch value to lvalue.
37bc34b
(pnkfelix thinks, at least...) Fix rust-lang#21695.
d855202
No branches or pull requests
Spawned off of #20055 (and PR #21692 )
I thought I fixed this and wrote a test for it in PR #21692, but I was wrong -- the test for
Box<Trait>
was erroneous/incomplete at best.Test case:
In the playpen, this currently prints:
The text was updated successfully, but these errors were encountered: