Remove unrelated errors from parse stderr tests
This commit is contained in:
parent
1550787b13
commit
db740313e0
12 changed files with 35 additions and 105 deletions
|
|
@ -5,11 +5,8 @@
|
|||
struct RefIntPair<'a, 'b>(&'a u32, &'b u32);
|
||||
|
||||
fn hof_lt<Q>(_: Q)
|
||||
where Q: for <#[rustc_1] 'a, 'b, #[oops]> Fn(RefIntPair<'a,'b>) -> &'b u32
|
||||
where Q: for <#[allow(unused)] 'a, 'b, #[oops]> Fn(RefIntPair<'a,'b>) -> &'b u32
|
||||
//~^ ERROR trailing attribute after lifetime parameters
|
||||
//~| ERROR unless otherwise specified, attributes with the prefix `rustc_` are reserved for
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
fn main() {
|
||||
}
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,8 @@
|
|||
error: trailing attribute after lifetime parameters
|
||||
--> $DIR/attrs-with-no-formal-in-generics-3.rs:8:38
|
||||
--> $DIR/attrs-with-no-formal-in-generics-3.rs:8:44
|
||||
|
|
||||
LL | where Q: for <#[rustc_1] 'a, 'b, #[oops]> Fn(RefIntPair<'a,'b>) -> &'b u32
|
||||
| ^^^^^^^ attributes must go before parameters
|
||||
LL | where Q: for <#[allow(unused)] 'a, 'b, #[oops]> Fn(RefIntPair<'a,'b>) -> &'b u32
|
||||
| ^^^^^^^ attributes must go before parameters
|
||||
|
||||
error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics (see issue #29642)
|
||||
--> $DIR/attrs-with-no-formal-in-generics-3.rs:8:19
|
||||
|
|
||||
LL | where Q: for <#[rustc_1] 'a, 'b, #[oops]> Fn(RefIntPair<'a,'b>) -> &'b u32
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
= help: add #![feature(rustc_attrs)] to the crate attributes to enable
|
||||
error: aborting due to previous error
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
fn bar<'a, T>(x: mymodule::X<'a, T, 'b, 'c>) {}
|
||||
mod foo {
|
||||
pub struct X<'a, 'b, 'c, T> {
|
||||
a: &'a str,
|
||||
b: &'b str,
|
||||
c: &'c str,
|
||||
t: T,
|
||||
}
|
||||
}
|
||||
|
||||
fn bar<'a, 'b, 'c, T>(x: foo::X<'a, T, 'b, 'c>) {}
|
||||
//~^ ERROR lifetime parameters must be declared prior to type parameters
|
||||
//~| ERROR lifetime parameters must be declared prior to type parameters
|
||||
//~| ERROR failed to resolve: use of undeclared type or module `mymodule`
|
||||
//~| ERROR use of undeclared lifetime name `'b`
|
||||
//~| ERROR use of undeclared lifetime name `'c`
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -1,34 +1,14 @@
|
|||
error: lifetime parameters must be declared prior to type parameters
|
||||
--> $DIR/issue-14303-path.rs:1:37
|
||||
--> $DIR/issue-14303-path.rs:10:40
|
||||
|
|
||||
LL | fn bar<'a, T>(x: mymodule::X<'a, T, 'b, 'c>) {}
|
||||
| ^^ must be declared prior to type parameters
|
||||
LL | fn bar<'a, 'b, 'c, T>(x: foo::X<'a, T, 'b, 'c>) {}
|
||||
| ^^ must be declared prior to type parameters
|
||||
|
||||
error: lifetime parameters must be declared prior to type parameters
|
||||
--> $DIR/issue-14303-path.rs:1:41
|
||||
--> $DIR/issue-14303-path.rs:10:44
|
||||
|
|
||||
LL | fn bar<'a, T>(x: mymodule::X<'a, T, 'b, 'c>) {}
|
||||
| ^^ must be declared prior to type parameters
|
||||
LL | fn bar<'a, 'b, 'c, T>(x: foo::X<'a, T, 'b, 'c>) {}
|
||||
| ^^ must be declared prior to type parameters
|
||||
|
||||
error[E0433]: failed to resolve: use of undeclared type or module `mymodule`
|
||||
--> $DIR/issue-14303-path.rs:1:18
|
||||
|
|
||||
LL | fn bar<'a, T>(x: mymodule::X<'a, T, 'b, 'c>) {}
|
||||
| ^^^^^^^^ use of undeclared type or module `mymodule`
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
error[E0261]: use of undeclared lifetime name `'b`
|
||||
--> $DIR/issue-14303-path.rs:1:37
|
||||
|
|
||||
LL | fn bar<'a, T>(x: mymodule::X<'a, T, 'b, 'c>) {}
|
||||
| ^^ undeclared lifetime
|
||||
|
||||
error[E0261]: use of undeclared lifetime name `'c`
|
||||
--> $DIR/issue-14303-path.rs:1:41
|
||||
|
|
||||
LL | fn bar<'a, T>(x: mymodule::X<'a, T, 'b, 'c>) {}
|
||||
| ^^ undeclared lifetime
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
Some errors occurred: E0261, E0433.
|
||||
For more information about an error, try `rustc --explain E0261`.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ fn log(a: i32, b: i32) {}
|
|||
|
||||
fn main() {
|
||||
let error = 42;
|
||||
log(error, 0b_usize);
|
||||
log(error, 0b);
|
||||
//~^ ERROR no valid digits found for number
|
||||
//~| ERROR mismatched types
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,8 @@
|
|||
error: no valid digits found for number
|
||||
--> $DIR/issue-1802-2.rs:5:16
|
||||
|
|
||||
LL | log(error, 0b_usize);
|
||||
| ^^^
|
||||
LL | log(error, 0b);
|
||||
| ^^
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-1802-2.rs:5:16
|
||||
|
|
||||
LL | log(error, 0b_usize);
|
||||
| ^^^^^^^^ expected i32, found usize
|
||||
error: aborting due to previous error
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
fn main() {
|
||||
match 0 {
|
||||
match (0, 1, 2) {
|
||||
(pat, ..,) => {}
|
||||
//~^ ERROR trailing comma is not permitted after `..`
|
||||
//~| ERROR mismatched types
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,15 +4,5 @@ error: trailing comma is not permitted after `..`
|
|||
LL | (pat, ..,) => {}
|
||||
| ^ trailing comma is not permitted after `..`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/pat-tuple-2.rs:3:9
|
||||
|
|
||||
LL | (pat, ..,) => {}
|
||||
| ^^^^^^^^^^ expected integer, found tuple
|
||||
|
|
||||
= note: expected type `{integer}`
|
||||
found type `(_,)`
|
||||
error: aborting due to previous error
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
fn main() {
|
||||
match 0 {
|
||||
match (0, 1, 2) {
|
||||
(.., pat, ..) => {}
|
||||
//~^ ERROR `..` can only be used once per tuple or tuple struct pattern
|
||||
//~| ERROR mismatched types
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,15 +4,5 @@ error: `..` can only be used once per tuple or tuple struct pattern
|
|||
LL | (.., pat, ..) => {}
|
||||
| ^^ can only be used once per pattern
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/pat-tuple-3.rs:3:9
|
||||
|
|
||||
LL | (.., pat, ..) => {}
|
||||
| ^^^^^^^^^^^^^ expected integer, found tuple
|
||||
|
|
||||
= note: expected type `{integer}`
|
||||
found type `(_,)`
|
||||
error: aborting due to previous error
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
enum Color {
|
||||
Red = 0xff0000,
|
||||
//~^ ERROR discriminator values can only be used with a field-less enum
|
||||
|
|
@ -6,9 +5,7 @@ enum Color {
|
|||
Blue = 0x0000ff,
|
||||
Black = 0x000000,
|
||||
White = 0xffffff,
|
||||
Other (str),
|
||||
//~^ ERROR the size for values of type
|
||||
// the above is kept in order to verify that we get beyond parse errors
|
||||
Other(usize),
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: discriminator values can only be used with a field-less enum
|
||||
--> $DIR/tag-variant-disr-non-nullary.rs:3:11
|
||||
--> $DIR/tag-variant-disr-non-nullary.rs:2:11
|
||||
|
|
||||
LL | Red = 0xff0000,
|
||||
| ^^^^^^^^ only valid in field-less enums
|
||||
|
|
@ -13,16 +13,5 @@ LL | Black = 0x000000,
|
|||
LL | White = 0xffffff,
|
||||
| ^^^^^^^^ only valid in field-less enums
|
||||
|
||||
error[E0277]: the size for values of type `str` cannot be known at compilation time
|
||||
--> $DIR/tag-variant-disr-non-nullary.rs:9:12
|
||||
|
|
||||
LL | Other (str),
|
||||
| ^^^ doesn't have a size known at compile-time
|
||||
|
|
||||
= help: the trait `std::marker::Sized` is not implemented for `str`
|
||||
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
|
||||
= note: no field of an enum variant may have a dynamically sized type
|
||||
error: aborting due to previous error
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue