-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #96148 - marmeladema:nll-revisions-self, r=jackh726
Use revisions instead of nll compare mode for `/self/` ui tests r? ``@jackh726``
- Loading branch information
Showing
36 changed files
with
360 additions
and
192 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
..._types_pin_lifetime_mismatch-async.stderr → ...s_pin_lifetime_mismatch-async.base.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 10 additions & 3 deletions
13
src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
// edition:2018 | ||
// revisions: base nll | ||
// ignore-compare-mode-nll | ||
//[nll] compile-flags: -Z borrowck=mir | ||
|
||
use std::pin::Pin; | ||
|
||
struct Foo; | ||
|
||
impl Foo { | ||
async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } | ||
//~^ ERROR lifetime mismatch | ||
//[base]~^ ERROR lifetime mismatch | ||
//[nll]~^^ lifetime may not live long enough | ||
|
||
async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } | ||
//~^ ERROR lifetime mismatch | ||
//[base]~^ ERROR lifetime mismatch | ||
//[nll]~^^ lifetime may not live long enough | ||
} | ||
|
||
type Alias<T> = Pin<T>; | ||
impl Foo { | ||
async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } //~ ERROR E0623 | ||
async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } | ||
//[base]~^ ERROR E0623 | ||
//[nll]~^^ lifetime may not live long enough | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 13 additions & 3 deletions
16
src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
// revisions: base nll | ||
// ignore-compare-mode-nll | ||
//[nll] compile-flags: -Z borrowck=mir | ||
|
||
use std::pin::Pin; | ||
|
||
struct Foo; | ||
|
||
impl Foo { | ||
fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } //~ ERROR E0623 | ||
fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } | ||
//[base]~^ ERROR E0623 | ||
//[nll]~^^ lifetime may not live long enough | ||
|
||
fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } //~ ERROR E0623 | ||
fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } | ||
//[base]~^ ERROR E0623 | ||
//[nll]~^^ lifetime may not live long enough | ||
} | ||
|
||
type Alias<T> = Pin<T>; | ||
impl Foo { | ||
fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } //~ ERROR E0623 | ||
fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } | ||
//[base]~^ ERROR E0623 | ||
//[nll]~^^ lifetime may not live long enough | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.