Skip to content

Commit fb37600

Browse files
committed
Add test for rust-lang#124651
1 parent 4847f22 commit fb37600

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#[diagnostic::on_unimplemented(aa = "broken")]
2+
pub trait Test {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//@ edition:2021
2+
//@ compile-flags:--test
3+
//@ aux-build:bad_on_unimplemented.rs
4+
5+
// Do not ICE when encountering a malformed `#[diagnostic::on_unimplemented]` annotation in a
6+
// dependency when incorrectly used (#124651).
7+
8+
extern crate bad_on_unimplemented;
9+
10+
use bad_on_unimplemented::Test;
11+
12+
fn breakage<T: Test>(_: T) {}
13+
14+
#[test]
15+
fn test() {
16+
breakage(1); //~ ERROR E0277
17+
}

0 commit comments

Comments
 (0)