Static lifetimes and variance: Associated const treated differently (and perhaps incorrectly?) #80052
Labels
A-associated-items
Area: Associated items such as associated types and consts.
A-lifetimes
Area: lifetime related
A-typesystem
Area: The type system
A-variance
Area: Variance (https://doc.rust-lang.org/nomicon/subtyping.html)
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
If the line after
this does not work
is commented out, the remaining code does compile.If there is any other reason why the
const
can’t work, while the function can, then the error message is misleading.(Playground)
Errors:
Applies to stable as well as the current nightly (
1.50.0-nightly (fa4163942 2020-12-14)
)⟶ originally from this discussion on URLO
@rustbot modify labels: C-bug, T-lang, T-compiler, A-associated-items, A-lifetimes, A-typesystem
The text was updated successfully, but these errors were encountered: