diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-07-14 13:19:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-14 13:19:22 -0700 |
| commit | be5c7abfd6c5d366f90cf5b44543a7af2120852e (patch) | |
| tree | 41bdbb37318928e26a6576bd374cfcd465ec81a2 /src/test/ui/error-codes | |
| parent | 353df59893f4dc249f06047dca659b5b2172063f (diff) | |
| parent | 04298204ed17eeed4d23aaa45fb0db9336e6583c (diff) | |
| download | rust-be5c7abfd6c5d366f90cf5b44543a7af2120852e.tar.gz rust-be5c7abfd6c5d366f90cf5b44543a7af2120852e.zip | |
Rollup merge of #74211 - estebank:struct-pat-as-unit, r=petrochenkov
Structured suggestion when not using struct pattern r? @petrochenkov
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0423.stderr | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/test/ui/error-codes/E0423.stderr b/src/test/ui/error-codes/E0423.stderr index d4860394259..077367de9d8 100644 --- a/src/test/ui/error-codes/E0423.stderr +++ b/src/test/ui/error-codes/E0423.stderr @@ -33,13 +33,16 @@ LL | struct Foo { a: bool }; | ---------------------- `Foo` defined here LL | LL | let f = Foo(); + | ^^^^^ + | +help: a function with a similar name exists + | +LL | let f = foo(); | ^^^ - | | - | did you mean `Foo { /* fields */ }`? - | help: a function with a similar name exists (notice the capitalization): `foo` -... -LL | fn foo() { - | -------- similarly named function `foo` defined here +help: use struct literal syntax instead + | +LL | let f = Foo { a: val }; + | ^^^^^^^^^^^^^^ error[E0423]: expected value, found struct `T` --> $DIR/E0423.rs:14:8 |
