| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
Make diagnostic for unsatisfied `Termination` bounds more precise
Don't blindly emit a diagnostic claiming that “*`main` has an invalid return type*” if we encounter a type that should but doesn't implement `std::process::Termination` and isn't actually the return type of the program entry `main`.
Fixes #103052.
``@rustbot`` label A-diagnostics T-compiler T-libs
r? diagnostics
|
|
Rollup of 4 pull requests
Successful merges:
- #102454 (Suggest parentheses for possible range method calling)
- #102466 (only allow `ConstEquate` with `feature(gce)`)
- #102945 (Do not register placeholder `RegionOutlives` obligations when `considering_regions` is false)
- #103091 (rustdoc: remove unused HTML class `sidebar-title`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Do not register placeholder `RegionOutlives` obligations when `considering_regions` is false
**NOTE:** I'm kinda just putting this up for discussion. I'm not certain this is correct...?
This was introduced in [`608625d`](https://github.com/rust-lang/rust/commit/608625dae95cde00e4570eb6c2d63b2244bbf34c#diff-6e54b18681342ec725d75591dbf384ad08cd73df29db00485fe51b4e90f76ff7R361).
Interestingly, we only check `data.has_placeholders()` for `RegionOutlives`, and not for `TypeOutlives`... why? For the record, that different treatment between `RegionOutlives` and `TypeOutlives` is why the fix "The compiling succeeds when all `'a : 'b` are replaced with `&'a () : 'b`" in #100689 _"works"_, but it seems like an implementation detail considering this.
Also, why do we care about placeholder regions being registered if `considering_regions` is false? It doesn't seem to affect any UI tests, for example.
r? `@lcnr`
Fixes #102899
Fixes #100689
|
|
only allow `ConstEquate` with `feature(gce)`
|
|
|
|
|
|
Fix subst issues with return-position `impl Trait` in trait
1. Fix an issue where we were rebase impl substs onto trait method substs, instead of trait substs
2. Fix an issue where early-bound regions aren't being mapped correctly for RPITIT hidden types
Fixes #102301
Fixes #102310
Fixes #102334
Fixes #102918
|
|
Make `overlapping_impls` not generic
Trying to win back perf from #101632.
|
|
|
|
Fix `suggest_floating_point_literal` ICE
Fixes #102989
|
|
More dupe word typos
I only picked those changes (from the regex search) that I am pretty certain doesn't change meaning and is just a typo fix. Do correct me if any fix is undesirable and I can revert those. Thanks.
|
|
|
|
|
|
This improves perf
|
|
|
|
Support default-body trait functions with return-position `impl Trait` in traits
Introduce a new `Trait` candidate kind for the `ImplTraitInTrait` projection candidate, which just projects an RPITIT down to its opaque type form.
This is a hack until we lower RPITITs to regular associated types, after which we will need to rework how these default bodies are type-checked, so comments are left in a few places for us to clean up later.
Fixes #101665
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #101360 (Point out incompatible closure bounds)
- #101789 (`let`'s not needed in struct field definitions)
- #102846 (update to syn-1.0.102)
- #102871 (rustdoc: clean up overly complex `.trait-impl` CSS selectors)
- #102876 (suggest candidates for unresolved import)
- #102888 (Improve rustdoc-gui search-color test)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=petrochenkov
Point out incompatible closure bounds
Fixes #100295
|
|
|
|
Remove tuple candidate, nothing special about it
r? `@lcnr` you mentioned this during the talk you gave i think
|
|
|
|
Elaborate trait ref to compute object safety.
instead of building them manually from supertraits and associated items.
This allows to have the correct substs for GATs.
Fixes https://github.com/rust-lang/rust/issues/102751
|
|
rename `ImplItemKind::TyAlias` to `ImplItemKind::Type`
The naming of this variant seems inconsistent given that this is not really a "type alias", and the associated type variant for `TraitItemKind` is just called `Type`.
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #101520 (Allow transmutes between the same types after erasing lifetimes)
- #102675 (Remove `mir::CastKind::Misc`)
- #102778 (Fix MIR inlining of asm_unwind)
- #102785 (Remove `DefId` from some `SelectionCandidate` variants)
- #102788 (Update rustc-dev-guide)
- #102789 (Update browser UI test version)
- #102797 (rustdoc: remove no-op CSS `.rightside { position: initial }`)
- #102798 (rustdoc: add main-heading and example-wrap link CSS to big selector)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Remove `DefId` from some `SelectionCandidate` variants
They are both from `obligation.predicate.def_id()`, which do not need to be on the `SelectionCandidate`.
cc ````@lcnr```` ````@compiler-errors````
|
|
Rewrite representability
* Improve placement of `Box` in the suggestion
* Multiple items in a cycle emit 1 error instead of an error for each item in the cycle
* Introduce `representability` query to avoid traversing an item every time it is used.
* Also introduce `params_in_repr` query to avoid traversing generic items every time it is used.
|
|
Rollup of 6 pull requests
Successful merges:
- #102300 (Use a macro to not have to copy-paste `ConstFnMutClosure::new(&mut fold, NeverShortCircuit::wrap_mut_2_imp)).0` everywhere)
- #102475 (unsafe keyword: trait examples and unsafe_op_in_unsafe_fn update)
- #102760 (Avoid repeated re-initialization of the BufReader buffer)
- #102764 (Check `WhereClauseReferencesSelf` after all other object safety checks)
- #102779 (Fix `type_of` ICE)
- #102780 (run Miri CI when std::sys changes)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
|
|
|
|
|
|
TypeErrCtxt optionally has a TypeckResults so that InferCtxt doesn't
need to.
|
|
|
|
Enable doctests in compiler/ crates
Helps with https://github.com/rust-lang/rust/issues/99144
|
|
provided
|
|
|
|
follow-up fix about 101866 to print the self type.
modified: compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
modified: src/test/ui/error-codes/E0283.stderr
modified: src/test/ui/error-codes/E0790.stderr
modified: src/test/ui/traits/static-method-generic-inference.stderr
modified: src/test/ui/type/issue-101866.stderr
|
|
|
|
modified: compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
modified: src/test/ui/error-codes/E0283.stderr
modified: src/test/ui/error-codes/E0790.stderr
modified: src/test/ui/traits/static-method-generic-inference.stderr
modified: src/test/ui/type/issue-101866.stderr
|
|
It's not about types or consts, but the lack of regions
pulled out of https://github.com/rust-lang/rust/pull/101900 which adds a fourth kind of non-lifetime generic parameter, and the naming of these methods would get ridiculous.
|
|
Only allow ~const bounds for traits with #[const_trait]
r? `@fee1-dead`
|
|
Check generic argument compatibility when projecting assoc ty
Fixes #102114
|