| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
propagation
|
|
A way forward for pointer equality in const eval
r? @varkor on the first commit and @RalfJung on the second commit
cc #53020
|
|
Improve compiler error message for wrong generic parameter order
- Added optional "help" parameter that shows a help message on the compiler error if required.
- Added a simple ordered parameter as a sample help.
@varkor will make more changes as required. Let me know if I'm heading in the right direction.
Fixes #68437
r? @varkor
|
|
Properly encode AnonConst into crate metadata
Fixes #68104
Previous, we were encoding AnonConst as a regular Const, causing us to
treat them differently after being deserialized in another compilation
session.
|
|
|
|
We can never supply a meaningful implementation of this.
Instead, the follow up commits will create two intrinsics
that approximate comparisons:
* `ptr_maybe_eq`
* `ptr_maybe_ne`
The fact that `ptr_maybe_eq(a, b)` is not necessarily the same
value as `!ptr_maybe_ne(a, b)` is a symptom of this entire
problem.
|
|
|
|
|
|
|
|
Closes #72819
|
|
|
|
|
|
impl From<[T; N]> for Box<[T]>
Based on https://github.com/rust-lang/rust/pull/68692
|
|
Fixes #68104
Previous, we were encoding AnonConst as a regular Const, causing us to
treat them differently after being deserialized in another compilation
session.
|
|
add regression tests for stalled_on const vars
closes #70180
Afaict this has been fixed sometime after #70213
`trait_ref_type_vars` correctly adds const infers and I did not find any remaining `FIXME`s which correspond to this issue.
https://github.com/rust-lang/rust/blob/7c59a81a5fcbaaca311f744cd7c68d99bfbb05d3/src/librustc_trait_selection/traits/fulfill.rs#L555-L557
Added both examples from the issue as regression tests and renamed `trait_ref_type_vars` -> `trait_ref_infer_vars`.
r? @eddyb
|
|
Based on https://github.com/rust-lang/rust/pull/68692
|
|
correctly handle uninferred consts
fixes the ICE mentioned in https://github.com/rust-lang/rust/issues/70507#issuecomment-615268893
I originally tried to generalize `need_type_info_err` to also work with consts which was not as much fun as I hoped :sweat_smile:
It might be easier to have some duplication here and handle consts separately.
r? @varkor
|
|
impl From<Cow> for Box, Rc, and Arc
These forward `Borrowed`/`Owned` values to existing `From` impls.
- `Box<T>` is a fundamental type, so it would be a breaking change to add a blanket impl. Therefore, `From<Cow>` is only implemented for `[T]`, `str`, `CStr`, `OsStr`, and `Path`.
- For `Rc<T>` and `Arc<T>`, `From<Cow>` is implemented for everything that implements `From` the borrowed and owned types separately.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Incomplete features can also be unsound
Some incomplete features do not just ICE, they are also currently unsound (e.g. https://github.com/rust-lang/rust/pull/72029, and also `specialization` -- which is not yet marked incomplete but [should be](https://github.com/rust-lang/rust/pull/71420)). This makes the message reflect that.
While at it I also added a link to the tracking issue, which hopefully should explain what is incomplete/unsound about the feature.
|
|
display `ConstKind::Param`
|
|
|
|
|
|
|
|
|
|
forbid `dyn Trait` in patterns
Do not allow `&dyn Trait` as a generic const parameters.
This also changes dyn trait in pattern from ICE to error.
closes #63322
closes #70972
r? @eddyb
|
|
|
|
|
|
|
|
Add regression test for #69654
closes #69654
r? @eddyb
|
|
Moving more build-pass tests to check-pass
One or two tests became build-pass without the FIXME because they really
needed build-pass (were failing without it).
Helps with #62277
---
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/rust-lang/rust/71340)
<!-- Reviewable:end -->
|
|
One or two tests became build-pass without the FIXME because they really
needed build-pass (were failing without it).
Helps with #62277
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|