mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Auto merge of #80539 - JohnTitor:ui-test-root-cleanup, r=petrochenkov
Reduce the entry on `src/test/ui` (UI test root) CC #73494, similar to #79776. r? `@petrochenkov`
This commit is contained in:
commit
e1fc9ff4a7
@ -1,12 +1,8 @@
|
||||
// run-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(stable_features)]
|
||||
|
||||
#![feature(const_indexing)]
|
||||
const A: [i32; 0] = [];
|
||||
const B: i32 = A[1];
|
||||
//~^ index out of bounds: the length is 0 but the index is 1
|
||||
//~| ERROR any use of this value will cause an error
|
||||
|
||||
fn main() {
|
||||
const ARR: [i32; 6] = [42, 43, 44, 45, 46, 47];
|
||||
const IDX: usize = 3;
|
||||
const VAL: i32 = ARR[IDX];
|
||||
const BLUB: [i32; (ARR[0] - 41) as usize] = [5];
|
||||
let _ = B;
|
||||
}
|
||||
|
12
src/test/ui/array-slice-vec/array_const_index-2.rs
Normal file
12
src/test/ui/array-slice-vec/array_const_index-2.rs
Normal file
@ -0,0 +1,12 @@
|
||||
// run-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(stable_features)]
|
||||
|
||||
#![feature(const_indexing)]
|
||||
|
||||
fn main() {
|
||||
const ARR: [i32; 6] = [42, 43, 44, 45, 46, 47];
|
||||
const IDX: usize = 3;
|
||||
const VAL: i32 = ARR[IDX];
|
||||
const BLUB: [i32; (ARR[0] - 41) as usize] = [5];
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
const A: [i32; 0] = [];
|
||||
const B: i32 = A[1];
|
||||
//~^ index out of bounds: the length is 0 but the index is 1
|
||||
//~| ERROR any use of this value will cause an error
|
||||
|
||||
fn main() {
|
||||
let _ = B;
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
// Test library crate for cross-crate usages of traits inheriting
|
||||
// from the builtin kinds. Mostly tests metadata correctness.
|
||||
|
||||
#![crate_type="lib"]
|
||||
|
||||
pub trait RequiresShare : Sync { }
|
||||
pub trait RequiresRequiresShareAndSend : RequiresShare + Send { }
|
||||
pub trait RequiresCopy : Copy { }
|
@ -1,5 +1,5 @@
|
||||
warning: unnecessary trailing semicolons
|
||||
--> $DIR/block-expr-precedence.rs:60:21
|
||||
--> $DIR/old-closure-expr-precedence.rs:60:21
|
||||
|
|
||||
LL | if (true) { 12; };;; -num;
|
||||
| ^^ help: remove these semicolons
|
@ -1,5 +1,5 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/block-expression-remove-semicolon.rs:8:19
|
||||
--> $DIR/old-closure-expression-remove-semicolon.rs:8:19
|
||||
|
|
||||
LL | let _x: i32 = {
|
||||
| ___________________^
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user