mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-01 00:49:30 +00:00
5777494f99
Only use it when the type alias contains an opaque type. Also does wf-checking on such type aliases.
96 lines
2.3 KiB
Text
96 lines
2.3 KiB
Text
error: methods called `new` usually return `Self`
|
|
--> $DIR/new_ret_no_self.rs:50:5
|
|
|
|
|
LL | / pub fn new(_: String) -> impl R<Item = u32> {
|
|
LL | | S3
|
|
LL | | }
|
|
| |_____^
|
|
|
|
|
= note: `-D clippy::new-ret-no-self` implied by `-D warnings`
|
|
|
|
error: methods called `new` usually return `Self`
|
|
--> $DIR/new_ret_no_self.rs:82:5
|
|
|
|
|
LL | / pub fn new() -> u32 {
|
|
LL | | unimplemented!();
|
|
LL | | }
|
|
| |_____^
|
|
|
|
error: methods called `new` usually return `Self`
|
|
--> $DIR/new_ret_no_self.rs:91:5
|
|
|
|
|
LL | / pub fn new(_: String) -> u32 {
|
|
LL | | unimplemented!();
|
|
LL | | }
|
|
| |_____^
|
|
|
|
error: methods called `new` usually return `Self`
|
|
--> $DIR/new_ret_no_self.rs:127:5
|
|
|
|
|
LL | / pub fn new() -> (u32, u32) {
|
|
LL | | unimplemented!();
|
|
LL | | }
|
|
| |_____^
|
|
|
|
error: methods called `new` usually return `Self`
|
|
--> $DIR/new_ret_no_self.rs:154:5
|
|
|
|
|
LL | / pub fn new() -> *mut V {
|
|
LL | | unimplemented!();
|
|
LL | | }
|
|
| |_____^
|
|
|
|
error: methods called `new` usually return `Self`
|
|
--> $DIR/new_ret_no_self.rs:172:5
|
|
|
|
|
LL | / pub fn new() -> Option<u32> {
|
|
LL | | unimplemented!();
|
|
LL | | }
|
|
| |_____^
|
|
|
|
error: methods called `new` usually return `Self`
|
|
--> $DIR/new_ret_no_self.rs:225:9
|
|
|
|
|
LL | fn new() -> String;
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: methods called `new` usually return `Self`
|
|
--> $DIR/new_ret_no_self.rs:237:9
|
|
|
|
|
LL | fn new(_: String) -> String;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: methods called `new` usually return `Self`
|
|
--> $DIR/new_ret_no_self.rs:272:9
|
|
|
|
|
LL | / fn new() -> (u32, u32) {
|
|
LL | | unimplemented!();
|
|
LL | | }
|
|
| |_________^
|
|
|
|
error: methods called `new` usually return `Self`
|
|
--> $DIR/new_ret_no_self.rs:299:9
|
|
|
|
|
LL | / fn new() -> *mut V {
|
|
LL | | unimplemented!();
|
|
LL | | }
|
|
| |_________^
|
|
|
|
error: methods called `new` usually return `Self`
|
|
--> $DIR/new_ret_no_self.rs:369:9
|
|
|
|
|
LL | / fn new(t: T) -> impl Into<i32> {
|
|
LL | | 1
|
|
LL | | }
|
|
| |_________^
|
|
|
|
error: methods called `new` usually return `Self`
|
|
--> $DIR/new_ret_no_self.rs:390:9
|
|
|
|
|
LL | / fn new(t: T) -> impl Trait2<(), i32> {
|
|
LL | | unimplemented!()
|
|
LL | | }
|
|
| |_________^
|
|
|
|
error: aborting due to 12 previous errors
|
|
|