axum/axum-macros/tests/debug_handler/fail
Georg Semmler d5de3bc7e3
Improve compile errors for unimplemented traits (#1436)
* Improve `debug_handler` to use the correct span for specific bounds

This results in better localised error messages, as they now point
directly to the corresponding argument instead of to the macro itself.

* Improve some error messages behind a `nightly-error-messages` feature
flag

This uses the nightly only `rustc_on_unimplemented` attribute to improve
some error messages when users try to use invalid handler functions.
This should be seen as prove of concept, not as full solution for all
potential error cases.

The underlying feature is currently marked as permanently unstable, but
I'm working on getting this specific attribute (or an attribute with
different name, similar functionality) ready to work on a stable compiler.

* Apply suggestions from code review

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

* Enable the `nightly-error-messages` feature unconditionally for nightly compilers

* Use a nightly compiler to run the axum-marcos compile fail tests

* update to newer nightly

* Run axum-macros tests on nightly

* tweak compile error hints a bit

* more tweaks

* update test

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-11-19 12:45:03 +01:00
..
.gitkeep Move axum-debug into axum-macros (#724) 2022-01-26 23:27:22 +01:00
argument_not_extractor.rs Move axum-debug into axum-macros (#724) 2022-01-26 23:27:22 +01:00
argument_not_extractor.stderr Improve compile errors for unimplemented traits (#1436) 2022-11-19 12:45:03 +01:00
doesnt_implement_from_request_parts.rs Generate correct bound for non-last extractor in #[debug_handler] (#1299) 2022-08-22 15:34:17 +02:00
doesnt_implement_from_request_parts.stderr Improve compile errors for unimplemented traits (#1436) 2022-11-19 12:45:03 +01:00
duplicate_args.rs Support changing state type in #[debug_handler] (#1271) 2022-08-18 11:41:14 +02:00
duplicate_args.stderr Support changing state type in #[debug_handler] (#1271) 2022-08-18 11:41:14 +02:00
extract_self_mut.rs Only allow last extractor to mutate the request (#1272) 2022-08-22 12:23:20 +02:00
extract_self_mut.stderr Only allow last extractor to mutate the request (#1272) 2022-08-22 12:23:20 +02:00
extract_self_ref.rs Only allow last extractor to mutate the request (#1272) 2022-08-22 12:23:20 +02:00
extract_self_ref.stderr Only allow last extractor to mutate the request (#1272) 2022-08-22 12:23:20 +02:00
generics.rs Avoid unhelpful compiler suggestion (#1251) 2022-08-12 10:06:38 +00:00
generics.stderr Avoid unhelpful compiler suggestion (#1251) 2022-08-12 10:06:38 +00:00
invalid_attrs.rs Move axum-debug into axum-macros (#724) 2022-01-26 23:27:22 +01:00
invalid_attrs.stderr Support changing state type in #[debug_handler] (#1271) 2022-08-18 11:41:14 +02:00
multiple_paths.rs Check Request and Path in debug_handler (#1035) 2022-05-16 10:05:17 +00:00
multiple_paths.stderr Check Request and Path in debug_handler (#1035) 2022-05-16 10:05:17 +00:00
not_a_function.rs Move axum-debug into axum-macros (#724) 2022-01-26 23:27:22 +01:00
not_a_function.stderr Move axum-debug into axum-macros (#724) 2022-01-26 23:27:22 +01:00
not_async.rs Move axum-debug into axum-macros (#724) 2022-01-26 23:27:22 +01:00
not_async.stderr Move axum-debug into axum-macros (#724) 2022-01-26 23:27:22 +01:00
not_send.rs Move axum-debug into axum-macros (#724) 2022-01-26 23:27:22 +01:00
not_send.stderr Improve compile errors for unimplemented traits (#1436) 2022-11-19 12:45:03 +01:00
too_many_extractors.rs Check for multiple body extractors in debug_handler (#1036) 2022-05-16 14:11:40 +00:00
too_many_extractors.stderr Check for multiple body extractors in debug_handler (#1036) 2022-05-16 14:11:40 +00:00
wrong_return_type.rs Move axum-debug into axum-macros (#724) 2022-01-26 23:27:22 +01:00
wrong_return_type.stderr Rework Form and Query rejections (#1496) 2022-11-08 20:31:06 +00:00