You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the context of #![no_std] libraries the core::num::Float trait is marked as unstable but has stable methods, including powi. To use the stable methods glob imports or UFCS both work:
Glob import members of the num module:
#![no_std]#![crate_type="lib"]use core::num::*;//use core::num::Float; // error: use of unstable library feature 'core_float': stable// interface is via `impl f{32,64}` in later crates (see issue #32110)fnfoo() -> f32{3.0f32.powi(2)}
In the context of
#![no_std]
libraries thecore::num::Float
trait is marked as unstable but has stable methods, includingpowi
. To use the stable methods glob imports or UFCS both work:Glob import members of the
num
module:Use UFCS:
Shouldn't the UFCS variant give the unstable library feature error? Is there another way to use the member call syntax without the glob import?
The text was updated successfully, but these errors were encountered: