Commit Graph
10 Commits
Author SHA1 Message Date
Jonas Platte 391f2deccd core: Fix compile errors from __log_rejection (#2933) 2024-09-25 03:44:35 -04:00
Benno van den Berg 50274725cb Resolve clippies (#2843) 2024-07-24 00:07:25 +02:00
David Mládek 3569950a2e Make nightly_error_messages feature compatible with latest nightly 2024-03-14 21:19:03 +01:00
Georg Semmler 2f6200dfbd Use the diagnostic namespace (#2246) 2023-09-29 09:25:26 +02:00
Jonas Platte ff3884aa41 Silence error from enabling nightly_error_messages 2023-08-08 11:27:45 +02:00
David Pedersen 39bb28130d Enable println warning (#1929) 2023-04-14 22:26:56 +02:00
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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: David Pedersen <[email protected]>
2022-11-19 12:45:03 +01:00
Jonas PlatteandDavid Pedersen b94248191e Add RequestExt::{with_limited_body, into_limited_body} (#1420)
* Move RequestExt and RequestPartsExt into axum-core

* Add RequestExt::into_limited_body

… and use it for Bytes extraction.

* Add RequestExt::with_limited_body

… and use it for Multipart extraction.

Co-authored-by: David Pedersen <[email protected]>
2022-09-28 20:20:47 +00:00
Jonas Platte 8c31bee9bc docsrs cfg fixes (#1137)
* Remove unused attribute in axum-core

* Fix docs.rs package metadata for axum-extra
2022-07-01 13:35:52 +02:00
David Pedersen 254d8fde17 Move FromRequest and IntoResponse into new axum-core crate (#564)
* Move `IntoResponse` to axum-core

* Move `FromRequest` to axum-core

* some clean up

* Remove hyper dependency from axum-core

* Fix docs reference

* Use default

* Update changelog

* Remove mention of default type
2021-11-30 13:46:13 +00:00