diff options
| author | bors <bors@rust-lang.org> | 2019-10-28 13:41:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-28 13:41:13 +0000 |
| commit | 8d78bf6b273848d17da8f5c92162c6a6b9b10dfd (patch) | |
| tree | 5d19d9a52e7311543dccd0a9e43fe16d63aef336 /src/test/ui/error-codes | |
| parent | 03a50ae9b87021d4a166c70d2c932f1cb0aa8f28 (diff) | |
| parent | b26ddb8af37362e33c45c78c9c91a3c5cdabfe7e (diff) | |
| download | rust-8d78bf6b273848d17da8f5c92162c6a6b9b10dfd.tar.gz rust-8d78bf6b273848d17da8f5c92162c6a6b9b10dfd.zip | |
Auto merge of #65421 - estebank:variants, r=petrochenkov
Point at local similarly named element and tweak references to variants Partially address #65386.
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0164.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0423.stderr | 22 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0424.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0532.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0532.stderr | 4 |
5 files changed, 19 insertions, 13 deletions
diff --git a/src/test/ui/error-codes/E0164.stderr b/src/test/ui/error-codes/E0164.stderr index 0a153d85b42..4bbddb1978c 100644 --- a/src/test/ui/error-codes/E0164.stderr +++ b/src/test/ui/error-codes/E0164.stderr @@ -1,4 +1,4 @@ -error[E0164]: expected tuple struct/variant, found associated constant `<Foo>::B` +error[E0164]: expected tuple struct or tuple variant, found associated constant `<Foo>::B` --> $DIR/E0164.rs:9:9 | LL | Foo::B(i) => i, diff --git a/src/test/ui/error-codes/E0423.stderr b/src/test/ui/error-codes/E0423.stderr index 4e016dbd1c0..09792845d16 100644 --- a/src/test/ui/error-codes/E0423.stderr +++ b/src/test/ui/error-codes/E0423.stderr @@ -26,17 +26,23 @@ help: surround the struct literal with parentheses LL | for _ in (std::ops::Range { start: 0, end: 10 }) {} | ^ ^ -error[E0423]: expected function, found struct `Foo` +error[E0423]: expected function, tuple struct or tuple variant, found struct `Foo` --> $DIR/E0423.rs:4:13 | -LL | struct Foo { a: bool }; - | ---------------------- `Foo` defined here +LL | struct Foo { a: bool }; + | ---------------------- `Foo` defined here LL | -LL | let f = Foo(); - | ^^^ - | | - | did you mean `Foo { /* fields */ }`? - | help: a function with a similar name exists (notice the capitalization): `foo` +LL | let f = Foo(); + | ^^^ + | | + | did you mean `Foo { /* fields */ }`? + | help: a function with a similar name exists (notice the capitalization): `foo` +... +LL | / fn foo() { +LL | | for _ in std::ops::Range { start: 0, end: 10 } {} +LL | | +LL | | } + | |_- similarly named function `foo` defined here error[E0423]: expected value, found struct `T` --> $DIR/E0423.rs:14:8 diff --git a/src/test/ui/error-codes/E0424.stderr b/src/test/ui/error-codes/E0424.stderr index 567d1b3cc75..690a101496d 100644 --- a/src/test/ui/error-codes/E0424.stderr +++ b/src/test/ui/error-codes/E0424.stderr @@ -7,7 +7,7 @@ LL | | self.bar(); LL | | } | |_____- this function doesn't have a `self` parameter -error[E0424]: expected unit struct/variant or constant, found module `self` +error[E0424]: expected unit struct, unit variant or constant, found module `self` --> $DIR/E0424.rs:12:9 | LL | / fn main () { diff --git a/src/test/ui/error-codes/E0532.rs b/src/test/ui/error-codes/E0532.rs index 931ca4628fe..486da0e029e 100644 --- a/src/test/ui/error-codes/E0532.rs +++ b/src/test/ui/error-codes/E0532.rs @@ -3,7 +3,7 @@ fn main() { match SomeStruct(value) { StructConst1(_) => { }, - //~^ ERROR expected tuple struct/variant, found constant `StructConst1` + //~^ ERROR expected tuple struct or tuple variant, found constant `StructConst1` _ => { }, } diff --git a/src/test/ui/error-codes/E0532.stderr b/src/test/ui/error-codes/E0532.stderr index 887ede0a412..eeccadccc63 100644 --- a/src/test/ui/error-codes/E0532.stderr +++ b/src/test/ui/error-codes/E0532.stderr @@ -1,8 +1,8 @@ -error[E0532]: expected tuple struct/variant, found constant `StructConst1` +error[E0532]: expected tuple struct or tuple variant, found constant `StructConst1` --> $DIR/E0532.rs:5:9 | LL | StructConst1(_) => { }, - | ^^^^^^^^^^^^ not a tuple struct/variant + | ^^^^^^^^^^^^ not a tuple struct or tuple variant error: aborting due to previous error |
