News for hackers. Stuff that matters.
Re:Stabilizing Rust's Never Type by dlubarov on Saturday September 12, 2026 @04:52PM (#49677079)
Moreover, Rust traits' associated constants/types get in the way of having a proper bottom type. What would <! as Iterator>::Item be? (In Scala I think it just doesn't compile?)
Re:Stabilizing Rust's Never Type by SkiFire13 on Saturday September 12, 2026 @06:57PM (#49678085)
Not only that, if you have `trait Foo: Iterator<Item = u8>` and `trait Bar: Iterator<Item = i32>` how could `!` implement both of them? It would simply make the language incoherent.
Re:Stabilizing Rust's Never Type by 10000truths on Saturday September 12, 2026 @07:17PM (#49678226)
> What would <! as Iterator>::Item be?

Another ! makes sense to me here. Are there any cases where it doesn't work to auto-assign ! to all associated types of a ! trait impl? Associated constants might require some mechanism similar to `compile_error!()`.