Rollup of 7 pull requests#139497
Closed
matthiaskrgr wants to merge 15 commits intorust-lang:masterfrom
Closed
Conversation
Fixes rust-lang#139082. Emits an error when `Self` is found in the projection bounds of a trait object. In type aliases, `Self` has no meaning, so `type A = &'static dyn B` where `trait B = Fn() -> Self` will expands to `type A = &'static Fn() -> Self` which is illegal, causing the region solver to bail out when hitting the uninferred Self. Bug: rust-lang#139082 Signed-off-by: xtex <xtexchooser@duck.com>
Normalization can fail from errors from other items so use a delayed bug instead of checking the body.
we already track this info in the `definitions` field
…er-errors compiler: report error when trait object type param reference self Fixes rust-lang#139082. Emits an error when `Self` is found in the projection bounds of a trait object. In type aliases, `Self` has no meaning, so `type A = &'static dyn B` where `trait B = Fn() -> Self` will expands to `type A = &'static Fn() -> Self` which is illegal, causing the region solver to bail out when hitting the uninferred Self. r? `@compiler-errors` `@fee1-dead`
…r-diag-hir-wf-check, r=oli-obk Don't construct preds w escaping bound vars in `diagnostic_hir_wf_check` See comment inline. Fixes rust-lang#139330 r? oli-obk
…ion, r=compiler-errors Use delayed bug for normalization errors in drop elaboration Normalization can fail due to a lot of different earlier errors, so just use span_delayed_bug if normalization failed. Closes rust-lang#137287 Closes rust-lang#135668 r? compiler-errors
…l-with-proj, r=oli-obk Fix trait upcasting to dyn type with no principal when there are projections rust-lang#126660 (which I had originally authored, lol) had a subtle bug that is the moral equivalent of rust-lang#114036, which is that when upcasting from `dyn Principal<Projection = Ty> + AutoTrait` to `dyn AutoTrait`, we were dropping the trait ref for `Principal` but not its projections (if there were any). With debug assertions enabled, this triggers the assertion I luckily added in a2a0cfe, but even without debug assertions this is a logical bug since we had a dyn type with just a projection bound but no principal, so it caused a type mismatch. This does not need an FCP because this should've been covered by the FCP in rust-lang#126660, but we just weren't testing a case when casting from a `dyn` type with projections 😸 Fixes rust-lang#139418 r? `@oli-obk` (or anyone)
…stic, r=oli-obk Don't call `Span::with_parent` on the good path in `has_stashed_diagnostic` More unnecessary incurred span tracking avoided by not calling `span.with_parent(None)`. This is useless on its own but makes it much easier to fix other "span tracking on the good path" issues in the future. r? oli-obk
rm `RegionInferenceContext::var_infos` we already track this info in the `definitions` field r? types
… r=oli-obk Update some comment/docs related to "extern intrinsic" removal Follow-up to rust-lang#139455. r? `@oli-obk`
Member
Author
|
@bors r+ rollup=never p=5 |
Collaborator
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 7, 2025
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#139124 (compiler: report error when trait object type param reference self) - rust-lang#139346 (Don't construct preds w escaping bound vars in `diagnostic_hir_wf_check`) - rust-lang#139379 (Use delayed bug for normalization errors in drop elaboration) - rust-lang#139421 (Fix trait upcasting to dyn type with no principal when there are projections) - rust-lang#139468 (Don't call `Span::with_parent` on the good path in `has_stashed_diagnostic`) - rust-lang#139476 (rm `RegionInferenceContext::var_infos`) - rust-lang#139490 (Update some comment/docs related to "extern intrinsic" removal) r? `@ghost` `@rustbot` modify labels: rollup
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Collaborator
|
💔 Test failed - checks-actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
diagnostic_hir_wf_check#139346 (Don't construct preds w escaping bound vars indiagnostic_hir_wf_check)Span::with_parenton the good path inhas_stashed_diagnostic#139468 (Don't callSpan::with_parenton the good path inhas_stashed_diagnostic)RegionInferenceContext::var_infos#139476 (rmRegionInferenceContext::var_infos)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup