提交 e1fc9ff4 编写于 作者: B bors

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`
// 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;
}
// 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];
}
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;
}
// 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 { }
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
......
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 = {
| ___________________^
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册