rustversion-msrv 0.100.0

Conditional compilation according manifest MSRV
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 35.89 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 298.18 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • robjtede/rustversion-msrv
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • robjtede

Conditional compilation according manifest MSRV.

crates.io Documentation Version MIT or Apache 2.0 licensed dependency status Download

Conditional compilation according manifest MSRV.

Selectors

  • #[rustversion_msrv::msrv]

    True on the call-site crate's rust-version field, i.e., its minimum supported Rust version (MSRV).

Use Cases

The motivating use case for the msrv macro in this crate is to ensure a stable compiler error output when running negative trybuild tests. Guarding your test function like this means you only need to update the .stderr files when you bump your MSRV, not (potentially) every stable release (or worse). Of course, try make sure that your CI is actually running an MSRV job in its set.

#[rustversion_msrv::msrv]
#[test]
fn trybuild() {
   // ...
}