mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-29 00:00:18 +02:00
Enable diagnostic attributes for Rust 1.78+ (#2693)
This commit is contained in:
+1
-4
@@ -54,6 +54,7 @@ memchr = "2.4.1"
|
||||
mime = "0.3.16"
|
||||
percent-encoding = "2.1"
|
||||
pin-project-lite = "0.2.7"
|
||||
rustversion = "1.0.9"
|
||||
serde = "1.0"
|
||||
sync_wrapper = "1.0.0"
|
||||
tower = { version = "0.4.13", default-features = false, features = ["util"] }
|
||||
@@ -109,16 +110,12 @@ features = [
|
||||
"validate-request",
|
||||
]
|
||||
|
||||
[build-dependencies]
|
||||
rustversion = "1.0.9"
|
||||
|
||||
[dev-dependencies]
|
||||
anyhow = "1.0"
|
||||
axum-macros = { path = "../axum-macros", version = "0.4.1", features = ["__private"] }
|
||||
quickcheck = "1.0"
|
||||
quickcheck_macros = "1.0"
|
||||
reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "multipart"] }
|
||||
rustversion = "1.0.9"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
time = { version = "0.3", features = ["serde-human-readable"] }
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#[rustversion::nightly]
|
||||
fn main() {
|
||||
println!("cargo:rustc-cfg=nightly_error_messages");
|
||||
}
|
||||
|
||||
#[rustversion::not(nightly)]
|
||||
fn main() {}
|
||||
@@ -125,8 +125,8 @@ pub use self::service::HandlerService;
|
||||
/// )));
|
||||
/// # let _: Router = app;
|
||||
/// ```
|
||||
#[cfg_attr(
|
||||
nightly_error_messages,
|
||||
#[rustversion::attr(
|
||||
since(1.78),
|
||||
diagnostic::on_unimplemented(
|
||||
note = "Consider using `#[axum::debug_handler]` to improve the error message"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user