diff options
Diffstat (limited to 'src/test/ui/async-await/issues/issue-72312.rs')
| -rw-r--r-- | src/test/ui/async-await/issues/issue-72312.rs | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/test/ui/async-await/issues/issue-72312.rs b/src/test/ui/async-await/issues/issue-72312.rs index c1eceefd643..74122cf00a9 100644 --- a/src/test/ui/async-await/issues/issue-72312.rs +++ b/src/test/ui/async-await/issues/issue-72312.rs @@ -1,10 +1,5 @@ -// ignore-compare-mode-nll -// revisions: base nll -// [nll]compile-flags: -Zborrowck=mir - // edition:2018 fn require_static<T: 'static>(val: T) -> T { - //[base]~^ NOTE 'static` lifetime requirement introduced by this bound val } @@ -12,17 +7,13 @@ struct Problem; impl Problem { pub async fn start(&self) { - //[base]~^ ERROR E0759 - //[base]~| NOTE this data with an anonymous lifetime `'_` - //[base]~| NOTE in this expansion of desugaring of `async` block or function - //[nll]~^^^^ NOTE let's call - //[nll]~| NOTE `self` is a reference + //~^ NOTE let's call + //~| NOTE `self` is a reference require_static(async move { - //[base]~^ NOTE ...and is required to live as long as `'static` here - //[nll]~^^ ERROR borrowed data escapes - //[nll]~| NOTE `self` escapes - //[nll]~| NOTE argument requires - &self; //[base]~ NOTE ...is used here... + //~^ ERROR borrowed data escapes + //~| NOTE `self` escapes + //~| NOTE argument requires + &self; }); } } |
