Skip to content

Commit 7c3bc86

Browse files
Rollup merge of #156704 - cyrgani:unbox-tests, r=mu001999
reduce usage of `box_patterns` in tests Part of #156110.
2 parents 4cce353 + 7450bf0 commit 7c3bc86

10 files changed

Lines changed: 4 additions & 101 deletions

File tree

tests/incremental/lint-unused-features.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![deny(unused_features)]
55

66
// Used language features
7-
#![feature(box_patterns)]
87
#![feature(decl_macro)]
98
#![cfg_attr(all(), feature(rustc_attrs))]
109

@@ -14,11 +13,6 @@
1413
#![cfg_attr(all(), feature(allocator_api))]
1514
//[bfail]~^ ERROR feature `allocator_api` is declared but not used
1615

17-
pub fn use_box_patterns(b: Box<i32>) -> i32 {
18-
let box x = b;
19-
x
20-
}
21-
2216
macro m() {}
2317
pub fn use_decl_macro() {
2418
m!();

tests/run-make/unstable-feature-usage-metrics-incremental/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![feature(ascii_char)] // random lib feature
2-
#![feature(box_patterns)] // random lang feature
2+
#![feature(test_unstable_lint)] // random lang feature
33

44
// picked arbitrary unstable features, just need a random lib and lang feature, ideally ones that
55
// won't be stabilized any time soon so we don't have to update this test

tests/run-make/unstable-feature-usage-metrics-incremental/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn test_metrics_dump() {
6969
let expected = serde_json::json!(
7070
{
7171
"lib_features":[{"symbol":"ascii_char", "timestamp":null}],
72-
"lang_features":[{"symbol":"box_patterns","since":null, "timestamp":null}]
72+
"lang_features":[{"symbol":"test_unstable_lint","since":null, "timestamp":null}]
7373
}
7474
);
7575

tests/run-make/unstable-feature-usage-metrics/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![feature(ascii_char)] // random lib feature
2-
#![feature(box_patterns)] // random lang feature
2+
#![feature(test_unstable_lint)] // random lang feature
33

44
// picked arbitrary unstable features, just need a random lib and lang feature, ideally ones that
55
// won't be stabilized any time soon so we don't have to update this test

tests/run-make/unstable-feature-usage-metrics/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn test_metrics_dump() {
6767
let expected = serde_json::json!(
6868
{
6969
"lib_features":[{"symbol":"ascii_char", "timestamp":null}],
70-
"lang_features":[{"symbol":"box_patterns","since":null, "timestamp":null}]
70+
"lang_features":[{"symbol":"test_unstable_lint","since":null, "timestamp":null}]
7171
}
7272
);
7373

tests/ui/binding/match-unique-bind.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/ui/box/unit/unique-destructure.rs

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/ui/box/unit/unique-pat-2.rs

Lines changed: 0 additions & 18 deletions
This file was deleted.

tests/ui/deref/derefmut-closure-drop-order.rs

Lines changed: 0 additions & 47 deletions
This file was deleted.

tests/ui/lint/unused-features/used-language-features.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,9 @@
44
#![deny(unused_features)]
55

66
// Used language features
7-
#![feature(box_patterns)]
87
#![feature(decl_macro)]
98
#![cfg_attr(all(), feature(rustc_attrs))]
109

11-
pub fn use_box_patterns(b: Box<i32>) -> i32 {
12-
let box x = b;
13-
x
14-
}
15-
1610
macro m() {}
1711
pub fn use_decl_macro() {
1812
m!();

0 commit comments

Comments
 (0)