Normalize struct tail properly for dyn ptr-to-ptr casting in new solver#128712
Merged
bors merged 3 commits intorust-lang:masterfrom Aug 13, 2024
Merged
Normalize struct tail properly for dyn ptr-to-ptr casting in new solver#128712bors merged 3 commits intorust-lang:masterfrom
dyn ptr-to-ptr casting in new solver#128712bors merged 3 commits intorust-lang:masterfrom
Conversation
dyn ptr-to-ptr castingdyn ptr-to-ptr casting in new solver
compiler-errors
commented
Aug 6, 2024
| if self.infcx.next_trait_solver() { | ||
| let body = self.body; | ||
| let param_env = self.param_env; | ||
| self.fully_perform_op( |
Contributor
Author
There was a problem hiding this comment.
This is incredibly gross, to the point that it kinda feels unnecessary? 🤔 But I really don't know how to simplify it, given the way that we need to wrap this in a type op and struct_tail doesn't have a fallible normalize fn...
Collaborator
|
☔ The latest upstream changes (presumably #128707) made this pull request unmergeable. Please resolve the merge conflicts. |
compiler-errors
commented
Aug 7, 2024
compiler-errors
commented
Aug 7, 2024
97232bf to
f15997f
Compare
compiler-errors
commented
Aug 11, 2024
| debug_assert!( | ||
| matches!( | ||
| ecx.tcx.struct_tail_without_normalization(pointee_ty).kind(), | ||
| ecx.tcx.struct_tail_for_codegen(pointee_ty, ecx.param_env).kind(), |
Contributor
Author
There was a problem hiding this comment.
Can't actually create a test for this, since we only allow matching on arrays and str (not tails), and I don't know how to trigger this outside of MIR match lowering.
Contributor
|
@bors r+ |
Collaborator
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 12, 2024
…, r=lcnr Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver Realized that the new solver didn't handle ptr-to-ptr casting correctly. r? lcnr Built on rust-lang#128694
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 12, 2024
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#128712 (Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver) - rust-lang#128878 (Slightly refactor `Flags` in bootstrap) - rust-lang#128886 (Get rid of some `#[allow(rustc::untranslatable_diagnostic)]`) - rust-lang#128912 (Store `do_not_recommend`-ness in impl header) - rust-lang#128936 (Support reading thin archives in ArArchiveBuilder) - rust-lang#128937 (Fix warnings in rmake tests on `x86_64-unknown-linux-gnu`) - rust-lang#128978 (Use `assert_matches` around the compiler more) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 12, 2024
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#128712 (Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver) - rust-lang#128878 (Slightly refactor `Flags` in bootstrap) - rust-lang#128886 (Get rid of some `#[allow(rustc::untranslatable_diagnostic)]`) - rust-lang#128912 (Store `do_not_recommend`-ness in impl header) - rust-lang#128936 (Support reading thin archives in ArArchiveBuilder) - rust-lang#128937 (Fix warnings in rmake tests on `x86_64-unknown-linux-gnu`) - rust-lang#128978 (Use `assert_matches` around the compiler more) r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 12, 2024
…, r=lcnr Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver Realized that the new solver didn't handle ptr-to-ptr casting correctly. r? lcnr Built on rust-lang#128694
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 12, 2024
…, r=lcnr Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver Realized that the new solver didn't handle ptr-to-ptr casting correctly. r? lcnr Built on rust-lang#128694
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 12, 2024
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#128712 (Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver) - rust-lang#128861 (Rework MIR inlining debuginfo so function parameters show up in debuggers.) - rust-lang#128912 (Store `do_not_recommend`-ness in impl header) - rust-lang#129000 (bootstrap: clear miri ui-test deps when miri sysroot gets rebuilt) - rust-lang#129013 (Remove unused script from run-make tests) - rust-lang#129017 (Replace `std::fmt:FormatterFn` with `std::fmt::from_fn`) Failed merges: - rust-lang#128935 (More work on `zstd` compression) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 12, 2024
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#128712 (Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver) - rust-lang#128912 (Store `do_not_recommend`-ness in impl header) - rust-lang#129000 (bootstrap: clear miri ui-test deps when miri sysroot gets rebuilt) - rust-lang#129013 (Remove unused script from run-make tests) - rust-lang#129017 (Replace `std::fmt:FormatterFn` with `std::fmt::from_fn`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 13, 2024
Rollup merge of rust-lang#128712 - compiler-errors:normalize-borrowck, r=lcnr Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver Realized that the new solver didn't handle ptr-to-ptr casting correctly. r? lcnr Built on rust-lang#128694
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.
Realized that the new solver didn't handle ptr-to-ptr casting correctly.
r? lcnr
Built on #128694