| Age | Commit message (Collapse) | Author | Lines |
|
Trim more paths in obligation types
|
|
On unsized locals with explicit types suggest `&`
Fix #72742.
|
|
r=compiler-errors
Rename `Rptr` to `Ref` in AST and HIR
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already as well.
|
|
Fix #72742.
|
|
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already
as well.
|
|
Some `compare_method` tweaks
1. Make some of the comparison functions' names more regular
2. Reduce pub scope of some of the things in `compare_method`
~3. Remove some unnecessary opaque type handling code -- `InferCtxt` already is in a mode that doesn't define opaque types~
* moved to a different PR
4. Bubble up `ErrorGuaranteed` for region constraint errors in `compare_method` - Improves a redundant error message in one unit test.
5. Move the `compare_method` module to have a more general name, since it's more like `compare_impl_item` :)
6. Rename `collect_trait_impl_trait_tys`
|
|
|
|
|
|
|
|
|
|
Remove unused imports
|
|
|
|
match_result_ok
obfuscated_if_else
single_char_add
writeln_empty_string
collapsible_match
iter_cloned_collect
unnecessary_mut_passed
|
|
rustc: Remove needless lifetimes
|
|
implement the skeleton of the updated trait solver
cc ```@rust-lang/initiative-trait-system-refactor```
This is mostly following the architecture discussed in the types team meetup.
After discussing the desired changes for the trait solver, we encountered cyclic dependencies between them. Most notably between changing evaluate to be canonical and returning inference constraints. We cannot canonicalize evaluate without returning inference constraints due to coinductive cycles. However, caching inference constraints also relies on canonicalization. Implementing both of these changes at once in-place is not feasible.
This somewhat closely mirrors the current `evaluate` implementation with the following notable differences:
- it moves `project` into the core solver, allowing us to correctly deal with coinductive projections (will be required for implied bounds, perfect derive)
- it changes trait solver overflow to be non-fatal (required to backcompat breakage from changes to the iteration order of nested goals, deferred projection equality, generally very useful)
- it returns inference constraints and canonicalizes inputs and outputs (required for a lot things, most notably merging fulfill and evaluate, and deferred projection equality)
- it is implemented to work with lazy normalization
A lot of things aren't yet implemented, but the remaining FIXMEs should all be fairly self-contained and parallelizable. If the architecture looks correct and is what we want here, I would like to quickly merge this and then split the work.
r? ```@compiler-errors``` / ```@rust-lang/types``` :3
|
|
This has a 10000000% chance of us causing a cycle if we're not careful
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Don't ICE in closure arg borrow suggestion
Fixes #105832
|
|
Suggest a `T: Send` bound for `&mut T` upvars in `Send` generators
Right now, we suggest a `T: Sync` bound for both `&T` and `&mut T` upvars. A user on URLO [found this confusing](https://users.rust-lang.org/t/error-complains-about-missing-sync-but-send-is-whats-missing/86021), so I wrote this quick fix to look at the mutability before making the suggestion.
|
|
use &str / String literals instead of format!()
|
|
don't clone Copy types
|
|
remove redundant fn params that were only "used" in recursion
|
|
|
|
don't destuct references just to reborrow
|
|
|
|
|
|
|
|
|
|
|
|
|
|
always use `anonymize_bound_vars`
Unless this is perf-sensitive, it's probably best to always use one anonymize function that does the right thing for all bound vars.
r? types
|
|
Use impl's def id when calculating type to specify in UFCS
Fixes #104327
Fixes #104328
Also addresses https://github.com/rust-lang/rust/pull/102670#discussion_r987381197
|
|
Tweak output for bare `dyn Trait` in arguments
Fix #35825.
|
|
Don't create dummy if val has escaping bounds var
Skips creating/pushing obligations if val has escaping bounds vars.
Fixes #105689
|
|
Do not say "Type changed to X here" when the only difference is caused
by lifetimes.
|
|
|
|
|
|
Rollup of 11 pull requests
Successful merges:
- #104592 (Ensure async trait impls are async (or otherwise return an opaque type))
- #105623 (Fix `-Z print-type-sizes` for generators with discriminant field ordered first)
- #105627 (Auto traits in `dyn Trait + Auto` are suggestable)
- #105633 (Make `report_projection_error` more `Term` agnostic)
- #105683 (Various cleanups to dest prop)
- #105692 (Add regression test for #104678)
- #105707 (rustdoc: remove unnecessary CSS `kbd { cursor: default }`)
- #105715 (Do not mention long types in E0599 label)
- #105722 (more clippy::complexity fixes)
- #105724 (rustdoc: remove no-op CSS `.scrape-example .src-line-numbers { margin: 0 }`)
- #105730 (rustdoc: remove no-op CSS `.item-info:before { color }`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Make `report_projection_error` more `Term` agnostic
Fixes #105632
|
|
Highlight conflicting param-env candidates, again
Un-reverts #98794 (i.e. reverts #99290).
The previous time I attempted to land this PR, it was because of an incremental issue (#99233). The repro instructions in the issue is no longer manifest the ICE -- I think it's because this ambiguity code was refactored (I think by `@lcnr)` to no longer store the ambiguities in the fulfillment error, but instead recompute them on the fly.
The main motivation for trying to re-land this is that it fixes #105131 by highlighting the root-cause of the issue, which is conflicting param-env candidates:
```
error[E0283]: type annotations needed: cannot satisfy `Self: Gen<'source>`
|
note: multiple `impl`s or `where` clauses satisfying `Self: Gen<'source>` found
--> $DIR/conflicting-bounds.rs:3:1
|
LL | pub trait Gen<'source> {
| ^^^^^^^^^^^^^^^^^^^^^^
...
LL | Self: for<'s> Gen<'s, Output = T>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0283`.
```
Fixes #105131.
Fixes (again) #98786
|
|
Fix #35825.
|
|
|
|
|
|
|