Skip to content

Commit a2e305d

Browse files
address review: add explanation for tests
1 parent a36dc08 commit a2e305d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

tests/ui/regions/closure-prop-issue-104477-case1.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
//@ check-pass
2-
2+
// This checks that the compiler does not require that 'a: 'b. '_ has 'a and 'b as non-local
3+
// upper bounds, but the compiler should not propagate 'a: 'b OR 'b: 'a when checking
4+
// the closures. If it did, this would fail to compile, eventhough it's a valid program.
5+
// PR #148329 explains this in detail.
36

47
struct MyTy<'x, 'a, 'b>(std::cell::Cell<(&'x &'a u8, &'x &'b u8)>);
58
fn wf<T>(_: T) {}

tests/ui/regions/closure-prop-issue-148289.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
//@ check-pass
2+
// This test checks that the compiler does not propagate 'd: 'c when propagating region errors
3+
// for the closure argument. If it did, this would fail to compile, eventhough it's a valid program.
4+
// It should only propagate 'd: 'c.
5+
// PR #148329 explains this in detail.
26

37
#[derive(Clone, Copy)]
48
struct Inv<'a>(*mut &'a ());

0 commit comments

Comments
 (0)