Skip to content

regression: infallible residual could not convert error #86831

Closed
@Mark-Simulacrum

Description

@Mark-Simulacrum
Member

I assume this is something subtle in the new Try trait -- would be good to investigate. Looks like only one case found in crater, so probably not too big a deal, but ideally we'd have zero regressions from the new design.

cc @scottmcm

Activity

added
T-libsRelevant to the library team, which will review and decide on the PR/issue.
on Jul 2, 2021
added this to the 1.54.0 milestone on Jul 2, 2021
added
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on Jul 2, 2021
Mark-Simulacrum

Mark-Simulacrum commented on Jul 2, 2021

@Mark-Simulacrum
MemberAuthor

I'll put https://crater-reports.s3.amazonaws.com/beta-1.54-rustdoc-1/beta-2021-06-23/reg/twelf-0.1.7/log.txt under this issue for now as well since it looks like it caused by the try migration as well, though maybe distinct. Is that intentionally broken? I recall discussions about the NoneError conversions...

the8472

the8472 commented on Jul 3, 2021

@the8472
Member

Is that intentionally broken? I recall discussions about the NoneError conversions...

Looks like it #46871 (comment)

scottmcm

scottmcm commented on Jul 3, 2021

@scottmcm
Member

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")
}

Repro: https://play.rust-lang.org/?version=beta&mode=debug&edition=2018&gist=f90e3876b81fc12b185284b5006457ba

It actually works fine if it's changed to

.ok_or_else(|| host_memory_space_overlow())?;

https://play.rust-lang.org/?version=beta&mode=debug&edition=2018&gist=f4b06b729fc59aa3226e64b1deaaaf4b

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)

yaahc

yaahc commented on Jul 14, 2021

@yaahc
Member

We discussed this in today's @rust-lang/libs meeting and decided that since we already approved this breakage during the RFC and the breakage has already been fixed in the repo that was caught by crater we're happy with the current status and should close this issue.

@rfcbot close

rfcbot

rfcbot commented on Jul 14, 2021

@rfcbot
Collaborator

Team member @yaahc has proposed to close this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

added
proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
on Jul 14, 2021

16 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P-mediumMedium priorityT-libsRelevant to the library team, which will review and decide on the PR/issue.disposition-closeThis PR / issue is in PFCP or FCP with a disposition to close it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.relnotesMarks issues that should be documented in the release notes of the next release.

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @m-ou-se@the8472@pthariensflame@yaahc@Mark-Simulacrum

      Issue actions

        regression: infallible residual could not convert error · Issue #86831 · rust-lang/rust