Closed
Description
For example, when I try to format the following code,
#![feature(generators)]
unsafe fn foo() {
let mut g = static || {
yield 3;
};
}
rustfmt 0.3.6-nightly emits the following error:
error: expected expression, found keyword `static`
--> test.rs:4:17
|
4 | let mut g = static || {
| ^^^^^^
The procedure to fix this would be something like this:
- add tests to make sure that rustfmt handles immovable generators
- update
rustc-ap-syntax
andrustc-ap-rustc_errors
to the latest version - update expr.rs and closures.rs to support immovable generators