Verify that issue #3567 is resolved

Closes #3567
This commit is contained in:
Michael Wright 2019-09-12 08:47:11 +02:00
parent 6ca5b2053a
commit 67f149215f
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