2 unstable releases

0.100.0 Jul 22, 2024
0.99.16 May 12, 2024

#603 in Build Utils

Download history 8/week @ 2024-08-23 67/week @ 2024-08-30 28/week @ 2024-09-06 81/week @ 2024-09-13 157/week @ 2024-09-20 116/week @ 2024-09-27 149/week @ 2024-10-04 85/week @ 2024-10-11 48/week @ 2024-10-18 43/week @ 2024-10-25 49/week @ 2024-11-01 39/week @ 2024-11-08 128/week @ 2024-11-15 69/week @ 2024-11-22 133/week @ 2024-11-29 108/week @ 2024-12-06

456 downloads per month
Used in actix_derive

MIT/Apache

16KB
354 lines

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() {
   // ...
}

No runtime deps