Struct clippy_utils::msrvs::Msrv
source · pub struct Msrv {
stack: Vec<RustcVersion>,
}
Expand description
Tracks the current MSRV from clippy.toml
, Cargo.toml
or set via #[clippy::msrv]
Fields§
§stack: Vec<RustcVersion>
Implementations§
source§impl Msrv
impl Msrv
fn new(initial: Option<RustcVersion>) -> Self
fn read_inner(conf_msrv: &Option<String>, sess: &Session) -> Self
sourcepub fn read(conf_msrv: &Option<String>, sess: &Session) -> &'static Self
pub fn read(conf_msrv: &Option<String>, sess: &Session) -> &'static Self
Set the initial MSRV from the Clippy config file or from Cargo due to the rust-version
field in Cargo.toml
Returns a &'static Msrv
as Copy
types are more easily passed to the
register_{late,early}_pass
callbacks
pub fn current(&self) -> Option<RustcVersion>
pub fn meets(&self, required: RustcVersion) -> bool
fn parse_attr(sess: &Session, attrs: &[Attribute]) -> Option<RustcVersion>
pub fn enter_lint_attrs(&mut self, sess: &Session, attrs: &[Attribute])
pub fn exit_lint_attrs(&mut self, sess: &Session, attrs: &[Attribute])
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Msrv
impl Send for Msrv
impl Sync for Msrv
impl Unpin for Msrv
impl UnwindSafe for Msrv
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes