rust/src/test/ui/issues/issue-3668-2.rs
Esteban Küber 9a5dcaab67 Use correct span for structured suggestion
On structured suggestion for `let` -> `const`  and `const` -> `let`, use
a proper `Span` and update tests to check the correct application.

Follow up to #80012.
2021-01-07 16:52:44 -08:00

9 lines
184 B
Rust

// run-rustfix
#![allow(unused_variables, dead_code)]
fn f(x:isize) {
static child: isize = x + 1;
//~^ ERROR attempt to use a non-constant value in a constant
}
fn main() {}