-
Notifications
You must be signed in to change notification settings - Fork 960
Closed
Labels
C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICE
Description
When you run rustfmt on a code with question mark, it duplicate symbols after it. For example, this:
#![feature(question_mark)]
fn foo() -> Result<i32, &'static str> {
Ok(3)
}
fn bar() -> Result<i32, &'static str> {
Ok(foo()?.pow(2)) // <- one dot
}
fn main() {
println!("{:?}", bar());
}
Will become this:
#![feature(question_mark)]
fn foo() -> Result<i32, &'static str> {
Ok(3)
}
fn bar() -> Result<i32, &'static str> {
Ok(foo()?..pow(2)) // <- two dots
}
fn main() {
println!("{:?}", bar());
}
Life example: https://is.gd/jo9cQ9
Metadata
Metadata
Assignees
Labels
C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICE