#[non_exhaustive]pub struct PragmaStateFact {Show 13 fields
pub range: SourceLocation,
pub anchor_id: AnchorId,
pub directive_item: Option<HirId>,
pub scope_id: Option<HirScopeId>,
pub package_context: Option<String>,
pub strict_vars: bool,
pub strict_subs: bool,
pub strict_refs: bool,
pub warnings: bool,
pub disabled_warning_categories: Vec<String>,
pub features: Vec<String>,
pub provenance: CompileProvenance,
pub confidence: CompileConfidence,
}Expand description
Effective strict/warnings/feature state after a compile-time transition.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.range: SourceLocationSource range for the transition that produced this state.
anchor_id: AnchorIdStable source anchor for this transition.
directive_item: Option<HirId>Directive that produced this state, when HIR has one.
scope_id: Option<HirScopeId>Scope containing this transition.
package_context: Option<String>Package context active at this transition.
strict_vars: boolEffective strict vars state.
strict_subs: boolEffective strict subs state.
strict_refs: boolEffective strict refs state.
warnings: boolEffective global warnings state.
disabled_warning_categories: Vec<String>Warning categories explicitly disabled in this state.
features: Vec<String>Effective feature names in this state.
provenance: CompileProvenanceHow this fact was produced.
confidence: CompileConfidenceConfidence in this fact.
Implementations§
Source§impl PragmaStateFact
impl PragmaStateFact
Sourcepub fn strict_enabled(&self) -> bool
pub fn strict_enabled(&self) -> bool
Whether all strict categories are active in this state.
Sourcepub fn warning_active(&self, category: &str) -> bool
pub fn warning_active(&self, category: &str) -> bool
Whether warnings are active for a category in this state.
Sourcepub fn has_feature(&self, feature: &str) -> bool
pub fn has_feature(&self, feature: &str) -> bool
Whether a feature is active in this state.
Trait Implementations§
Source§impl Clone for PragmaStateFact
impl Clone for PragmaStateFact
Source§fn clone(&self) -> PragmaStateFact
fn clone(&self) -> PragmaStateFact
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PragmaStateFact
impl Debug for PragmaStateFact
Source§impl PartialEq for PragmaStateFact
impl PartialEq for PragmaStateFact
Source§fn eq(&self, other: &PragmaStateFact) -> bool
fn eq(&self, other: &PragmaStateFact) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PragmaStateFact
impl StructuralPartialEq for PragmaStateFact
Auto Trait Implementations§
impl Freeze for PragmaStateFact
impl RefUnwindSafe for PragmaStateFact
impl Send for PragmaStateFact
impl Sync for PragmaStateFact
impl Unpin for PragmaStateFact
impl UnsafeUnpin for PragmaStateFact
impl UnwindSafe for PragmaStateFact
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