| Age | Commit message (Collapse) | Author | Lines |
|
ConstParamHasTy
|
|
Permit recursive weak type aliases
I saw #63097 and thought "we can do ~~better~~ funnier". So here it is. It's not useful, but it's certainly something. This may actually become feasible with lazy norm (so in 5 years (constant, not reducing over time)).
r? `@estebank`
cc `@GuillaumeGomez`
|
|
|
|
|
|
This reverts commit cb9467515b5a9b15aaa905683c6b4dd9e851056c, reversing
changes made to 57781b24c54f9548722927ba88c343ff28da94ce.
|
|
Do not compute unneeded query results.
r? `@ghost`
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #115164 (MIR validation: reject in-place argument/return for packed fields)
- #115240 (codegen_llvm/llvm_type: avoid matching on the Rust type)
- #115294 (More precisely detect cycle errors from type_of on opaque)
- #115310 (Document panic behavior across editions, and improve xrefs)
- #115311 (Revert "Suggest using `Arc` on `!Send`/`!Sync` types")
- #115317 (Devacationize oli-obk)
- #115319 (don't use SnapshotVec in Graph implementation, as it looks unused; use Vec instead)
- #115322 (Tweak output of `to_pretty_impl_header` involving only anon lifetimes)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
|
|
Do not emit invalid suggestion in E0191 when spans overlap
Fix #115019.
|
|
Fix #115019.
|
|
fix ##113702
fix #113702
unknown unstable lint command lint
improve impelementation
|
|
|
|
|
|
Don't add associated type bound for non-types
We had this fix for equality constraints (#99890), but for some reason not trait constraints :sweat_smile:
Fixes #114744
|
|
Add `{Local}ModDefId` to more strongly type DefIds`
Based on #110862 by `@Nilstrieb`
|
|
fixed *const [type error] does not implement the Copy trait
Removes "error: arguments for inline assembly must be copyable" when moving an unknown type
Fixes: #113788
|
|
|
|
|
|
Select obligations before processing wf obligation in `compare_method_predicate_entailment`
We need to select obligations before processing the WF obligation for the `IMPLIED_BOUNDS_ENTAILMENT` lint, since it skips over type variables.
Fixes #114783
r? `@jackh726`
|
|
compare_method_predicate_entailment
|
|
This allows for better type safety in the compiler and also improves the
documentation for many things, making it clear that they expect modules.
|
|
|
|
|
|
|
|
correctly lower `impl const` to bind to host effect param
r? `@oli-obk`
|
|
Map RPIT duplicated lifetimes back to fn captured lifetimes
Use the [`lifetime_mapping`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.OpaqueTy.html#structfield.lifetime_mapping) to map an RPIT's captured lifetimes back to the early- or late-bound lifetimes from its parent function. We may be going thru several layers of mapping, since opaques can be nested, so we introduce `TyCtxt::map_rpit_lifetime_to_fn_lifetime` to loop through several opaques worth of mapping, and handle turning it into a `ty::Region` as well.
We can then use this instead of the identity substs for RPITs in `check_opaque_meets_bounds` to address #114285.
We can then also use `map_rpit_lifetime_to_fn_lifetime` to properly install bidirectional-outlives predicates for both RPITs and RPITITs. This addresses #114601.
I based this on #114574, but I don't actually know how much of that PR we still need, so some code may be redundant now... :shrug:
---
Fixes #114597
Fixes #114579
Fixes #114285
Also fixes #114601, since it turns out we had other bugs with RPITITs and their duplicated lifetime params :sweat_smile:.
Supersedes #114574
r? `@oli-obk`
|
|
|
|
from the single use of a RPIT in its parent function's return type
|
|
|
|
|
|
Structurally normalize weak and inherent in new solver
It seems pretty obvious to me that we should be normalizing weak and inherent aliases too, since they can always be normalized. This PR still leaves open the question of what to do with opaques, though 💀
**Also**, we need to structurally resolve the target of a coercion, for the UI test to work.
r? `@lcnr`
|
|
r=oli-obk
Store the laziness of type aliases in their `DefKind`
Previously, we would treat paths referring to type aliases as *lazy* type aliases if the current crate had lazy type aliases enabled independently of whether the crate which the alias was defined in had the feature enabled or not.
With this PR, the laziness of a type alias depends on the crate it is defined in. This generally makes more sense to me especially if / once lazy type aliases become the default in a new edition and we need to think about *edition interoperability*:
Consider the hypothetical case where the dependency crate has an older edition (and thus eager type aliases), it exports a type alias with bounds & a where-clause (which are void but technically valid), the dependent crate has the latest edition (and thus lazy type aliases) and it uses that type alias. Arguably, the bounds should *not* be checked since at any time, the dependency crate should be allowed to change the bounds at will with a *non*-major version bump & without negatively affecting downstream crates.
As for the reverse case (dependency: lazy type aliases, dependent: eager type aliases), I guess it rules out anything from slight confusion to mild annoyance from upstream crate authors that would be caused by the compiler ignoring the bounds of their type aliases in downstream crates with older editions.
---
This fixes #114468 since before, my assumption that the type alias associated with a given weak projection was lazy (and therefore had its variances computed) did not necessarily hold in cross-crate scenarios (which [I kinda had a hunch about](https://github.com/rust-lang/rust/pull/114253#discussion_r1278608099)) as outlined above. Now it does hold.
`@rustbot` label F-lazy_type_alias
r? `@oli-obk`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r=oli-obk
Compute variances for lazy type aliases
Fixes #114221.
CC ``@oli-obk``
r? types
|
|
|
|
|
|
|
|
Tweaks to `adt_sized_constraint`
fixes a comment, but also some other nits.
r? lcnr
|
|
compiler-errors:dont-error-on-missing-region-outlives, r=spastorino
Don't check unnecessarily that impl trait is RPIT
We have this random `return_type_impl_trait` function to detect if a function returns an RPIT which is used in outlives suggestions, but removing it doesn't actually change any diagnostics. Let's just remove it.
Also, suppress a spurious outlives error from a ReError.
Fixes #114274
|
|
|
|
|