Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion src/librustc_typeck/error_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,38 @@ fn bar(foo: Foo) -> u32 {
```
"##,

E0183: r##"
Fn* traits (`unboxed closures`) are experimental.
See [tracking issue #29625][iss29625] for the status of the feature.

Functions must have exactly one (non self) argument, a tuple representing
the argument list [1].

Here's an example of this error:
```compile_fail,E0183
extern "rust-call" fn echo(arg: (u32,)) -> (u32,) {
arg
}
```

This feature can be enabled with:
```
#![feature(unboxed_closures)]
```

Here's the above example fixed:
```
#![feature(unboxed_closures)]

extern "rust-call" fn echo(arg: (u32,)) -> (u32,) {
arg
}
```

[1]: https://doc.rust-lang.org/unstable-book/language-features/unboxed-closures.html
[iss29625]: https://github.com/rust-lang/rust/issues/29625
"##,

E0184: r##"
Explicitly implementing both Drop and Copy for a type is currently disallowed.
This feature can make some sense in theory, but the current implementation is
Expand Down Expand Up @@ -4671,7 +4703,6 @@ register_diagnostics! {
// E0173, // manual implementations of unboxed closure traits are experimental
// E0174,
// E0182, // merged into E0229
E0183,
// E0187, // can't infer the kind of the closure
// E0188, // can not cast an immutable reference to a mutable pointer
// E0189, // deprecated: can only cast a boxed pointer to a boxed object
Expand Down