| Age | Commit message (Collapse) | Author | Lines |
|
Update `ty::VariantDef` to use `IndexVec<FieldIdx, FieldDef>`
And while doing the updates for that, also uses `FieldIdx` in `ProjectionKind::Field` and `TypeckResults::field_indices`.
There's more places that could use it (like `rustc_const_eval` and `LayoutS`), but I tried to keep this PR from exploding to *even more* places.
Part 2/? of https://github.com/rust-lang/compiler-team/issues/606
|
|
And while doing the updates for that, also uses `FieldIdx` in `ProjectionKind::Field` and `TypeckResults::field_indices`.
There's more places that could use it (like `rustc_const_eval` and `LayoutS`), but I tried to keep this PR from exploding to *even more* places.
Part 2/? of https://github.com/rust-lang/compiler-team/issues/606
|
|
Give return-position impl traits in trait a (synthetic) name to avoid name collisions with new lowering strategy
The only needed commit from this PR is the last one.
r? `@compiler-errors`
Needs #109455.
|
|
|
|
|
|
|
|
Since structs are always `VariantIdx(0)`, there's a bunch of files where the only reason they had `VariantIdx` or `vec::Idx` imported at all was to get the first variant.
So this uses a constant for that, and adds some doc-comments to `VariantIdx` while I'm there, since it doesn't have any today.
|
|
Rollup of 9 pull requests
Successful merges:
- #108954 (rustdoc: handle generics better when matching notable traits)
- #109203 (refactor/feat: refactor identifier parsing a bit)
- #109213 (Eagerly intern and check CrateNum/StableCrateId collisions)
- #109358 (rustc: Remove unused `Session` argument from some attribute functions)
- #109359 (Update stdarch)
- #109378 (Remove Ty::is_region_ptr)
- #109423 (Use region-erased self type during IAT selection)
- #109447 (new solver cleanup + implement coherence)
- #109501 (make link clickable)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Remove Ty::is_region_ptr
Fixes #109372
|
|
Rollup of 10 pull requests
Successful merges:
- #109373 (Set LLVM `LLVM_UNREACHABLE_OPTIMIZE` to `OFF`)
- #109392 (Custom MIR: Allow optional RET type annotation)
- #109394 (adapt tests/codegen/vec-shrink-panik for LLVM 17)
- #109412 (rustdoc: Add GUI test for "Auto-hide item contents for large items" setting)
- #109452 (Ignore the vendor directory for tidy tests.)
- #109457 (Remove comment about reusing rib allocations)
- #109461 (rustdoc: remove redundant `.content` prefix from span/a colors)
- #109477 (`HirId` to `LocalDefId` cleanup)
- #109489 (More general captures)
- #109494 (Do not feed param_env for RPITITs impl side)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
RPITITs are `DefKind::Opaque` with new lowering strategy
r? `@spastorino`
Kinda cherry-picked #109400
|
|
|
|
a general type system cleanup
removes the helper functions `traits::fully_solve_X` as they add more complexity then they are worth. It's confusing which of these helpers should be used in which context.
changes the way we deal with overflow to always add depth in `evaluate_predicates_recursively`. It may make sense to actually fully transition to not have `recursion_depth` on obligations but that's probably a bit too much for this PR.
also removes some other small - and imo unnecessary - helpers.
r? types
|
|
|
|
|
|
|
|
Walk un-shifted nested `impl Trait` in trait when setting up default trait method assumptions
Fixes a double subtraction in some binder math in return-position `impl Trait` in trait handling code.
Fixes #109239
|
|
they add more complexity then they are worth. It's confusing
which of these helpers should be used in which context.
|
|
Fix generics_of for impl's RPITIT synthesized associated type
The only useful commit is the last one.
This makes `generics_of` for the impl side RPITIT copy from the trait's associated type and avoid the fn on the impl side which was previously wrongly used.
This solution is better but we still need to fix resolution of the generated generics.
r? ``@compiler-errors``
|
|
|
|
|
|
method assumptions
|
|
|
|
type's param-env
|
|
|
|
|
|
|
|
|
|
|
|
Encode `opt_rpitit_info` for associated types
Follow-up, only last commit matters
r? `@spastorino`
This needs a perf run after the parent pr lands
|
|
|
|
Fall back to old metadata computation when type references errors
Projection is a bit too aggressive normalizing `<dyn Trait<[type error]> as Pointee>::Metadata` to `[type error]`, rather than to `DynMetadata<..>`. Side-step that by just falling back to the old structural metadata computation.
Fixes #109078
|
|
|
|
|
|
|
|
Simplify message paths
This makes it easier to open the messages file. Right now I have to first click on the `locales` dir to open it, and then on the `en-US.ftl` file. `Cargo.toml` and `build.rs` files are also in the top level, and I think there should not be more than one file, so a directory isn't really needed. The [chosen strategy for pontoon adoption](https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/pontoon.20and.20next.20steps) is out of tree. Even if this descision is changed in the future, the `messages.ftl` approach is also compatible with non-english translations living in-tree, as long as the non-english translations don't live in the `compiler/rustc_foo/` directories but in different ones. That would also be helpful for grepability purposes.
The commit was the result of automated changes:
```
for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done
for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done
```
r? `@davidtwco`
|
|
Make RPITITs simple cases work when using lower_impl_trait_in_trait_to_assoc_ty
r? `@compiler-errors`
It's probably best reviewed commit by commit.
|
|
This makes it easier to open the messages file while developing on features.
The commit was the result of automatted changes:
for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done
for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done
|
|
Do not implement HashStable for HashSet (MCP 533)
This PR removes all occurrences of `HashSet` in query results, replacing it either with `FxIndexSet` or with `UnordSet`, and then removes the `HashStable` implementation of `HashSet`. This is part of implementing [MCP 533](https://github.com/rust-lang/compiler-team/issues/533), that is, removing the `HashStable` implementations of all collection types with unstable iteration order.
The changes are mostly mechanical. The only place where additional sorting is happening is in Miri's override implementation of the `exported_symbols` query.
|
|
compiler-errors:rpitit-default-method-with-nested-rpitits, r=spastorino
Account for binders correctly when adding default RPITIT method assumption
As of #108203, we install extra projection predicates into the param-env of a default trait method when it has return-position `impl Trait` (or is async).
The implementation didn't account for the fact that it's walking into and out of binders, so we just need to shift all the debruijn indices accordingly when constructing the projection predicates.
Fixes #108579
r? types
|
|
|
|
|
|
|
|
|
|
|
|
sess.opts.unstable_opts
|
|
rustc_middle: Remove trait `DefIdTree`
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
|
|
lower_impl_trait_in_trait_to_assoc_ty
|
|
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
|
|
return associated types for RPITITs
|