Skip to content

Commit b180800

Browse files
committed
bless tests
1 parent f613ad9 commit b180800

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

tests/ui/methods.stderr

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1+
error: methods called `new` usually return `Self`
2+
--> $DIR/methods.rs:96:5
3+
|
4+
LL | / async fn new() -> Option<Self> {
5+
LL | | None
6+
LL | | }
7+
| |_____^
8+
|
9+
= note: `-D clippy::new-ret-no-self` implied by `-D warnings`
10+
111
error: methods called `new` usually return `Self`
212
--> $DIR/methods.rs:104:5
313
|
414
LL | / fn new() -> i32 {
515
LL | | 0
616
LL | | }
717
| |_____^
8-
|
9-
= note: `-D clippy::new-ret-no-self` implied by `-D warnings`
1018

1119
error: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead
1220
--> $DIR/methods.rs:125:13
@@ -20,5 +28,5 @@ LL | | ).next();
2028
|
2129
= note: `-D clippy::filter-next` implied by `-D warnings`
2230

23-
error: aborting due to 2 previous errors
31+
error: aborting due to 3 previous errors
2432

tests/ui/new_ret_no_self.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,14 +413,14 @@ mod issue10041 {
413413
}
414414
}
415415

416-
mod issue10041_TAIT {
416+
mod issue10041_tait {
417417
type X = impl std::ops::Add<Output = X>;
418418

419419
struct Foo;
420420

421421
impl Foo {
422422
fn new() -> X {
423-
return 1;
423+
1
424424
}
425425
}
426426
}

tests/ui/new_ret_no_self.stderr

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,13 @@ LL | | unimplemented!()
9292
LL | | }
9393
| |_________^
9494

95+
error: methods called `new` usually return `Self`
96+
--> $DIR/new_ret_no_self.rs:422:9
97+
|
98+
LL | / fn new() -> X {
99+
LL | | 1
100+
LL | | }
101+
| |_________^
102+
103+
error: aborting due to 13 previous errors
104+

0 commit comments

Comments
 (0)