-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Give me a way to emit all the delayed bugs
- Loading branch information
1 parent
68acb39
commit 04532e9
Showing
5 changed files
with
58 additions
and
9 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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// compile-flags: -Zeagerly-emit-delayed-bugs | ||
|
||
trait Foo {} | ||
|
||
fn main() {} | ||
|
||
fn f() -> impl Foo { | ||
//~^ ERROR the trait bound `i32: Foo` is not satisfied | ||
//~| ERROR `report_selection_error` did not emit an error | ||
1i32 | ||
} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
error: `report_selection_error` did not emit an error | ||
--> $DIR/eagerly-emit.rs:7:11 | ||
| | ||
LL | fn f() -> impl Foo { | ||
| ^^^^^^^^ | ||
|
||
error[E0277]: the trait bound `i32: Foo` is not satisfied | ||
--> $DIR/eagerly-emit.rs:7:11 | ||
| | ||
LL | fn f() -> impl Foo { | ||
| ^^^^^^^^ the trait `Foo` is not implemented for `i32` | ||
... | ||
LL | 1i32 | ||
| ---- return type was inferred to be `i32` here | ||
| | ||
help: this trait has no implementations, consider adding one | ||
--> $DIR/eagerly-emit.rs:3:1 | ||
| | ||
LL | trait Foo {} | ||
| ^^^^^^^^^ | ||
|
||
error: expected fulfillment errors | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0277`. |