pub struct CompileTimeGuaranteedError {
pub token_name: &'static str,
pub target_features: &'static str,
pub disable_flags: &'static str,
}Expand description
Error returned when attempting to disable a token whose features are compile-time enabled.
When all required features are enabled via -Ctarget-cpu or
-Ctarget-feature, the compiler has already elided the runtime
detection — summon() unconditionally returns Some. Disabling
the token would have no effect and silently produce incorrect behavior.
§Resolution
To use dangerously_disable_token_process_wide, compile without
the target features enabled. For example:
- Remove
-Ctarget-cpu=nativefromRUSTFLAGS - Use the
disable_flagsstring to disable specific features
Fields§
§token_name: &'static strThe token type that cannot be disabled.
target_features: &'static strComma-delimited target features (e.g., "avx2,fma,bmi1,bmi2,f16c,lzcnt").
Empty for ScalarToken.
disable_flags: &'static strRUSTFLAGS to disable these features (e.g., "-Ctarget-feature=-avx2,-fma,...").
Empty for ScalarToken.
Trait Implementations§
Source§impl Clone for CompileTimeGuaranteedError
impl Clone for CompileTimeGuaranteedError
Source§fn clone(&self) -> CompileTimeGuaranteedError
fn clone(&self) -> CompileTimeGuaranteedError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompileTimeGuaranteedError
impl Debug for CompileTimeGuaranteedError
Source§impl Display for CompileTimeGuaranteedError
impl Display for CompileTimeGuaranteedError
Source§impl Error for CompileTimeGuaranteedError
Available on crate feature std only.
impl Error for CompileTimeGuaranteedError
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for CompileTimeGuaranteedError
impl RefUnwindSafe for CompileTimeGuaranteedError
impl Send for CompileTimeGuaranteedError
impl Sync for CompileTimeGuaranteedError
impl Unpin for CompileTimeGuaranteedError
impl UnsafeUnpin for CompileTimeGuaranteedError
impl UnwindSafe for CompileTimeGuaranteedError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more