about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-09-29 20:34:12 +0200
committerGitHub <noreply@github.com>2019-09-29 20:34:12 +0200
commit0a2ddcc3464f53c23ffc5d3e904ba909753fe341 (patch)
tree818e4fc0cdfb6b6c9954a86d5b89d35a9f4eb49a /src/test/ui/error-codes
parent06c68947ad88f22a8342fe6b54dc0fe54de6e011 (diff)
parent2ae90165534f18aa5020ae84f5e3768e99139069 (diff)
Rollup merge of #64691 - estebank:unexpected-variant, r=Centril
Point at definition when misusing ADT

When given `struct Foo(usize)` and using it as `Foo {}` or `Foo`, point at `Foo`'s definition in the error.
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0423.stderr3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0423.stderr b/src/test/ui/error-codes/E0423.stderr
index ec240003f91..ce631ca4bf7 100644
--- a/src/test/ui/error-codes/E0423.stderr
+++ b/src/test/ui/error-codes/E0423.stderr
@@ -27,6 +27,9 @@ LL |     for _ in (std::ops::Range { start: 0, end: 10 }) {}
 error[E0423]: expected function, found struct `Foo`
   --> $DIR/E0423.rs:4:13
    |
+LL |     struct Foo { a: bool };
+   |     ---------------------- `Foo` defined here
+LL | 
 LL |     let f = Foo();
    |             ^^^
    |             |