mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-31 17:12:53 +00:00
Fixup clippy tests
Don't depend on the fact that `!` falls back to `()` and so panic-ish things can be used in `-> impl ImplementedForUnit` functions
This commit is contained in:
parent
35f54fd439
commit
c3d463333f
@ -390,9 +390,7 @@ mod issue7344 {
|
||||
|
||||
impl<T> RetImplTraitSelf2<T> {
|
||||
// should not trigger lint
|
||||
fn new(t: T) -> impl Trait2<(), Self> {
|
||||
unimplemented!()
|
||||
}
|
||||
fn new(t: T) -> impl Trait2<(), Self> {}
|
||||
}
|
||||
|
||||
struct RetImplTraitNoSelf2<T>(T);
|
||||
@ -401,7 +399,6 @@ mod issue7344 {
|
||||
// should trigger lint
|
||||
fn new(t: T) -> impl Trait2<(), i32> {
|
||||
//~^ ERROR: methods called `new` usually return `Self`
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,11 +96,10 @@ LL | | }
|
||||
| |_________^
|
||||
|
||||
error: methods called `new` usually return `Self`
|
||||
--> tests/ui/new_ret_no_self.rs:402:9
|
||||
--> tests/ui/new_ret_no_self.rs:400:9
|
||||
|
|
||||
LL | / fn new(t: T) -> impl Trait2<(), i32> {
|
||||
LL | |
|
||||
LL | | unimplemented!()
|
||||
LL | | }
|
||||
| |_________^
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user