axum/axum-core
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
..
src Improve compile errors for unimplemented traits (#1436) 2022-11-19 12:45:03 +01:00
build.rs Improve compile errors for unimplemented traits (#1436) 2022-11-19 12:45:03 +01:00
Cargo.toml Improve compile errors for unimplemented traits (#1436) 2022-11-19 12:45:03 +01:00
CHANGELOG.md New release candidates (#1514) 2022-11-09 09:01:47 +01:00
LICENSE Move FromRequest and IntoResponse into new axum-core crate (#564) 2021-11-30 13:46:13 +00:00
README.md Bump MSRV to 1.56 and update to the 2021 edition (#1098) 2022-06-17 20:11:35 +02:00

axum-core

Build status Crates.io Documentation

Core types and traits for axum.

More information about this crate can be found in the crate documentation.

Safety

This crate uses #![forbid(unsafe_code)] to ensure everything is implemented in 100% safe Rust.

Minimum supported Rust version

axum-core's MSRV is 1.56.

Getting Help

You're also welcome to ask in the Discord channel or open an issue with your question.

Contributing

🎈 Thanks for your help improving the project! We are so happy to have you! We have a contributing guide to help you get involved in the axum project.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in axum by you, shall be licensed as MIT, without any additional terms or conditions.