Auto merge of #4538 - mikerite:fix-3567, r=flip1995

Verify that issue #3567 is resolved

Closes #3567

changelog: none
This commit is contained in:
bors 2019-09-12 07:42:38 +00:00
commit 30c75ed5b3
3 changed files with 45 additions and 1 deletions

View file

@ -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()
}
}
}

View file

@ -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()
}
}
}

View file

@ -216,5 +216,11 @@ error: unnecessary structure name repetition
LL | nested::A {};
| ^^^^^^^^^ 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