forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
tests/ui/diagnostic_namespace/auxiliary/bad_on_unimplemented.rs
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,2 @@ | ||
#[diagnostic::on_unimplemented(aa = "broken")] | ||
pub trait Test {} |
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,17 @@ | ||
//@ edition:2021 | ||
//@ compile-flags:--test | ||
//@ aux-build:bad_on_unimplemented.rs | ||
|
||
// Do not ICE when encountering a malformed `#[diagnostic::on_unimplemented]` annotation in a | ||
// dependency when incorrectly used (#124651). | ||
|
||
extern crate bad_on_unimplemented; | ||
|
||
use bad_on_unimplemented::Test; | ||
|
||
fn breakage<T: Test>(_: T) {} | ||
|
||
#[test] | ||
fn test() { | ||
breakage(1); //~ ERROR E0277 | ||
} |