Use min_exhaustive_patterns
in core & std
This commit is contained in:
parent
0fa7feaf3f
commit
9962a01e9f
@ -203,8 +203,10 @@
|
|||||||
// Language features:
|
// Language features:
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![cfg_attr(bootstrap, feature(diagnostic_namespace))]
|
#![cfg_attr(bootstrap, feature(diagnostic_namespace))]
|
||||||
|
#![cfg_attr(bootstrap, feature(exhaustive_patterns))]
|
||||||
#![cfg_attr(bootstrap, feature(platform_intrinsics))]
|
#![cfg_attr(bootstrap, feature(platform_intrinsics))]
|
||||||
#![cfg_attr(not(bootstrap), feature(freeze_impls))]
|
#![cfg_attr(not(bootstrap), feature(freeze_impls))]
|
||||||
|
#![cfg_attr(not(bootstrap), feature(min_exhaustive_patterns))]
|
||||||
#![feature(abi_unadjusted)]
|
#![feature(abi_unadjusted)]
|
||||||
#![feature(adt_const_params)]
|
#![feature(adt_const_params)]
|
||||||
#![feature(allow_internal_unsafe)]
|
#![feature(allow_internal_unsafe)]
|
||||||
@ -229,7 +231,6 @@
|
|||||||
#![feature(doc_cfg_hide)]
|
#![feature(doc_cfg_hide)]
|
||||||
#![feature(doc_notable_trait)]
|
#![feature(doc_notable_trait)]
|
||||||
#![feature(effects)]
|
#![feature(effects)]
|
||||||
#![feature(exhaustive_patterns)]
|
|
||||||
#![feature(extern_types)]
|
#![feature(extern_types)]
|
||||||
#![feature(fundamental)]
|
#![feature(fundamental)]
|
||||||
#![feature(generic_arg_infer)]
|
#![feature(generic_arg_infer)]
|
||||||
|
@ -270,7 +270,9 @@
|
|||||||
//
|
//
|
||||||
// Language features:
|
// Language features:
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
|
#![cfg_attr(bootstrap, feature(exhaustive_patterns))]
|
||||||
#![cfg_attr(bootstrap, feature(platform_intrinsics))]
|
#![cfg_attr(bootstrap, feature(platform_intrinsics))]
|
||||||
|
#![cfg_attr(not(bootstrap), feature(min_exhaustive_patterns))]
|
||||||
#![feature(alloc_error_handler)]
|
#![feature(alloc_error_handler)]
|
||||||
#![feature(allocator_internals)]
|
#![feature(allocator_internals)]
|
||||||
#![feature(allow_internal_unsafe)]
|
#![feature(allow_internal_unsafe)]
|
||||||
@ -289,7 +291,6 @@
|
|||||||
#![feature(doc_masked)]
|
#![feature(doc_masked)]
|
||||||
#![feature(doc_notable_trait)]
|
#![feature(doc_notable_trait)]
|
||||||
#![feature(dropck_eyepatch)]
|
#![feature(dropck_eyepatch)]
|
||||||
#![feature(exhaustive_patterns)]
|
|
||||||
#![feature(if_let_guard)]
|
#![feature(if_let_guard)]
|
||||||
#![feature(intra_doc_pointers)]
|
#![feature(intra_doc_pointers)]
|
||||||
#![feature(lang_items)]
|
#![feature(lang_items)]
|
||||||
|
@ -270,6 +270,8 @@ impl<T> fmt::Debug for TryLockError<T> {
|
|||||||
match *self {
|
match *self {
|
||||||
#[cfg(panic = "unwind")]
|
#[cfg(panic = "unwind")]
|
||||||
TryLockError::Poisoned(..) => "Poisoned(..)".fmt(f),
|
TryLockError::Poisoned(..) => "Poisoned(..)".fmt(f),
|
||||||
|
#[cfg(not(panic = "unwind"))]
|
||||||
|
TryLockError::Poisoned(ref p) => match p._never {},
|
||||||
TryLockError::WouldBlock => "WouldBlock".fmt(f),
|
TryLockError::WouldBlock => "WouldBlock".fmt(f),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -281,6 +283,8 @@ impl<T> fmt::Display for TryLockError<T> {
|
|||||||
match *self {
|
match *self {
|
||||||
#[cfg(panic = "unwind")]
|
#[cfg(panic = "unwind")]
|
||||||
TryLockError::Poisoned(..) => "poisoned lock: another task failed inside",
|
TryLockError::Poisoned(..) => "poisoned lock: another task failed inside",
|
||||||
|
#[cfg(not(panic = "unwind"))]
|
||||||
|
TryLockError::Poisoned(ref p) => match p._never {},
|
||||||
TryLockError::WouldBlock => "try_lock failed because the operation would block",
|
TryLockError::WouldBlock => "try_lock failed because the operation would block",
|
||||||
}
|
}
|
||||||
.fmt(f)
|
.fmt(f)
|
||||||
@ -294,6 +298,8 @@ impl<T> Error for TryLockError<T> {
|
|||||||
match *self {
|
match *self {
|
||||||
#[cfg(panic = "unwind")]
|
#[cfg(panic = "unwind")]
|
||||||
TryLockError::Poisoned(ref p) => p.description(),
|
TryLockError::Poisoned(ref p) => p.description(),
|
||||||
|
#[cfg(not(panic = "unwind"))]
|
||||||
|
TryLockError::Poisoned(ref p) => match p._never {},
|
||||||
TryLockError::WouldBlock => "try_lock failed because the operation would block",
|
TryLockError::WouldBlock => "try_lock failed because the operation would block",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -303,6 +309,8 @@ impl<T> Error for TryLockError<T> {
|
|||||||
match *self {
|
match *self {
|
||||||
#[cfg(panic = "unwind")]
|
#[cfg(panic = "unwind")]
|
||||||
TryLockError::Poisoned(ref p) => Some(p),
|
TryLockError::Poisoned(ref p) => Some(p),
|
||||||
|
#[cfg(not(panic = "unwind"))]
|
||||||
|
TryLockError::Poisoned(ref p) => match p._never {},
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user