Add test batch 2
This commit is contained in:
parent
e8a792daf5
commit
2dc4638c46
40 changed files with 41 additions and 37 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/7092
|
||||||
enum Whatever {
|
enum Whatever {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0308]: mismatched types
|
error[E0308]: mismatched types
|
||||||
--> $DIR/issue-7092.rs:6:9
|
--> $DIR/method-call-nonsensical-pattern-binding-7092.rs:7:9
|
||||||
|
|
|
|
||||||
LL | match x {
|
LL | match x {
|
||||||
| - this expression has type `Whatever`
|
| - this expression has type `Whatever`
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/54094
|
||||||
//@ check-pass
|
//@ check-pass
|
||||||
trait Zoo {
|
trait Zoo {
|
||||||
type X;
|
type X;
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/54462
|
||||||
//@ run-pass
|
//@ run-pass
|
||||||
//
|
//
|
||||||
//@ compile-flags: -Ccodegen-units=1 -O
|
//@ compile-flags: -Ccodegen-units=1 -O
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
warning: method `dummy` is never used
|
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 {
|
LL | trait A {
|
||||||
| - method in this trait
|
| - method in this trait
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/54477
|
||||||
//@ run-pass
|
//@ run-pass
|
||||||
// rust-lang/rust#54477: runtime bug in the VecDeque library that was
|
// rust-lang/rust#54477: runtime bug in the VecDeque library that was
|
||||||
// exposed by this test case, derived from test suite of crates.io
|
// exposed by this test case, derived from test suite of crates.io
|
||||||
|
|
@ -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);
|
||||||
|
}
|
||||||
10
tests/ui/cross-crate/tuple-struct-cross-crate-7899.rs
Normal file
10
tests/ui/cross-crate/tuple-struct-cross-crate-7899.rs
Normal 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);
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/54696
|
||||||
//@ run-pass
|
//@ run-pass
|
||||||
|
|
||||||
#![allow(unpredictable_function_pointer_comparisons)]
|
#![allow(unpredictable_function_pointer_comparisons)]
|
||||||
|
|
@ -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 });
|
|
||||||
}
|
|
||||||
|
|
@ -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`.
|
|
||||||
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/53419
|
||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
struct Foo {
|
struct Foo {
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/7268
|
||||||
//@ check-pass
|
//@ check-pass
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0308]: mismatched types
|
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 }
|
LL | enum A { B, C }
|
||||||
| - unit variant defined here
|
| - unit variant defined here
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
warning: trait `Foo` is never used
|
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 {
|
LL | trait Foo {
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/55376
|
||||||
//@ run-pass
|
//@ run-pass
|
||||||
// Tests that paths in `pub(...)` don't fail HIR verification.
|
// Tests that paths in `pub(...)` don't fail HIR verification.
|
||||||
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/53728
|
||||||
//@ run-pass
|
//@ run-pass
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/7044
|
||||||
static X: isize = 0;
|
static X: isize = 0;
|
||||||
struct X; //~ ERROR the name `X` is defined multiple times
|
struct X; //~ ERROR the name `X` is defined multiple times
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0428]: the name `X` is defined multiple times
|
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;
|
LL | static X: isize = 0;
|
||||||
| -------------------- previous definition of the value `X` here
|
| -------------------- previous definition of the value `X` here
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/55380
|
||||||
//@ run-pass
|
//@ run-pass
|
||||||
#![feature(specialization)]
|
#![feature(specialization)]
|
||||||
//~^ WARN the feature `specialization` is incomplete
|
//~^ WARN the feature `specialization` is incomplete
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
|
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)]
|
LL | #![feature(specialization)]
|
||||||
| ^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/7364
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
|
||||||
// Regression test for issue 7364
|
// Regression test for issue 7364
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0277]: `RefCell<isize>` cannot be shared between threads safely
|
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));
|
LL | static boxed: Box<RefCell<isize>> = Box::new(RefCell::new(0));
|
||||||
| ^^^^^^^^^^^^^^^^^^^ `RefCell<isize>` cannot be shared between threads safely
|
| ^^^^^^^^^^^^^^^^^^^ `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`
|
= 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
|
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));
|
LL | static boxed: Box<RefCell<isize>> = Box::new(RefCell::new(0));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/53568
|
||||||
// Regression test for an NLL-related ICE (#53568) -- we failed to
|
// Regression test for an NLL-related ICE (#53568) -- we failed to
|
||||||
// resolve inference variables in "custom type-ops".
|
// resolve inference variables in "custom type-ops".
|
||||||
//
|
//
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/7344
|
||||||
//@ run-pass
|
//@ run-pass
|
||||||
#![allow(unused_must_use)]
|
#![allow(unused_must_use)]
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue