Rocket/core/codegen/tests
Sergio Benitez 8166ad0c7c Fix error field names in 'FromForm' derive.
Prior to this commit, the `FromForm` derive could pair the incorrect
field name with a failing validation. The bug was caused by using two
mismatched iterators in a `quote!()` invocation. Specifically, the first
iterator emitted validation calls for all fields that had validation
applied, while the second emitted field names for all fields,
irrespective of whether the field had any validation applied. The two
iterators were effectively zipped to create the final error, creating
the bug.

This commit fixes the issue by correctly matching field names with their
validators at the expense of an additional allocation, necessitated by
the `quote` crate's inability to access subfields in a repetition.

Fixes #2394.
2022-11-11 18:20:06 -08:00
..
ui-fail Avoid more platform dependent errors in UI tests. 2022-05-03 14:33:11 -07:00
ui-fail-nightly Update UI tests for latest nightly. 2022-11-11 18:19:33 -08:00
ui-fail-stable Include stable rust-src diagnostics. 2022-09-01 01:47:02 -07:00
async-entry.rs Revamp shutdown to recover shutdown 'Rocket'. 2022-05-07 06:12:24 -05:00
async-routes.rs Workaround 'rustc' bug, compiling more async code. 2021-08-24 19:46:47 -07:00
catcher.rs Add internal '__typed_stream' proc-macro. 2021-06-01 11:43:51 -07:00
expansion.rs Retrieve managed state via a borrow: '&State<T>'. 2021-05-11 08:58:16 -05:00
from_form_field.rs Allow several 'field' attributes in all derives. 2021-04-07 23:09:05 -07:00
from_form.rs Fix error field names in 'FromForm' derive. 2022-11-11 18:20:06 -08:00
responder.rs Allow named field generics in 'UriDisplay' derive. 2021-07-01 06:02:40 -07:00
route-data.rs Drop 'Data' after sending a response, not before. 2021-06-08 13:26:16 -07:00
route-format.rs Impl 'IntoCollection' for '[T; N]'. 2021-05-22 11:01:00 -07:00
route-ranking.rs Rename 'rocket::ignite()' to 'rocket::build()'. 2021-04-08 01:07:52 -07:00
route-raw.rs Overhaul URI types, parsers, 'uri!' macro. 2021-05-19 18:47:11 -07:00
route.rs Drop 'Data' after sending a response, not before. 2021-06-08 13:26:16 -07:00
segment-ignore.rs Rename 'rocket::ignite()' to 'rocket::build()'. 2021-04-08 01:07:52 -07:00
typed-uris.rs Impl 'FromUriParam' for 'Json'. 2021-07-02 10:36:57 -07:00
ui-fail.rs Remove faulty 'glob' arg in codegen UI tests. 2021-07-18 13:13:50 -07:00
uri_display.rs Allow named field generics in 'UriDisplay' derive. 2021-07-01 06:02:40 -07:00