rust/tests/ui/numbers-arithmetic/float-literal-inference.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
197 B
Rust
Raw Normal View History

// run-pass
struct S {
z: f64
}
pub fn main() {
let x: f32 = 4.0;
println!("{}", x);
let y: f64 = 64.0;
println!("{}", y);
let z = S { z: 1.0 };
println!("{}", z.z);
}