| Age | Commit message (Collapse) | Author | Lines |
|
impl From<[T; N]> for Box<[T]>
Based on https://github.com/rust-lang/rust/pull/68692
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add `unused_braces` lint
Add the lint `unused_braces` which is warn by default.
`unused_parens` is also extended and now checks anon consts.
closes #68387
r? @varkor
|
|
|
|
|
|
|
|
Tweak `suggest_constraining_type_param`
Some of the bound restriction structured suggestions were incorrect while others had subpar output.
The only issue left is a suggestion for an already present bound when dealing with `const`s that should be handled independently.
Fix #69983.
|
|
Some of the bound restriction structured suggestions were incorrect
while others had subpar output.
|
|
|
|
impl From<[T; N]> for Vec<T>
Closes https://github.com/rust-lang/rust/issues/67963
|
|
|
|
correctly handle const params in type_of
extends #70223, retry of #70276
fixes #70273
r? @eddyb cc @varkor
|
|
Add regression test for #70155.
With #70166 merged, `RangeInclusive` now derives `PartialEq` and `Eq`, implementing structural equality and as a side effect the range is now usable with const generics, closing #70155.
As per [#70166 (comment)](https://github.com/rust-lang/rust/pull/70166#issuecomment-601872201) a test is added to avoid a change to the private fields or the equality implementation of the range from subtly reverting #70155.
|
|
Evaluate repeat expression lengths as late as possible
Fixes #68567
r? @varkor
|
|
Merge tests to a single test file.
|
|
In addition to the regression test of `RangeInclusive` for #70155, now all range types are checked for usability within const generics:
- `RangeFrom`
- `RangeFull`
- `RangeToInclusive`
- `RangeTo`
- `Range`
The test are moved from `test\ui\const-generics\issues\issue-70155` to `test\ui\const-generics\std\range` in anticipation of future similar tests for std types.
|
|
|