-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Tidying up UI tests [7/N] #149473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tidying up UI tests [7/N] #149473
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| //@ dont-require-annotations: NOTE | ||
| //! regression test for <https://github.com/rust-lang/rust/issues/17740> | ||
| struct Foo<'a, 'b> { | ||
| x: &'a isize, | ||
| y: &'b isize, | ||
| } | ||
|
|
||
| impl<'a, 'b> Foo<'a, 'b> { | ||
| fn bar( | ||
| self: Foo<'b, 'a>, | ||
| //~^ ERROR mismatched `self` parameter type | ||
| //~| NOTE expected struct `Foo<'a, 'b>` | ||
| //~| NOTE found struct `Foo<'b, 'a>` | ||
| //~| NOTE lifetime mismatch | ||
| //~| ERROR mismatched `self` parameter type | ||
| //~| NOTE expected struct `Foo<'a, 'b>` | ||
| //~| NOTE found struct `Foo<'b, 'a>` | ||
| //~| NOTE lifetime mismatch | ||
| ) { | ||
| } | ||
| } | ||
|
|
||
| struct Bar<'a> { | ||
| data: &'a [u8], | ||
| } | ||
|
|
||
| impl<'a> Bar<'a> { | ||
| fn bar(self: &mut Bar) { | ||
| //~^ ERROR mismatched `self` parameter type | ||
| //~| NOTE expected struct `Bar<'a>` | ||
| //~| NOTE found struct `Bar<'_>` | ||
| //~| NOTE lifetime mismatch | ||
| //~| ERROR mismatched `self` parameter type | ||
| //~| NOTE expected struct `Bar<'a>` | ||
| //~| NOTE found struct `Bar<'_>` | ||
| //~| NOTE lifetime mismatch | ||
| } | ||
| } | ||
|
|
||
| fn main() {} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I merged
tests/ui/issues/issue-17740.rswithtests/ui/lifetimes/explicit-self-lifetime-mismatch.rsto organize them. Is that okay? If you think it's unnecessary, I'll revert it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, no need to revert, moving tests out of
tests/ui/issuesis always welcome, this directory is a total mess and must be removed as a long term plan (there is 500+ tests remains or something, haven't visited this one for a while)