Skip to content

Commit 75cf482

Browse files
committed
region-ebr-does-not-outlive-static: reuse old test instead
1 parent b8e9eaf commit 75cf482

File tree

3 files changed

+13
-43
lines changed

3 files changed

+13
-43
lines changed

src/test/compile-fail/regions-static-bound.rs

+13-3
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,27 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// revisions: ll nll
12+
//[nll] compile-flags: -Znll -Zborrowck=mir
13+
1114
fn static_id<'a,'b>(t: &'a ()) -> &'static ()
1215
where 'a: 'static { t }
1316
fn static_id_indirect<'a,'b>(t: &'a ()) -> &'static ()
1417
where 'a: 'b, 'b: 'static { t }
1518
fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a {
16-
t //~ ERROR E0312
19+
t //[ll]~ ERROR E0312
20+
//[nll]~^ WARNING not reporting region error due to -Znll
21+
//[nll]~| ERROR free region `'a` does not outlive free region `'static`
1722
}
1823

1924
fn error(u: &(), v: &()) {
20-
static_id(&u); //~ ERROR cannot infer an appropriate lifetime
21-
static_id_indirect(&v); //~ ERROR cannot infer an appropriate lifetime
25+
static_id(&u); //[ll]~ ERROR cannot infer an appropriate lifetime
26+
//[nll]~^ WARNING not reporting region error due to -Znll
27+
static_id_indirect(&v); //[ll]~ ERROR cannot infer an appropriate lifetime
28+
//[nll]~^ WARNING not reporting region error due to -Znll
29+
30+
// FIXME(#45827) -- MIR type checker shortcomings mean we don't
31+
// see these errors (yet) in nll mode.
2232
}
2333

2434
fn main() {}

src/test/ui/nll/closure-requirements/region-ebr-does-not-outlive-static.rs

-26
This file was deleted.

src/test/ui/nll/closure-requirements/region-ebr-does-not-outlive-static.stderr

-14
This file was deleted.

0 commit comments

Comments
 (0)