hyperium / http

Rust HTTP types
Apache License 2.0
1.14k stars 284 forks source link

Compile failed for v-0.2.7 error[E0015] #554

Open KunPengRen opened 2 years ago

KunPengRen commented 2 years ago
error[E0015]: calls in constant functions are limited to constant functions, tuple structs and tuple variants --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/http-0.2.7/src/header/name.rs:98:25 98 $name_bytes => Some(StandardHeader::$konst), ^^^^^^^^^^^ ... 154 / standard_headers! { 155 /// Advertises which content types the client is able to understand. 156 /// 157 /// The Accept request HTTP header advertises which content types, expressed ... 972 (XXssProtection, X_XSS_PROTECTION, b"x-xss-protection"); 973 } _- in this macro invocation
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
robjtede commented 2 years ago

Can you show what rust version you're using?