We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Testcase:
#![feature(slice_patterns)] fn main() { let x: &[i32] = &[]; let &[[_a, ref _b..]..] = x; }
Gives:
error: internal compiler error: ../src/librustc_mir/build/matches/mod.rs:155: match pairs [MatchPair { lvalue: (*var0), pattern: Pattern { ty: [i32], span: <anon>:2:39: 2:57, kind: Slice { prefix: [], slice: Some(Pattern { ty: [i32], span: <anon>:2:40: 2:54, kind: Slice { prefix: [Pattern { ty: i32, span: <anon>:2:41: 2:43, kind: Binding { mutability: Not, name: _a(61), mode: ByValue, var: 20, ty: i32, subpattern: None } }], slice: Some(Pattern { ty: [i32], span: <anon>:2:45: 2:51, kind: Binding { mutability: Not, name: _b(62), mode: ByRef(ReScope(CodeExtent(14/Remainder(BlockRemainder { block: 6, first_statement_index: 1 }))), Shared), var: 21, ty: &[i32], subpattern: None } }), suffix: [] } }), suffix: [] } }, slice_len_checked: false }] remaining after simplifying irrefutable pattern --> <anon>:2:39 | 2 | fn main() { let x: &[i32] = &[]; let &[[_a, ref _b..]..] = x; } | ^^^^^^^^^^^^^^^^^^ note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports thread 'rustc' panicked at 'Box<Any>', ../src/librustc_errors/lib.rs:580 note: Run with `RUST_BACKTRACE=1` for a backtrace.
CC @arielb1
The text was updated successfully, but these errors were encountered:
Actually, taking another look, closing this in favor of the original bug; it looks like the original issue still exists. The ICE is just a symptom.
Sorry, something went wrong.
No branches or pull requests
Testcase:
Gives:
CC @arielb1
The text was updated successfully, but these errors were encountered: