parent
6ca5b2053a
commit
67f149215f
3 changed files with 45 additions and 1 deletions
|
@ -313,3 +313,22 @@ mod rustfix {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod issue3567 {
|
||||||
|
struct TestStruct {}
|
||||||
|
impl TestStruct {
|
||||||
|
fn from_something() -> Self {
|
||||||
|
Self {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
trait Test {
|
||||||
|
fn test() -> TestStruct;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Test for TestStruct {
|
||||||
|
fn test() -> TestStruct {
|
||||||
|
Self::from_something()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -313,3 +313,22 @@ mod rustfix {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod issue3567 {
|
||||||
|
struct TestStruct {}
|
||||||
|
impl TestStruct {
|
||||||
|
fn from_something() -> Self {
|
||||||
|
Self {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
trait Test {
|
||||||
|
fn test() -> TestStruct;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Test for TestStruct {
|
||||||
|
fn test() -> TestStruct {
|
||||||
|
TestStruct::from_something()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -216,5 +216,11 @@ error: unnecessary structure name repetition
|
||||||
LL | nested::A {};
|
LL | nested::A {};
|
||||||
| ^^^^^^^^^ help: use the applicable keyword: `Self`
|
| ^^^^^^^^^ help: use the applicable keyword: `Self`
|
||||||
|
|
||||||
error: aborting due to 35 previous errors
|
error: unnecessary structure name repetition
|
||||||
|
--> $DIR/use_self.rs:331:13
|
||||||
|
|
|
||||||
|
LL | TestStruct::from_something()
|
||||||
|
| ^^^^^^^^^^ help: use the applicable keyword: `Self`
|
||||||
|
|
||||||
|
error: aborting due to 36 previous errors
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue