forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for incremental ICE: slice-pattern-const.rs rust-lang#83085
Fixes rust-lang#83085
- Loading branch information
1 parent
b9be3c4
commit 8088ea0
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
//@ compile-flags: -Zincremental-verify-ich=yes | ||
// issue: rust-lang/rust#83085 incremental ICE: forcing query with already existing `DepNode` | ||
// this used to fail to build straight away without needing any kind of | ||
// stage1/2 builds but tidy demands it | ||
//@ revisions:rpass1 rpass2 | ||
|
||
fn main() { | ||
const BOO: &[u8; 0] = &[]; | ||
match &[] { | ||
BOO => (), | ||
b"" => (), | ||
_ => (), | ||
} | ||
} | ||
|
||
#[derive(PartialEq, Eq)] | ||
struct Id<'a> { | ||
ns: &'a str, | ||
} | ||
fn visit_struct() { | ||
let id = Id { ns: "random1" }; | ||
const FLAG: Id<'static> = Id { | ||
ns: "needs_to_be_the_same", | ||
}; | ||
match id { | ||
FLAG => {} | ||
_ => {} | ||
} | ||
} | ||
fn visit_struct2() { | ||
let id = Id { ns: "random2" }; | ||
const FLAG: Id<'static> = Id { | ||
ns: "needs_to_be_the_same", | ||
}; | ||
match id { | ||
FLAG => {} | ||
_ => {} | ||
} | ||
} |