Rollup merge of #145676 - Oneirical:uncountable-integer-9, r=jieyouxu
Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#2 of Batch #2] Part of rust-lang/rust#133895 Methodology: 1. Refer to the previously written `tests/ui/SUMMARY.md` 2. Find an appropriate category for the test, using the original issue thread and the test contents. 3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers) 4. Rename the tests to make their purpose clearer Inspired by the methodology that `@Kivooeo` was using. r? `@jieyouxu`
This commit is contained in:
commit
47f1df5ca3
40 changed files with 41 additions and 37 deletions
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/7092
|
||||
enum Whatever {
|
||||
}
|
||||
|
||||
|
|
@ -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`
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/54094
|
||||
//@ check-pass
|
||||
trait Zoo {
|
||||
type X;
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/54462
|
||||
//@ run-pass
|
||||
//
|
||||
//@ compile-flags: -Ccodegen-units=1 -O
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
#![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
|
||||
|
||||
struct Foo {
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/7268
|
||||
//@ check-pass
|
||||
#![allow(dead_code)]
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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 {
|
||||
| ^^^
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/55376
|
||||
//@ run-pass
|
||||
// Tests that paths in `pub(...)` don't fail HIR verification.
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/53728
|
||||
//@ run-pass
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/55380
|
||||
//@ run-pass
|
||||
#![feature(specialization)]
|
||||
//~^ 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
|
||||
--> $DIR/issue-55380.rs:2:12
|
||||
--> $DIR/trait-specialization-default-methods-55380.rs:3:12
|
||||
|
|
||||
LL | #![feature(specialization)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/7364
|
||||
use std::cell::RefCell;
|
||||
|
||||
// Regression test for issue 7364
|
||||
|
|
@ -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));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -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".
|
||||
//
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/7344
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue