2 unstable releases

0.100.0 Jul 22, 2024
0.99.16 May 12, 2024

#530 in Build Utils

Download history 47/week @ 2024-07-02 16/week @ 2024-07-09 228/week @ 2024-07-16 96/week @ 2024-07-23 88/week @ 2024-07-30 37/week @ 2024-08-06 2/week @ 2024-08-13 6/week @ 2024-08-20 33/week @ 2024-08-27 49/week @ 2024-09-03 87/week @ 2024-09-10 91/week @ 2024-09-17 140/week @ 2024-09-24 158/week @ 2024-10-01 94/week @ 2024-10-08 43/week @ 2024-10-15

494 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