Compile failed for v-0.2.7 error[E0015]

Open
#554 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
rust
Domain
networking

Research direction

Reproduce the compilation failure and inspect /root/.cargo/registry/src/github.com-1ecc6299db9ec823/http-0.2.7/src/header/name.rs, especially the standard_headers! macro invocation around the reported line. Confirm the relevant Rust and http versions, then verify that the project compiles without error after the compatibility issue is addressed.

Written by the indexing model from the issue text.

Description

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)

Dominant language
Rust
Stars
1.4k
Forks
378
Avg merge
1d 21h
Merged PRs (30d)
5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hyperium/http

All issues in hyperium/http

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.