Skip to content

Commit 0d71862

Browse files
committed
add regression test for rust-lang#87558
1 parent 0e1a6fb commit 0d71862

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

src/test/ui/traits/issue-87558.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
struct ErrorKind;
2+
struct Error(ErrorKind);
3+
impl Fn(&isize) for Error {
4+
//~^ ERROR manual implementations of `Fn` are experimental
5+
//~| ERROR associated type bindings are not allowed here
6+
fn from() {} //~ ERROR method `from` is not a member of trait `Fn`
7+
}
8+
9+
fn main() {}

src/test/ui/traits/issue-87558.stderr

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
error[E0407]: method `from` is not a member of trait `Fn`
2+
--> $DIR/issue-87558.rs:6:5
3+
|
4+
LL | fn from() {}
5+
| ^^^^^^^^^^^^ not a member of trait `Fn`
6+
7+
error[E0183]: manual implementations of `Fn` are experimental
8+
--> $DIR/issue-87558.rs:3:6
9+
|
10+
LL | impl Fn(&isize) for Error {
11+
| ^^^^^^^^^^ manual implementations of `Fn` are experimental
12+
|
13+
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
14+
15+
error[E0229]: associated type bindings are not allowed here
16+
--> $DIR/issue-87558.rs:3:6
17+
|
18+
LL | impl Fn(&isize) for Error {
19+
| ^^^^^^^^^^ associated type not allowed here
20+
21+
error: aborting due to 3 previous errors
22+
23+
Some errors have detailed explanations: E0183, E0229, E0407.
24+
For more information about an error, try `rustc --explain E0183`.

0 commit comments

Comments
 (0)