clean up some tests
This commit is contained in:
parent
3815b05ccd
commit
2dbcc72d85
16 changed files with 45 additions and 35 deletions
|
|
@ -1,3 +1,4 @@
|
|||
//! regression test for <https://github.com/rust-lang/rust/issues/16819>
|
||||
//@ run-pass
|
||||
#![allow(unused_variables)]
|
||||
// `#[cfg]` on struct field permits empty unusable struct
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//! regression test for <https://github.com/rust-lang/rust/issues/74564>
|
||||
//@ build-pass
|
||||
// ignore-tidy-filelength
|
||||
#![crate_type = "rlib"]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
//! regression test for <https://github.com/rust-lang/rust/issues/47715>
|
||||
|
||||
trait Foo {}
|
||||
|
||||
trait Bar<T> {}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0562]: `impl Trait` is not allowed in generics
|
||||
--> $DIR/issue-47715.rs:9:37
|
||||
--> $DIR/impl-trait-in-generic-param.rs:11:37
|
||||
|
|
||||
LL | struct Container<T: Iterable<Item = impl Foo>> {
|
||||
| ^^^^^^^^
|
||||
|
|
@ -7,7 +7,7 @@ LL | struct Container<T: Iterable<Item = impl Foo>> {
|
|||
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
||||
|
||||
error[E0562]: `impl Trait` is not allowed in generics
|
||||
--> $DIR/issue-47715.rs:14:30
|
||||
--> $DIR/impl-trait-in-generic-param.rs:16:30
|
||||
|
|
||||
LL | enum Enum<T: Iterable<Item = impl Foo>> {
|
||||
| ^^^^^^^^
|
||||
|
|
@ -15,7 +15,7 @@ LL | enum Enum<T: Iterable<Item = impl Foo>> {
|
|||
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
||||
|
||||
error[E0562]: `impl Trait` is not allowed in generics
|
||||
--> $DIR/issue-47715.rs:19:32
|
||||
--> $DIR/impl-trait-in-generic-param.rs:21:32
|
||||
|
|
||||
LL | union Union<T: Iterable<Item = impl Foo> + Copy> {
|
||||
| ^^^^^^^^
|
||||
|
|
@ -23,7 +23,7 @@ LL | union Union<T: Iterable<Item = impl Foo> + Copy> {
|
|||
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
||||
|
||||
error[E0562]: `impl Trait` is not allowed in generics
|
||||
--> $DIR/issue-47715.rs:24:30
|
||||
--> $DIR/impl-trait-in-generic-param.rs:26:30
|
||||
|
|
||||
LL | type Type<T: Iterable<Item = impl Foo>> = T;
|
||||
| ^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
fn foo<#[derive(Debug)] T>() { //~ ERROR expected non-macro attribute, found attribute macro
|
||||
match 0 {
|
||||
#[derive(Debug)] //~ ERROR expected non-macro attribute, found attribute macro
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/issue-49934-errors.rs:1:10
|
||||
|
|
||||
LL | fn foo<#[derive(Debug)] T>() {
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/issue-49934-errors.rs:3:11
|
||||
|
|
||||
LL | #[derive(Debug)]
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
@ -1 +1,2 @@
|
|||
//! auxiliary crate for <https://github.com/rust-lang/rust/issues/11529>
|
||||
pub struct A<'a>(pub &'a isize);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//! regression test for <https://github.com/rust-lang/rust/issues/17068>
|
||||
//@ run-pass
|
||||
// Test that regionck creates the right region links in the pattern
|
||||
// binding of a for loop
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
//! regression test for <https://github.com/rust-lang/rust/issues/11529>
|
||||
//@ run-pass
|
||||
//@ aux-build:issue-11529.rs
|
||||
//@ aux-build:lifetime-inference-across-mods.rs
|
||||
|
||||
|
||||
extern crate issue_11529 as a;
|
||||
extern crate lifetime_inference_across_mods as a;
|
||||
|
||||
fn main() {
|
||||
let one = 1;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//! regression test for <https://github.com/rust-lang/rust/issues/11681>
|
||||
// This tests verifies that unary structs and enum variants
|
||||
// are treated as rvalues and their lifetime is not bounded to
|
||||
// the static scope.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0515]: cannot return value referencing temporary value
|
||||
--> $DIR/issue-11681.rs:13:10
|
||||
--> $DIR/unit-struct-as-rvalue.rs:14:10
|
||||
|
|
||||
LL | let testValue = &Test;
|
||||
| ---- temporary value created here
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//! regression test for <https://github.com/rust-lang/rust/issues/17877>
|
||||
//@ run-pass
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//! regression test for <https://github.com/rust-lang/rust/issues/16648>
|
||||
//@ run-pass
|
||||
fn main() {
|
||||
let x: (isize, &[isize]) = (2, &[1, 2]);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
//! regression test for <https://github.com/rust-lang/rust/issues/49934>
|
||||
|
||||
#![feature(stmt_expr_attributes)]
|
||||
|
||||
fn foo<#[derive(Debug)] T>() { //~ ERROR expected non-macro attribute, found attribute macro
|
||||
match 0 {
|
||||
#[derive(Debug)] //~ ERROR expected non-macro attribute, found attribute macro
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// fold_stmt (Item)
|
||||
#[allow(dead_code)]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,17 @@
|
|||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/derive-macro-invalid-placement.rs:5:10
|
||||
|
|
||||
LL | fn foo<#[derive(Debug)] T>() {
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/derive-macro-invalid-placement.rs:7:11
|
||||
|
|
||||
LL | #[derive(Debug)]
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
|
||||
--> $DIR/issue-49934.rs:10:5
|
||||
--> $DIR/derive-macro-invalid-placement.rs:19:5
|
||||
|
|
||||
LL | #[derive(Debug)]
|
||||
| ^^^^^^^^^^^^^^^^ not applicable here
|
||||
|
|
@ -7,7 +19,7 @@ LL | println!("Hello, world!");
|
|||
| -------------------------- not a `struct`, `enum` or `union`
|
||||
|
||||
error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
|
||||
--> $DIR/issue-49934.rs:14:5
|
||||
--> $DIR/derive-macro-invalid-placement.rs:23:5
|
||||
|
|
||||
LL | #[derive(Debug)]
|
||||
| ^^^^^^^^^^^^^^^^ not applicable here
|
||||
|
|
@ -15,7 +27,7 @@ LL | "Hello, world!";
|
|||
| ---------------- not a `struct`, `enum` or `union`
|
||||
|
||||
error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
|
||||
--> $DIR/issue-49934.rs:18:5
|
||||
--> $DIR/derive-macro-invalid-placement.rs:27:5
|
||||
|
|
||||
LL | #[derive(Debug)]
|
||||
| ^^^^^^^^^^^^^^^^ not applicable here
|
||||
|
|
@ -23,7 +35,7 @@ LL | let _ = "Hello, world!";
|
|||
| ------------------------ not a `struct`, `enum` or `union`
|
||||
|
||||
error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
|
||||
--> $DIR/issue-49934.rs:22:13
|
||||
--> $DIR/derive-macro-invalid-placement.rs:31:13
|
||||
|
|
||||
LL | let _ = #[derive(Debug)] "Hello, world!";
|
||||
| ^^^^^^^^^^^^^^^^ --------------- not a `struct`, `enum` or `union`
|
||||
|
|
@ -31,13 +43,13 @@ LL | let _ = #[derive(Debug)] "Hello, world!";
|
|||
| not applicable here
|
||||
|
||||
error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
|
||||
--> $DIR/issue-49934.rs:27:9
|
||||
--> $DIR/derive-macro-invalid-placement.rs:36:9
|
||||
|
|
||||
LL | #[derive(Debug)]
|
||||
| ^^^^^^^^^^^^^^^^ not applicable here
|
||||
LL | "Hello, world!",
|
||||
| --------------- not a `struct`, `enum` or `union`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
error: aborting due to 7 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0774`.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//! regression test for <https://github.com/rust-lang/rust/issues/18353>
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
// Test that wrapping an unsized struct in an enum which gets optimised does
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue