Skip to content

Commit d6e884d

Browse files
committed
Add regression test
1 parent ae04282 commit d6e884d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/incremental/rpitit-feeding.rs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// revisions: cpass cpass2
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+
#![feature(return_position_impl_trait_in_trait)]
10+
#![allow(incomplete_features)]
11+
12+
trait Foo {
13+
fn foo() -> impl Sized;
14+
}
15+
16+
impl Foo for String {
17+
fn foo() -> i32 {
18+
22
19+
}
20+
}
21+
22+
fn main() {}

0 commit comments

Comments
 (0)