diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-01-12 17:12:41 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-01-12 17:12:41 -0800 |
| commit | db740313e023c76a2b354981e352ebcf6d7d57e2 (patch) | |
| tree | 98c3a12565dac3bfcfe8a08201c3a623e09aa7b9 /src/test | |
| parent | 1550787b13d3e863f06da7c0c9e17ec1dee341df (diff) | |
| download | rust-db740313e023c76a2b354981e352ebcf6d7d57e2.tar.gz rust-db740313e023c76a2b354981e352ebcf6d7d57e2.zip | |
Remove unrelated errors from parse stderr tests
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.rs | 9 | ||||
| -rw-r--r-- | src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.stderr | 17 | ||||
| -rw-r--r-- | src/test/ui/parser/issue-14303-path.rs | 14 | ||||
| -rw-r--r-- | src/test/ui/parser/issue-14303-path.stderr | 34 | ||||
| -rw-r--r-- | src/test/ui/parser/issue-1802-2.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/parser/issue-1802-2.stderr | 13 | ||||
| -rw-r--r-- | src/test/ui/parser/pat-tuple-2.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/parser/pat-tuple-2.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/parser/pat-tuple-3.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/parser/pat-tuple-3.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/parser/tag-variant-disr-non-nullary.rs | 5 | ||||
| -rw-r--r-- | src/test/ui/parser/tag-variant-disr-non-nullary.stderr | 15 |
12 files changed, 35 insertions, 105 deletions
diff --git a/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.rs b/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.rs index 84e242f322c..e9f908d479f 100644 --- a/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.rs +++ b/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.rs @@ -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() {} diff --git a/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.stderr b/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.stderr index a918a5a8d99..452f0ea5e17 100644 --- a/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.stderr +++ b/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.stderr @@ -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 2 previous errors +error: aborting due to previous error -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/parser/issue-14303-path.rs b/src/test/ui/parser/issue-14303-path.rs index a407ed5fee9..8749d46818f 100644 --- a/src/test/ui/parser/issue-14303-path.rs +++ b/src/test/ui/parser/issue-14303-path.rs @@ -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() {} diff --git a/src/test/ui/parser/issue-14303-path.stderr b/src/test/ui/parser/issue-14303-path.stderr index 4c968fceb9d..07e4441b0de 100644 --- a/src/test/ui/parser/issue-14303-path.stderr +++ b/src/test/ui/parser/issue-14303-path.stderr @@ -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[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 +error: aborting due to 2 previous errors -Some errors occurred: E0261, E0433. -For more information about an error, try `rustc --explain E0261`. diff --git a/src/test/ui/parser/issue-1802-2.rs b/src/test/ui/parser/issue-1802-2.rs index 2fca41a83d4..3c34b0d8feb 100644 --- a/src/test/ui/parser/issue-1802-2.rs +++ b/src/test/ui/parser/issue-1802-2.rs @@ -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 } diff --git a/src/test/ui/parser/issue-1802-2.stderr b/src/test/ui/parser/issue-1802-2.stderr index 92fce75f8c3..8491dd07cb7 100644 --- a/src/test/ui/parser/issue-1802-2.stderr +++ b/src/test/ui/parser/issue-1802-2.stderr @@ -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 2 previous errors +error: aborting due to previous error -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/parser/pat-tuple-2.rs b/src/test/ui/parser/pat-tuple-2.rs index 574cb6045dc..fd25499381a 100644 --- a/src/test/ui/parser/pat-tuple-2.rs +++ b/src/test/ui/parser/pat-tuple-2.rs @@ -1,7 +1,6 @@ fn main() { - match 0 { + match (0, 1, 2) { (pat, ..,) => {} //~^ ERROR trailing comma is not permitted after `..` - //~| ERROR mismatched types } } diff --git a/src/test/ui/parser/pat-tuple-2.stderr b/src/test/ui/parser/pat-tuple-2.stderr index 178be83d9bf..c3a5c39a8e3 100644 --- a/src/test/ui/parser/pat-tuple-2.stderr +++ b/src/test/ui/parser/pat-tuple-2.stderr @@ -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 2 previous errors +error: aborting due to previous error -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/parser/pat-tuple-3.rs b/src/test/ui/parser/pat-tuple-3.rs index 33edb0007e7..e1e975d3c3e 100644 --- a/src/test/ui/parser/pat-tuple-3.rs +++ b/src/test/ui/parser/pat-tuple-3.rs @@ -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 } } diff --git a/src/test/ui/parser/pat-tuple-3.stderr b/src/test/ui/parser/pat-tuple-3.stderr index fcb657393b8..0ad7d27b94e 100644 --- a/src/test/ui/parser/pat-tuple-3.stderr +++ b/src/test/ui/parser/pat-tuple-3.stderr @@ -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 2 previous errors +error: aborting due to previous error -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/parser/tag-variant-disr-non-nullary.rs b/src/test/ui/parser/tag-variant-disr-non-nullary.rs index 8f5453d06f3..83a3b727982 100644 --- a/src/test/ui/parser/tag-variant-disr-non-nullary.rs +++ b/src/test/ui/parser/tag-variant-disr-non-nullary.rs @@ -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() {} diff --git a/src/test/ui/parser/tag-variant-disr-non-nullary.stderr b/src/test/ui/parser/tag-variant-disr-non-nullary.stderr index 7088352f803..cc6312b4545 100644 --- a/src/test/ui/parser/tag-variant-disr-non-nullary.stderr +++ b/src/test/ui/parser/tag-variant-disr-non-nullary.stderr @@ -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 2 previous errors +error: aborting due to previous error -For more information about this error, try `rustc --explain E0277`. |
