Skip to content

Commit a7d49a0

Browse files
authored
Unrolled build for rust-lang#138639
Rollup merge of rust-lang#138639 - spencer3035:clean-ui-tests-2-of-n, r=jieyouxu Clean UI tests 2 of n Modified 4 tests in tests/ui. Cleaned 3 and deleted one. I have a final commit changing the values in `src/tools/tidy/src/ui_tests.rs`. I wasn't sure if it was best practice to change this value as you go along or once at the end. I can rebase to something that incrementally changes the value in the "cleaned" commits if that is preferred. Related Issues: rust-lang#73494 rust-lang#133895 r? jieyouxu
2 parents d93f678 + 5e6b459 commit a7d49a0

8 files changed

+65
-78
lines changed

Diff for: src/tools/tidy/src/issues.txt

-3
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,6 @@ ui/issues/issue-28586.rs
20002000
ui/issues/issue-28600.rs
20012001
ui/issues/issue-28625.rs
20022002
ui/issues/issue-28776.rs
2003-
ui/issues/issue-28777.rs
20042003
ui/issues/issue-28828.rs
20052004
ui/issues/issue-28839.rs
20062005
ui/issues/issue-28936.rs
@@ -2063,7 +2062,6 @@ ui/issues/issue-3091.rs
20632062
ui/issues/issue-31011.rs
20642063
ui/issues/issue-3109.rs
20652064
ui/issues/issue-3121.rs
2066-
ui/issues/issue-31260.rs
20672065
ui/issues/issue-31267-additional.rs
20682066
ui/issues/issue-31267.rs
20692067
ui/issues/issue-31299.rs
@@ -2608,7 +2606,6 @@ ui/issues/issue-9243.rs
26082606
ui/issues/issue-9249.rs
26092607
ui/issues/issue-9259.rs
26102608
ui/issues/issue-92741.rs
2611-
ui/issues/issue-9382.rs
26122609
ui/issues/issue-9446.rs
26132610
ui/issues/issue-9719.rs
26142611
ui/issues/issue-9725.rs

Diff for: src/tools/tidy/src/ui_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use ignore::Walk;
1717
const ENTRY_LIMIT: u32 = 901;
1818
// FIXME: The following limits should be reduced eventually.
1919

20-
const ISSUES_ENTRY_LIMIT: u32 = 1634;
20+
const ISSUES_ENTRY_LIMIT: u32 = 1631;
2121

2222
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
2323
"rs", // test source files

Diff for: tests/ui/coercion/struct-coerce-vec-to-slice.rs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//! Regression test that ensures struct field literals can be coerced into slice and `Box` types
2+
3+
//@ check-pass
4+
5+
struct Thing1<'a> {
6+
baz: &'a [Box<isize>],
7+
bar: Box<u64>,
8+
}
9+
10+
struct Thing2<'a> {
11+
baz: &'a [Box<isize>],
12+
bar: u64,
13+
}
14+
15+
pub fn main() {
16+
let _a = Thing1 { baz: &[], bar: Box::new(32) };
17+
let _b = Thing1 { baz: &Vec::new(), bar: Box::new(32) };
18+
let _c = Thing2 { baz: &[], bar: 32 };
19+
let _d = Thing2 { baz: &Vec::new(), bar: 32 };
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//! Regression test to check that literal expressions in a struct field can be coerced to the
2+
//! expected field type, including block expressions.
3+
//!
4+
//! Issue: <https://github.com/rust-lang/rust/issues/31260>
5+
6+
//@ check-pass
7+
8+
pub struct Struct<K: 'static> {
9+
pub field: K,
10+
}
11+
12+
static STRUCT: Struct<&'static [u8]> = Struct { field: { &[1] } };
13+
14+
static STRUCT2: Struct<&'static [u8]> = Struct { field: &[1] };
15+
16+
fn main() {}

Diff for: tests/ui/issues/issue-28777.rs

-22
This file was deleted.

Diff for: tests/ui/issues/issue-31260.rs

-15
This file was deleted.

Diff for: tests/ui/issues/issue-9382.rs

-37
This file was deleted.

Diff for: tests/ui/parser/operator-precedence-braces-exprs.rs

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//! Regression test for ensuring that operator precedence is correctly handled in the presence of
2+
//! braces
3+
//!
4+
//! Issue: <https://github.com/rust-lang/rust/issues/28777>
5+
6+
//@ run-pass
7+
8+
#[allow(unused_braces)]
9+
fn main() {
10+
let v1 = { 1 + { 2 } * { 3 } };
11+
let v2 = 1 + { 2 } * { 3 };
12+
13+
assert_eq!(7, v1);
14+
assert_eq!(7, v2);
15+
16+
let v3;
17+
v3 = { 1 + { 2 } * { 3 } };
18+
let v4;
19+
v4 = 1 + { 2 } * { 3 };
20+
assert_eq!(7, v3);
21+
assert_eq!(7, v4);
22+
23+
let v5 = { 1 + { 2 } * 3 };
24+
assert_eq!(7, v5);
25+
26+
let v9 = { 1 + if 1 > 2 { 1 } else { 2 } * { 3 } };
27+
assert_eq!(7, v9);
28+
}

0 commit comments

Comments
 (0)