Add test batch 2

This commit is contained in:
Oneirical 2025-08-20 14:02:44 -04:00
parent e8a792daf5
commit 2dc4638c46
40 changed files with 41 additions and 37 deletions

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/7092
enum Whatever {
}

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-7092.rs:6:9
--> $DIR/method-call-nonsensical-pattern-binding-7092.rs:7:9
|
LL | match x {
| - this expression has type `Whatever`

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/54094
//@ check-pass
trait Zoo {
type X;

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/54462
//@ run-pass
//
//@ compile-flags: -Ccodegen-units=1 -O

View file

@ -1,5 +1,5 @@
warning: method `dummy` is never used
--> $DIR/mut-trait-coercion-8248.rs:5:8
--> $DIR/coerce-mut-trait-object-8248.rs:5:8
|
LL | trait A {
| - method in this trait

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/54477
//@ run-pass
// rust-lang/rust#54477: runtime bug in the VecDeque library that was
// exposed by this test case, derived from test suite of crates.io

View file

@ -0,0 +1,9 @@
// https://github.com/rust-lang/rust/issues/7178
//@ run-pass
//@ aux-build:aux-7178.rs
extern crate aux_7178 as cross_crate_self;
pub fn main() {
let _ = cross_crate_self::Foo::new(&1);
}

View file

@ -0,0 +1,10 @@
// https://github.com/rust-lang/rust/issues/7899
//@ run-pass
#![allow(unused_variables)]
//@ aux-build:aux-7899.rs
extern crate aux_7899 as testcrate;
fn main() {
let f = testcrate::V2(1.0f32, 2.0f32);
}

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/54696
//@ run-pass
#![allow(unpredictable_function_pointer_comparisons)]

View file

@ -1,8 +0,0 @@
extern "C" {
pub static mut symbol: [i8];
//~^ ERROR the size for values of type `[i8]` cannot be known at compilation time
}
fn main() {
println!("{:p}", unsafe { &symbol });
}

View file

@ -1,12 +0,0 @@
error[E0277]: the size for values of type `[i8]` cannot be known at compilation time
--> $DIR/issue-54410.rs:2:5
|
LL | pub static mut symbol: [i8];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[i8]`
= note: statics and constants must have a statically known size
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.

View file

@ -1,9 +0,0 @@
//@ run-pass
//@ aux-build:issue-7178.rs
extern crate issue_7178 as cross_crate_self;
pub fn main() {
let _ = cross_crate_self::Foo::new(&1);
}

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/53419
//@ check-pass
struct Foo {

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/7268
//@ check-pass
#![allow(dead_code)]

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/mismatched-types-in-match-pattern-7867.rs:10:9
--> $DIR/mismatched-types-in-match-7867.rs:10:9
|
LL | enum A { B, C }
| - unit variant defined here

View file

@ -1,5 +1,5 @@
warning: trait `Foo` is never used
--> $DIR/trait-method-self-param-error-7575.rs:4:7
--> $DIR/trait-method-resolution-7575.rs:4:7
|
LL | trait Foo {
| ^^^

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/55376
//@ run-pass
// Tests that paths in `pub(...)` don't fail HIR verification.

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/53728
//@ run-pass
#![allow(dead_code)]

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/7044
static X: isize = 0;
struct X; //~ ERROR the name `X` is defined multiple times

View file

@ -1,5 +1,5 @@
error[E0428]: the name `X` is defined multiple times
--> $DIR/issue-7044.rs:2:1
--> $DIR/unit-like-struct-masks-constant-7044.rs:3:1
|
LL | static X: isize = 0;
| -------------------- previous definition of the value `X` here

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/55380
//@ run-pass
#![feature(specialization)]
//~^ WARN the feature `specialization` is incomplete

View file

@ -1,5 +1,5 @@
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-55380.rs:2:12
--> $DIR/trait-specialization-default-methods-55380.rs:3:12
|
LL | #![feature(specialization)]
| ^^^^^^^^^^^^^^

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/7364
use std::cell::RefCell;
// Regression test for issue 7364

View file

@ -1,5 +1,5 @@
error[E0277]: `RefCell<isize>` cannot be shared between threads safely
--> $DIR/issue-7364.rs:4:15
--> $DIR/global-variable-promotion-error-7364.rs:5:15
|
LL | static boxed: Box<RefCell<isize>> = Box::new(RefCell::new(0));
| ^^^^^^^^^^^^^^^^^^^ `RefCell<isize>` cannot be shared between threads safely
@ -12,7 +12,7 @@ note: required because it appears within the type `Box<RefCell<isize>>`
= note: shared static variables must have a type that implements `Sync`
error[E0015]: cannot call non-const associated function `Box::<RefCell<isize>>::new` in statics
--> $DIR/issue-7364.rs:4:37
--> $DIR/global-variable-promotion-error-7364.rs:5:37
|
LL | static boxed: Box<RefCell<isize>> = Box::new(RefCell::new(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/53568
// Regression test for an NLL-related ICE (#53568) -- we failed to
// resolve inference variables in "custom type-ops".
//

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/7344
//@ run-pass
#![allow(unused_must_use)]