Skip to content

Commit 01b7c95

Browse files
committed
Stabilize assert_matches and move it to core::macros
Closes rust-lang#82775 This is a revive of rust-lang#120234, with the suggested move from the public assert_matches module to macros. This necessitates the rename of the internal macros modules to core_macros and std_macros respectively.
1 parent b880760 commit 01b7c95

File tree

136 files changed

+176
-229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+176
-229
lines changed

compiler/rustc_abi/src/extern_abi/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::assert_matches::assert_matches;
1+
use std::macros::assert_matches;
22
use std::str::FromStr;
33

44
use super::*;

compiler/rustc_abi/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// tidy-alphabetical-start
22
#![cfg_attr(feature = "nightly", allow(internal_features))]
33
#![cfg_attr(feature = "nightly", doc(rust_logo))]
4-
#![cfg_attr(feature = "nightly", feature(assert_matches))]
54
#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
65
#![cfg_attr(feature = "nightly", feature(rustdoc_internals))]
76
#![cfg_attr(feature = "nightly", feature(step_trait))]

compiler/rustc_ast_lowering/src/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::assert_matches::assert_matches;
1+
use std::macros::assert_matches;
22
use std::ops::ControlFlow;
33
use std::sync::Arc;
44

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
// tidy-alphabetical-start
3434
#![allow(internal_features)]
3535
#![doc(rust_logo)]
36-
#![feature(assert_matches)]
3736
#![feature(box_patterns)]
3837
#![feature(if_let_guard)]
3938
#![feature(let_chains)]

compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#![allow(rustc::diagnostic_outside_of_impl)]
44
#![allow(rustc::untranslatable_diagnostic)]
55

6-
use std::assert_matches::assert_matches;
6+
use std::macros::assert_matches;
77

88
use rustc_errors::{Applicability, Diag, EmissionGuarantee};
99
use rustc_hir as hir;

compiler/rustc_borrowck/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// tidy-alphabetical-start
44
#![allow(internal_features)]
55
#![doc(rust_logo)]
6-
#![feature(assert_matches)]
76
#![feature(box_patterns)]
87
#![feature(file_buffered)]
98
#![feature(if_let_guard)]

compiler/rustc_borrowck/src/type_check/input_output.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! `RETURN_PLACE` the MIR arguments) are always fully normalized (and
88
//! contain revealed `impl Trait` values).
99
10-
use std::assert_matches::assert_matches;
10+
use std::macros::assert_matches;
1111

1212
use itertools::Itertools;
1313
use rustc_hir as hir;

compiler/rustc_builtin_macros/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#![allow(rustc::untranslatable_diagnostic)]
88
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
99
#![doc(rust_logo)]
10-
#![feature(assert_matches)]
1110
#![feature(autodiff)]
1211
#![feature(box_patterns)]
1312
#![feature(decl_macro)]

compiler/rustc_builtin_macros/src/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! The expansion from a test function to the appropriate test struct for libtest
22
//! Ideally, this code would be in libtest but for efficiency and error messages it lives here.
33
4-
use std::assert_matches::assert_matches;
54
use std::iter;
5+
use std::macros::assert_matches;
66

77
use rustc_ast::ptr::P;
88
use rustc_ast::{self as ast, GenericParamKind, attr};

compiler/rustc_codegen_llvm/src/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::assert_matches::assert_matches;
1+
use std::macros::assert_matches;
22

33
use libc::{c_char, c_uint};
44
use rustc_abi::{BackendRepr, Float, Integer, Primitive, Scalar};

0 commit comments

Comments
 (0)