`super let` is allowed in nonsensical positions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I tried this code:
#![feature(super_let)]
fn f() {
super let a = 1;
}
fn g() {
loop {
super let b = 2;
}
}
fn h() {
while {
super let c = 3;
false
} {}
}
I expected all three functions to fail to compile, since super let is used in places that don't make sense. However, they compiled without errors. (As far as I can tell, these super let bindings behave exactly like normal let bindings.)
@rustbot labels +F-super_let
Meta
Reproducible on the playground with 1.89.0-nightly (2025-06-09 d13a431a6cc69cd65efe)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the three snippets from the issue on the Rust nightly playground and compare how super let behaves in each position. Trace the compiler's handling of super let from the resulting diagnostics or implementation entry point, then add coverage showing that these nonsensical positions are rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100