rust-lang / rust-lang/rust

E0794 has a seemingly incorrect definition of "late bound lifetime parameter"

Open
#139,652 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-docs T-compiler T-lang
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Location

https://doc.rust-lang.org/stable/error_codes/E0794.html

Summary

The docs say that a lifetime parameter must appear in an argument to be considered "late bound", but the following snippet emits E0794:

fn foo<'a>() {
    
}

fn bar() {
    let _ = foo::<'static>();
}

Contributor guide

Open the contributing guide

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.

Research direction

Start at the E0794 documentation page linked in the issue and compile the provided Rust snippet to confirm its behavior. Compare the definition of a late-bound lifetime parameter with the compiler result, then update the wording so the documentation accurately explains this case and verify the example still reflects the corrected explanation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.