mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
@@ -1,5 +1,5 @@
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(all(feature = "nightly", bootstrap, test), feature(assert_matches))]
|
||||
#![cfg_attr(all(feature = "nightly", test), feature(assert_matches))]
|
||||
#![cfg_attr(feature = "nightly", allow(internal_features))]
|
||||
#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
|
||||
#![cfg_attr(feature = "nightly", feature(step_trait))]
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
// tidy-alphabetical-start
|
||||
#![allow(internal_features)]
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(default_field_values)]
|
||||
#![feature(file_buffered)]
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
// tidy-alphabetical-start
|
||||
#![allow(internal_features)]
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(decl_macro)]
|
||||
#![feature(iter_order_by)]
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
//! This API is completely unstable and subject to change.
|
||||
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(extern_types)]
|
||||
#![feature(file_buffered)]
|
||||
#![feature(impl_trait_in_assoc_type)]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(file_buffered)]
|
||||
#![feature(negative_impls)]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![feature(array_try_map)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(decl_macro)]
|
||||
#![feature(never_type)]
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#![allow(internal_features)]
|
||||
#![allow(rustc::default_hash_types)]
|
||||
#![allow(rustc::potential_query_instability)]
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(cfg_select))]
|
||||
#![cfg_attr(bootstrap, feature(cold_path))]
|
||||
#![cfg_attr(test, feature(test))]
|
||||
@@ -18,6 +17,7 @@
|
||||
#![feature(allocator_api)]
|
||||
#![feature(ascii_char)]
|
||||
#![feature(ascii_char_variants)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(auto_traits)]
|
||||
#![feature(const_default)]
|
||||
#![feature(const_trait_impl)]
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// tidy-alphabetical-start
|
||||
#![allow(internal_features)]
|
||||
#![allow(rustc::direct_use_of_rustc_type_ir)]
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(associated_type_defaults)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(default_field_values)]
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
*/
|
||||
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(default_field_values)]
|
||||
#![feature(gen_blocks)]
|
||||
#![feature(iter_intersperse)]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(iter_intersperse)]
|
||||
#![feature(iter_order_by)]
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
// tidy-alphabetical-start
|
||||
#![allow(rustc::direct_use_of_rustc_type_ir)]
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(extend_one)]
|
||||
#![recursion_limit = "512"] // For rustdoc
|
||||
// tidy-alphabetical-end
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
// tidy-alphabetical-start
|
||||
#![allow(internal_features)]
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(iter_order_by)]
|
||||
#![feature(rustc_attrs)]
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
// tidy-alphabetical-start
|
||||
#![allow(internal_features)]
|
||||
#![allow(rustc::direct_use_of_rustc_type_ir)]
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![cfg_attr(doc, feature(intra_doc_pointers))]
|
||||
#![feature(allocator_api)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(associated_type_defaults)]
|
||||
#![feature(box_as_ptr)]
|
||||
#![feature(box_patterns)]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//! Construction of MIR from HIR.
|
||||
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(try_blocks)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(associated_type_defaults)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(exact_size_is_empty)]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(const_type_name)]
|
||||
#![feature(cow_is_borrowed)]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//! The main parser interface.
|
||||
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![cfg_attr(test, feature(iter_order_by))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(debug_closure_helpers)]
|
||||
#![feature(default_field_values)]
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
|
||||
// tidy-alphabetical-start
|
||||
#![allow(internal_features)]
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![cfg_attr(bootstrap, feature(ptr_as_ref_unchecked))]
|
||||
#![feature(arbitrary_self_types)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(const_default)]
|
||||
#![feature(const_trait_impl)]
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
//! DefPaths which are much more robust in the face of changes to the code base.
|
||||
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![feature(assert_matches)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
use rustc_hir::def::DefKind;
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
//! This API is completely unstable and subject to change.
|
||||
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(associated_type_defaults)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(default_field_values)]
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
//! This API is completely unstable and subject to change.
|
||||
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(associated_type_defaults)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(iterator_try_collect)]
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
#![feature(allocator_api)]
|
||||
#![feature(array_into_iter_constructors)]
|
||||
#![feature(ascii_char)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(async_fn_traits)]
|
||||
#![feature(async_iterator)]
|
||||
#![feature(bstr)]
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
// tidy-alphabetical-start
|
||||
#![feature(allocator_api)]
|
||||
#![feature(array_into_iter_constructors)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(char_internals)]
|
||||
#![feature(const_alloc_error)]
|
||||
#![feature(const_cmp)]
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#![feature(const_heap)]
|
||||
#![feature(deque_extend_front)]
|
||||
#![feature(iter_array_chunks)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(cow_is_borrowed)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(downcast_unchecked)]
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
#[macro_use]
|
||||
mod macros;
|
||||
|
||||
#[stable(feature = "assert_matches", since = "1.95.0")]
|
||||
#[unstable(feature = "assert_matches", issue = "82775")]
|
||||
pub use crate::macros::{assert_matches, debug_assert_matches};
|
||||
|
||||
#[unstable(feature = "derive_from", issue = "144889")]
|
||||
|
||||
@@ -147,6 +147,8 @@ macro_rules! assert_ne {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(assert_matches)]
|
||||
///
|
||||
/// use std::assert_matches;
|
||||
///
|
||||
/// let a = Some(345);
|
||||
@@ -164,7 +166,7 @@ macro_rules! assert_ne {
|
||||
/// assert_matches!(a, Some(x) if x > 100);
|
||||
/// // assert_matches!(a, Some(x) if x < 100); // panics
|
||||
/// ```
|
||||
#[stable(feature = "assert_matches", since = "1.95.0")]
|
||||
#[unstable(feature = "assert_matches", issue = "82775")]
|
||||
#[allow_internal_unstable(panic_internals)]
|
||||
#[rustc_macro_transparency = "semiopaque"]
|
||||
pub macro assert_matches {
|
||||
@@ -374,6 +376,8 @@ macro_rules! debug_assert_ne {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(assert_matches)]
|
||||
///
|
||||
/// use std::debug_assert_matches;
|
||||
///
|
||||
/// let a = Some(345);
|
||||
@@ -391,7 +395,7 @@ macro_rules! debug_assert_ne {
|
||||
/// debug_assert_matches!(a, Some(x) if x > 100);
|
||||
/// // debug_assert_matches!(a, Some(x) if x < 100); // panics
|
||||
/// ```
|
||||
#[stable(feature = "assert_matches", since = "1.95.0")]
|
||||
#[unstable(feature = "assert_matches", issue = "82775")]
|
||||
#[allow_internal_unstable(assert_matches)]
|
||||
#[rustc_macro_transparency = "semiopaque"]
|
||||
pub macro debug_assert_matches($($arg:tt)*) {
|
||||
|
||||
@@ -393,6 +393,7 @@
|
||||
//
|
||||
// Only for re-exporting:
|
||||
// tidy-alphabetical-start
|
||||
#![feature(assert_matches)]
|
||||
#![feature(async_iterator)]
|
||||
#![feature(c_variadic)]
|
||||
#![feature(cfg_accessible)]
|
||||
@@ -722,7 +723,7 @@ pub mod arch {
|
||||
assert_eq, assert_ne, debug_assert, debug_assert_eq, debug_assert_ne, r#try, unimplemented,
|
||||
unreachable, write, writeln,
|
||||
};
|
||||
#[stable(feature = "assert_matches", since = "1.95.0")]
|
||||
#[unstable(feature = "assert_matches", issue = "82775")]
|
||||
pub use core::{assert_matches, debug_assert_matches};
|
||||
|
||||
// Re-export unstable derive macro defined through core.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![cfg_attr(bootstrap, feature(if_let_guard))]
|
||||
#![doc(
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
@@ -7,6 +6,7 @@
|
||||
)]
|
||||
#![feature(ascii_char)]
|
||||
#![feature(ascii_char_variants)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(file_buffered)]
|
||||
#![feature(formatting_options)]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#![feature(macro_metavar_expr)]
|
||||
#![feature(never_type)]
|
||||
#![feature(rustc_private)]
|
||||
#![cfg_attr(bootstrap, feature(assert_matches))]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(unwrap_infallible)]
|
||||
#![recursion_limit = "512"]
|
||||
#![allow(clippy::missing_errors_doc, clippy::missing_panics_doc, clippy::must_use_candidate)]
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
//@ ignore-remote
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(ascii_char, ascii_char_variants)]
|
||||
|
||||
extern crate rustc_driver;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(ascii_char, ascii_char_variants)]
|
||||
|
||||
extern crate rustc_hir;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//@ edition: 2024
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
//@ ignore-remote
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_hir;
|
||||
extern crate rustc_middle;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
//@ ignore-remote
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
extern crate rustc_hir;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
//@ ignore-remote
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(ascii_char, ascii_char_variants)]
|
||||
|
||||
extern crate rustc_hir;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
//@ edition: 2024
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_hir;
|
||||
extern crate rustc_middle;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_hir;
|
||||
extern crate rustc_middle;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_driver;
|
||||
extern crate rustc_interface;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
|
||||
extern crate rustc_driver;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//@ edition: 2021
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
|
||||
extern crate rustc_middle;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Test that uninhabited saved local doesn't make the entire variant uninhabited.
|
||||
//@ run-pass
|
||||
#![allow(unused)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(coroutine_trait)]
|
||||
#![feature(coroutines, stmt_expr_attributes)]
|
||||
#![feature(never_type)]
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
//@ error-pattern: right: 3
|
||||
//@ needs-subprocess
|
||||
|
||||
#![feature(assert_matches)]
|
||||
|
||||
use std::assert_matches;
|
||||
|
||||
fn main() {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
// regression test for https://github.com/rust-lang/rust/pull/85678
|
||||
|
||||
#![feature(assert_matches)]
|
||||
|
||||
use std::assert_matches;
|
||||
|
||||
fn main() {
|
||||
|
||||
Reference in New Issue
Block a user