clean up some tests

This commit is contained in:
zedddie 2026-01-30 16:27:49 +01:00
parent 4df307acc1
commit 086dc0258b
No known key found for this signature in database
GPG key ID: B352C3C2894405A7
16 changed files with 22 additions and 13 deletions

View file

@ -1,5 +1,5 @@
//! regression test for <https://github.com/rust-lang/rust/issues/31267>
//@ run-pass
// Regression test for issue #31267
struct Foo;

View file

@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/49824>
fn main() {
let mut x = 0;
|| {

View file

@ -1,5 +1,5 @@
error: captured variable cannot escape `FnMut` closure body
--> $DIR/issue-49824.rs:4:9
--> $DIR/nested-closure-escape-borrow.rs:5:9
|
LL | let mut x = 0;
| ----- variable defined here

View file

@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/17651>
// Test that moves of unsized values within closures are caught
// and rejected.

View file

@ -1,5 +1,5 @@
error[E0277]: the size for values of type `[{integer}]` cannot be known at compilation time
--> $DIR/issue-17651.rs:5:18
--> $DIR/unsized_value_move.rs:6:18
|
LL | (|| Box::new(*(&[0][..])))();
| -------- ^^^^^^^^^^^ doesn't have a size known at compile-time

View file

@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/18767>
//@ run-pass
// Test that regionck uses the right memcat for patterns in for loops
// and doesn't ICE.

View file

@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/34569>
//@ run-pass
//@ compile-flags:-g

View file

@ -1,7 +1,8 @@
//! regression test for <https://github.com/rust-lang/rust/issues/29740>
//@ check-pass
#![allow(dead_code)]
// Regression test for #29740. Inefficient MIR matching algorithms
// generated way too much code for this sort of case, leading to OOM.
// Inefficient MIR matching algorithms generated way
// too much code for this sort of case, leading to OOM.
#![allow(non_snake_case)]
pub mod KeyboardEventConstants {

View file

@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/32004>
enum Foo {
Bar(i32),
Baz

View file

@ -1,5 +1,5 @@
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `Foo::Bar`
--> $DIR/issue-32004.rs:10:9
--> $DIR/constructor-type-mismatch.rs:11:9
|
LL | Bar(i32),
| -------- `Foo::Bar` defined here
@ -20,7 +20,7 @@ LL + Foo::Baz => {}
|
error[E0532]: expected tuple struct or tuple variant, found unit struct `S`
--> $DIR/issue-32004.rs:16:9
--> $DIR/constructor-type-mismatch.rs:17:9
|
LL | struct S;
| --------- `S` defined here

View file

@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/3038>
enum F { G(isize, isize) }
enum H { I(J, K) }

View file

@ -1,17 +1,17 @@
error[E0416]: identifier `x` is bound more than once in the same pattern
--> $DIR/issue-3038.rs:12:15
--> $DIR/multiple-bindings-on-var.rs:13:15
|
LL | F::G(x, x) => { println!("{}", x + x); }
| ^ used in a pattern more than once
error[E0416]: identifier `x` is bound more than once in the same pattern
--> $DIR/issue-3038.rs:17:32
--> $DIR/multiple-bindings-on-var.rs:18:32
|
LL | H::I(J::L(x, _), K::M(_, x))
| ^ used in a pattern more than once
error[E0416]: identifier `x` is bound more than once in the same pattern
--> $DIR/issue-3038.rs:23:13
--> $DIR/multiple-bindings-on-var.rs:24:13
|
LL | (x, x) => { x }
| ^ used in a pattern more than once

View file

@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/2849>
enum Foo { Alpha, Beta(isize) }
fn main() {

View file

@ -1,5 +1,5 @@
error[E0408]: variable `i` is not bound in all patterns
--> $DIR/issue-2849.rs:5:7
--> $DIR/or-pattern-binding-mismatch.rs:6:7
|
LL | Foo::Alpha | Foo::Beta(i) => {}
| ^^^^^^^^^^ - variable not in all patterns

View file

@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/2848>
#[allow(non_camel_case_types)]
mod bar {

View file

@ -1,5 +1,5 @@
error[E0408]: variable `beta` is not bound in all patterns
--> $DIR/issue-2848.rs:14:7
--> $DIR/or-pattern-mismatched-variable-and-variant.rs:15:7
|
LL | alpha | beta => {}
| ^^^^^ ---- variable not in all patterns
@ -7,7 +7,7 @@ LL | alpha | beta => {}
| pattern doesn't bind `beta`
error[E0170]: pattern binding `beta` is named the same as one of the variants of the type `bar::foo`
--> $DIR/issue-2848.rs:14:15
--> $DIR/or-pattern-mismatched-variable-and-variant.rs:15:15
|
LL | alpha | beta => {}
| ^^^^ help: to match on the variant, qualify the path: `bar::foo::beta`