regression: infallible residual could not convert error · Issue #86831 · rust-la...
source link: https://github.com/rust-lang/rust/issues/86831
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
For the sierra thing, it looks like this is a place where they unwittingly used never type on stable, and that's the core of why it changed. There was actually one place that hit this in the compiler (see the conversation in https://rust-lang.zulipchat.com/#narrow/stream/259160-t-lang.2Fproject-never-type/topic/Coercions.20of.20other.20uninhabited.20types/near/220030226) but that was a place using #![feature(never_type)]
so when the previous crater run didn't hit it anywhere else I'd thought it wasn't a thing that would happen in stable :/
The code that broke is
let total_size_usize = group_size_usize .checked_mul(info.groups.len()) .ok_or_else(host_memory_space_overlow)?;
where the function is
pub fn host_memory_space_overlow() -> ! { panic!("Memory address space overlow") }
It actually works fine if it's changed to
.ok_or_else(|| host_memory_space_overlow())?;
I'll send them a PR. (Edit: zakarumych/sierra#3 -- which is now merged.)
Aside: This is one of those spots that I think could be nice with let
-else
, since it would emphasize that the function called diverges:
let Some(total_size_usize) = group_size_usize .checked_mul(info.groups.len()) else { host_memory_space_overlow() };
The dhall one is known, and I sent an (incorrect) PR Nadrieril/dhall-rust#213 for it, and it was fixed back in March with Nadrieril/dhall-rust@846c14f
So twelf should also be fixed as of bnjjj/twelf@3ad9fc5 (thought it's not clear to me what version that would be)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK