Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continue evaluating after missing
for
in impl Trait for Foo
- Loading branch information
Showing
4 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
impl A .. {} //~ ERROR | ||
trait A {} | ||
|
||
impl A .. {} | ||
//~^ ERROR missing `for` in a trait impl | ||
//~| ERROR `impl Trait for .. {}` is an obsolete syntax | ||
|
||
impl A usize {} | ||
//~^ ERROR missing `for` in a trait impl | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,22 @@ | ||
error: missing `for` in a trait impl | ||
--> $DIR/issue-27255.rs:1:7 | ||
--> $DIR/issue-27255.rs:3:7 | ||
| | ||
LL | impl A .. {} //~ ERROR | ||
| ^ | ||
LL | impl A .. {} | ||
| ^ help: add `for` here | ||
|
||
error: aborting due to previous error | ||
error: missing `for` in a trait impl | ||
--> $DIR/issue-27255.rs:7:7 | ||
| | ||
LL | impl A usize {} | ||
| ^^^^^^ help: add `for` here | ||
|
||
error: `impl Trait for .. {}` is an obsolete syntax | ||
--> $DIR/issue-27255.rs:3:1 | ||
| | ||
LL | impl A .. {} | ||
| ^^^^^^^^^^^^ | ||
| | ||
= help: use `auto trait Trait {}` instead | ||
|
||
error: aborting due to 3 previous errors | ||
|