Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regression: infallible residual could not convert error #86831

Closed
Mark-Simulacrum opened this issue Jul 2, 2021 · 10 comments
Closed

regression: infallible residual could not convert error #86831

Mark-Simulacrum opened this issue Jul 2, 2021 · 10 comments
Assignees
Labels
disposition-close This PR / issue is in PFCP or FCP with a disposition to close it. finished-final-comment-period The final comment period is finished for this PR / Issue. P-medium Medium priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. relnotes Marks issues that should be documented in the release notes of the next release. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Milestone

Comments

@Mark-Simulacrum
Copy link
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

@Mark-Simulacrum Mark-Simulacrum added regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 2, 2021
@Mark-Simulacrum Mark-Simulacrum added this to the 1.54.0 milestone Jul 2, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Jul 2, 2021
@Mark-Simulacrum
Copy link
Member Author

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
Copy link
Member

the8472 commented Jul 3, 2021

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

Looks like it #46871 (comment)

@scottmcm
Copy link
Member

scottmcm commented Jul 3, 2021

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
Copy link
Member

yaahc commented Jul 14, 2021

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
Copy link

rfcbot commented Jul 14, 2021

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.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-close This PR / issue is in PFCP or FCP with a disposition to close it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Jul 14, 2021
@rfcbot
Copy link

rfcbot commented Jul 14, 2021

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Jul 14, 2021
@yaahc yaahc removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Jul 21, 2021
@Mark-Simulacrum
Copy link
Member Author

Marking as relnotes per FCP.

@Mark-Simulacrum Mark-Simulacrum added the relnotes Marks issues that should be documented in the release notes of the next release. label Jul 22, 2021
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Jul 24, 2021
@rfcbot
Copy link

rfcbot commented Jul 24, 2021

The final comment period, with a disposition to close, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

@rfcbot rfcbot added the to-announce Announce this issue on triage meeting label Jul 24, 2021
@pthariensflame
Copy link
Contributor

So…will this actually be closed then?

@apiraino
Copy link
Contributor

apiraino commented Aug 5, 2021

@rustbot label -to-announce

@rustbot rustbot removed the to-announce Announce this issue on triage meeting label Aug 5, 2021
wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this issue Aug 12, 2021
Pkgsrc changes:
 * Bump bootstrap requirements to 1.53.0.
 * Adjust patches, adapt to upstream changes, adjust cargo checksums
 * If using an external llvm, require >= 10.0

Upsteream changes:

Version 1.54.0 (2021-07-29)
============================

Language
-----------------------

- [You can now use macros for values in built-in attribute macros.][83366]
  While a seemingly minor addition on its own, this enables a lot of
  powerful functionality when combined correctly. Most notably you can
  now include external documentation in your crate by writing the following.
  ```rust
  #![doc = include_str!("README.md")]
  ```
  You can also use this to include auto-generated modules:
  ```rust
  #[path = concat!(env!("OUT_DIR"), "/generated.rs")]
  mod generated;
  ```

- [You can now cast between unsized slice types (and types which contain
  unsized slices) in `const fn`.][85078]
- [You can now use multiple generic lifetimes with `impl Trait` where the
   lifetimes don't explicitly outlive another.][84701] In code this means
   that you can now have `impl Trait<'a, 'b>` where as before you could
   only have `impl Trait<'a, 'b> where 'b: 'a`.

Compiler
-----------------------

- [Rustc will now search for custom JSON targets in
  `/lib/rustlib/<target-triple>/target.json` where `/` is the "sysroot"
  directory.][83800] You can find your sysroot directory by running
  `rustc --print sysroot`.
- [Added `wasm` as a `target_family` for WebAssembly platforms.][84072]
- [You can now use `#[target_feature]` on safe functions when targeting
  WebAssembly platforms.][84988]
- [Improved debugger output for enums on Windows MSVC platforms.][85292]
- [Added tier 3\* support for `bpfel-unknown-none`
   and `bpfeb-unknown-none`.][79608]

\* Refer to Rust's [platform support page][platform-support-doc] for more
   information on Rust's tiered platform support.

Libraries
-----------------------

- [`panic::panic_any` will now `#[track_caller]`.][85745]
- [Added `OutOfMemory` as a variant of `io::ErrorKind`.][84744]
- [ `proc_macro::Literal` now implements `FromStr`.][84717]
- [The implementations of vendor intrinsics in core::arch have been
   significantly refactored.][83278] The main user-visible changes are
   a 50% reduction in the size of libcore.rlib and stricter validation
   of constant operands passed to intrinsics. The latter is technically
   a breaking change, but allows Rust to more closely match the C vendor
   intrinsics API.

Stabilized APIs
---------------

- [`BTreeMap::into_keys`]
- [`BTreeMap::into_values`]
- [`HashMap::into_keys`]
- [`HashMap::into_values`]
- [`arch::wasm32`]
- [`VecDeque::binary_search`]
- [`VecDeque::binary_search_by`]
- [`VecDeque::binary_search_by_key`]
- [`VecDeque::partition_point`]

Cargo
-----

- [Added the `--prune <spec>` option to `cargo-tree` to remove a package from
  the dependency graph.][cargo/9520]
- [Added the `--depth` option to `cargo-tree` to print only to a certain depth
  in the tree ][cargo/9499]
- [Added the `no-proc-macro` value to `cargo-tree --edges` to hide procedural
  macro dependencies.][cargo/9488]
- [A new environment variable named `CARGO_TARGET_TMPDIR` is
  available.][cargo/9375]
  This variable points to a directory that integration tests and
  benches can use as a "scratchpad" for testing filesystem operations.

Compatibility Notes
-------------------
- [Mixing Option and Result via `?` is no longer permitted in
  closures for inferred types.][86831]
- [Previously unsound code is no longer permitted where different
  constructors in branches could require different lifetimes.][85574]
- As previously mentioned the [`std::arch` instrinsics now uses
  stricter const checking][83278] than before and may reject some
  previously accepted code.
- [`i128` multiplication on Cortex M0+ platforms currently
  unconditionally causes overflow when compiled with `codegen-units
  = 1`.][86063]

[85574]: rust-lang/rust#85574
[86831]: rust-lang/rust#86831
[86063]: rust-lang/rust#86063
[86831]: rust-lang/rust#86831
[79608]: rust-lang/rust#79608
[84988]: rust-lang/rust#84988
[84701]: rust-lang/rust#84701
[84072]: rust-lang/rust#84072
[85745]: rust-lang/rust#85745
[84744]: rust-lang/rust#84744
[85078]: rust-lang/rust#85078
[84717]: rust-lang/rust#84717
[83800]: rust-lang/rust#83800
[83366]: rust-lang/rust#83366
[83278]: rust-lang/rust#83278
[85292]: rust-lang/rust#85292
[cargo/9520]: rust-lang/cargo#9520
[cargo/9499]: rust-lang/cargo#9499
[cargo/9488]: rust-lang/cargo#9488
[cargo/9375]: rust-lang/cargo#9375
[`BTreeMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_keys
[`BTreeMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_values
[`HashMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_keys
[`HashMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_values
[`arch::wasm32`]: https://doc.rust-lang.org/core/arch/wasm32/index.html
[`VecDeque::binary_search`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search
[`VecDeque::binary_search_by`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by
[`VecDeque::binary_search_by_key`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by_key
[`VecDeque::partition_point`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.partition_point
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-close This PR / issue is in PFCP or FCP with a disposition to close it. finished-final-comment-period The final comment period is finished for this PR / Issue. P-medium Medium priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. relnotes Marks issues that should be documented in the release notes of the next release. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

9 participants