Skip to content

Commit caa05bc

Browse files
committed
Add regression test
1 parent 9358f0e commit caa05bc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/incremental/rpitit-feeding.rs

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// revisions: cpass cpass2 cpass3
2+
3+
// This test checks that creating a new `DefId` from within a query `A`
4+
// recreates that `DefId` before reexecuting queries that depend on query `A`.
5+
// Otherwise we'd end up referring to a `DefId` that doesn't exist.
6+
// At present this is handled by always marking all queries as red if they create
7+
// a new `DefId` and thus subsequently rerunning the query.
8+
9+
trait Foo {
10+
fn foo() -> impl Sized;
11+
}
12+
13+
#[cfg(any(cpass, cpass3))]
14+
impl Foo for String {
15+
fn foo() -> i32 {
16+
22
17+
}
18+
}
19+
20+
#[cfg(cpass2)]
21+
impl Foo for String {
22+
fn foo() -> u32 {
23+
22
24+
}
25+
}
26+
27+
fn main() {}

0 commit comments

Comments
 (0)