summaryrefslogtreecommitdiffstats
path: root/src/test/incremental/issue-101518.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/incremental/issue-101518.rs')
-rw-r--r--src/test/incremental/issue-101518.rs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/incremental/issue-101518.rs b/src/test/incremental/issue-101518.rs
new file mode 100644
index 000000000..501be175f
--- /dev/null
+++ b/src/test/incremental/issue-101518.rs
@@ -0,0 +1,31 @@
+// revisions: cfail1
+// should-ice
+// error-pattern: forcing query
+// known-bug: #101518
+
+#[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 => {}
+ _ => {}
+ }
+}
+
+fn main() {}