You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Indexing through a view of a view (v: &&Vec[T]) fails: 'cannot infer type parameter' / MIR 'index expression has no Sema element type' #2189
enum Src ephemeral:
One(&Vec[str])
let xs: Vec[str] = ["a".to_owned(), "b".to_owned()]
let s: Src = .One(&xs)
match &s:
.One(v) => print(v[1])
Expected: b.
Actual: a Sema error, or an ICE in MIR (index expression has no Sema element type). check_index peels one reference; MIR already peels every one. Matching a view payload through a view of its enum binds &&Vec[T].
Activity
D44: map traversal observes: keys(), values() and iter() are view ite…
D44: map traversal observes; keys/values/iter are view iterators; Has…
ehartford commentedon Oct 5, 2026
Fixed on main by stack #2196 (merged as efb765c), battery green on a21e326; the regression test for it landed with the fix.