rust/tests/ui/feature-gates/feature-gate-f128.rs
Trevor Gross e782d27ec6 Add feature gates for f16 and f128
Includes related tests and documentation pages.

Michael Goulet: Don't issue feature error in resolver for f16/f128
unless finalize

Co-authored-by: Michael Goulet <michael@errs.io>
2024-03-14 13:32:54 -04:00

16 lines
360 B
Rust

#![allow(unused)]
const A: f128 = 10.0; //~ ERROR the type `f128` is unstable
pub fn main() {
let a: f128 = 100.0; //~ ERROR the type `f128` is unstable
let b = 0.0f128; //~ ERROR the type `f128` is unstable
foo(1.23);
}
fn foo(a: f128) {} //~ ERROR the type `f128` is unstable
struct Bar {
a: f128, //~ ERROR the type `f128` is unstable
}