This follows through on the comments on the __TestExhaustive variants
promising that their purpose will be substituted with a deny(reachable)
rustc lint once one is available.
That lint is now landing as non_exhaustive_omitted_patterns in Rust 1.57.
The correct way to use it for checking exhaustivity of a match is:
match expr {
Expr::Array(e) => {...}
Expr::Assign(e) => {...}
...
Expr::Yield(e) => {...}
#[cfg_attr(test, deny(non_exhaustive_omitted_patterns))]
_ => { /* some sane fallback */ }
}
The previously used rustfmt commit only builds with an old version of
1.52-dev, and that one is missing trait bounds on const fn.
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
--> .cargo/registry/src/github.com-1ecc6299db9ec823/lock_api-0.4.4/src/mutex.rs:143:6
|
143 | impl<R: RawMutex, T> Mutex<R, T> {
| ^
= help: add `#![feature(const_fn)]` to the crate attributes to enable
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
--> .cargo/registry/src/github.com-1ecc6299db9ec823/lock_api-0.4.4/src/remutex.rs:224:6
|
224 | impl<R: RawMutex, G: GetThreadId, T> ReentrantMutex<R, G, T> {
| ^
= help: add `#![feature(const_fn)]` to the crate attributes to enable
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
--> .cargo/registry/src/github.com-1ecc6299db9ec823/lock_api-0.4.4/src/remutex.rs:224:19
|
224 | impl<R: RawMutex, G: GetThreadId, T> ReentrantMutex<R, G, T> {
| ^
= help: add `#![feature(const_fn)]` to the crate attributes to enable
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
--> .cargo/registry/src/github.com-1ecc6299db9ec823/lock_api-0.4.4/src/rwlock.rs:348:6
|
348 | impl<R: RawRwLock, T> RwLock<R, T> {
| ^
= help: add `#![feature(const_fn)]` to the crate attributes to enable
The previously used rustfmt commit only builds with an early version of
1.51-dev, and that one is missing addr_of.
error[E0433]: failed to resolve: could not find `addr_of` in `ptr`
--> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/anyhow-1.0.40/src/error.rs:606:14
|
606 | ptr::addr_of!((*unerased.as_ptr())._object) as *mut E,
| ^^^^^^^ could not find `addr_of` in `ptr`
error[E0433]: failed to resolve: could not find `addr_of` in `ptr`
--> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/anyhow-1.0.40/src/error.rs:647:22
|
647 | ptr::addr_of!((*unerased.as_ptr())._object) as *mut E,
| ^^^^^^^ could not find `addr_of` in `ptr`
The previously pinned rustfmt commit + toolchain have no longer been
compiling as of servo/rust-smallvec#248.
error[E0658]: unions with non-`Copy` fields are unstable
--> /home/david/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.6.0/src/lib.rs:353:1
|
353 | / union SmallVecData<A: Array> {
354 | | inline: core::mem::ManuallyDrop<MaybeUninit<A>>,
355 | | heap: (*mut A::Item, usize),
356 | | }
| |_^
|
= note: see issue #55149 <https://github.com/rust-lang/rust/issues/55149> for more information
= help: add `#![feature(untagged_unions)]` to the crate attributes to enable