Skip to content

Commit b2cdfa2

Browse files
authored
Rollup merge of #156306 - danieljofficial:move-tests-consts, r=TaKO8Ki
Move tests consts Hi I have moved some tests from ui/issues into the fitting ui/consts folder Fixes a part of #133895
2 parents 62396df + 2a119e8 commit b2cdfa2

18 files changed

Lines changed: 40 additions & 14 deletions
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/4387
2+
3+
//@ run-pass
4+
5+
pub fn main() {
6+
let _foo = [0; 2*4];
7+
}

tests/ui/issues/issue-50518.rs renamed to tests/ui/consts/assoc-const-with-self-in-trait-object.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/50518
2+
13
//@ check-pass
24
use std::marker::PhantomData;
35

tests/ui/issues/issue-39548.rs renamed to tests/ui/consts/bool-comparison-in-const-array-len.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/39548
2+
13
//@ run-pass
24
type Array = [(); ((1 < 2) == false) as usize];
35

tests/ui/issues/issue-33287.rs renamed to tests/ui/consts/const-array-oob-in-range-expr.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/33287
2+
13
//@ build-pass
24
#![allow(dead_code)]
35
#![allow(unused_variables)]

tests/ui/issues/issue-53275.rs renamed to tests/ui/consts/empty-array-index-in-struct-init.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/53275
2+
13
//@ build-pass
24

35
#![crate_type = "lib"]

tests/ui/issues/issue-44239.fixed renamed to tests/ui/consts/local-var-in-associated-const.fixed

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/44239
2+
13
//@ run-rustfix
24
#![allow(dead_code, non_upper_case_globals)]
35
fn main() {

tests/ui/issues/issue-44239.rs renamed to tests/ui/consts/local-var-in-associated-const.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/44239
2+
13
//@ run-rustfix
24
#![allow(dead_code, non_upper_case_globals)]
35
fn main() {

tests/ui/issues/issue-44239.stderr renamed to tests/ui/consts/local-var-in-associated-const.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0435]: attempt to use a non-constant value in a constant
2-
--> $DIR/issue-44239.rs:8:26
2+
--> $DIR/local-var-in-associated-const.rs:10:26
33
|
44
LL | const N: usize = n;
55
| ^ non-constant value

tests/ui/issues/issue-25757.rs renamed to tests/ui/consts/method-reference-in-const-dyn-fn.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/25757
2+
13
//@ run-pass
24
struct Foo {
35
a: u32

tests/ui/issues/issue-27433.fixed renamed to tests/ui/consts/non-constant-value-in-nested-const.fixed

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/27433
2+
13
//@ run-rustfix
24
fn main() {
35
let foo = 42u32;

0 commit comments

Comments
 (0)