Rollup merge of #70331 - jeremystucki:privacy, r=estebank

Increase verbosity when using update syntax with private fields

Resolves #70323
This commit is contained in:
Mazdak Farrokhzad 2020-03-25 06:45:27 +01:00 committed by GitHub
commit d03c02a589
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View file

@ -2,7 +2,7 @@ error[E0451]: field `secret_uid` of struct `foo::S` is private
--> $DIR/functional-struct-update-respects-privacy.rs:28:49
|
LL | let s_2 = foo::S { b: format!("ess two"), ..s_1 }; // FRU ...
| ^^^ private field
| ^^^ field `secret_uid` is private
error: aborting due to previous error