Closed
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