Repository navigation
Fix transmutability type mismatch bug - #163946
Conversation
|
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
|
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2efe77b to
73189a9
Compare
| //@ revisions: current next | ||
| //@ ignore-compare-mode-next-solver (explicit revisions) | ||
| //@ [next] compile-flags: -Znext-solver | ||
| //@ check-fail |
There was a problem hiding this comment.
what's that for?
There was a problem hiding this comment.
what 'that' exactly?
if you're referring to the revisions and check fail added to this test, I think I just added it to all transmute. does it not make sense in this one? is it because it's a rustfix test?
There was a problem hiding this comment.
I missed this test this while reviewing 😅 I think it would be great if we have why we need this test and what this test is for. (Not just for this one but all the new ones we add) If we already have a related issue or discussion that explains it well, just adding a link to it would be enough
There was a problem hiding this comment.
Yes, definitely! But since I'm not adding the test itself (the file was already there), I can't tell exactly what it is for. I'll look into the original commit and try to figure out.
Also I'll add links or comments to the other ones
There was a problem hiding this comment.
The new tests are these four:
- tests/ui/transmutability/pointer-aligned-to-next-solver.rs ((came from https://hackmd.io/ydc_nIbHQqG-ctMDapXYTg#featuretransmutability, which is already a doc test)
- tests/ui/transmutability/transmute-from-next-solver.rs (came from https://hackmd.io/ydc_nIbHQqG-ctMDapXYTg#featuretransmutability, which is already a doc test, but it's pretty close to
-Znext-solver=globallybreaksTransmuteFrom<&T>#161251) - tests/ui/transmutability/vec-recycle-next-solver.rs (came from zulip which is also a doc test mentioned by @lcnr )
- tests/ui/transmutability/with-condition-nested-goals.rs (this one has a comment explaining why it's there)
So considering 3 of the 4 tests are doc tests already, do you think it's best to remove them?
The third one is the one we discussed before, about testing the "add_goals", so I think it's worth keeping (and it's already commented explaining this).
There was a problem hiding this comment.
I originally asked about "//@ check-fail", that is unnecessary I think
I would not add the two doc tests
There was a problem hiding this comment.
Oh, because check-fail is the default right?
I thought explicit would be better, but I'll remove since it's implied.
@ShoyuVanilla what do you think, keep or drop tests/ui/transmutability/pointer-aligned-to-next-solver.rs and tests/ui/transmutability/transmute-from-next-solver.rs?
There was a problem hiding this comment.
Yeah dropping doc tests sgmt
There was a problem hiding this comment.
@lcnr @ShoyuVanilla removed both and removed the directive 13694b6
thanks for the feedbacks (:
|
@bors delegate+ |
|
@bors r=lcnr,ShoyuVanilla rollup |
…uVanilla Fix transmutability type mismatch bug Fixes rust-lang#161251 r? @ShoyuVanilla The change was done as instructed by @ShoyuVanilla and @lcnr on Zulip. There are some leftover questions I'll add as comments (self review). But the original examples are both fixed.
…uVanilla Fix transmutability type mismatch bug Fixes rust-lang#161251 r? @ShoyuVanilla The change was done as instructed by @ShoyuVanilla and @lcnr on Zulip. There are some leftover questions I'll add as comments (self review). But the original examples are both fixed.
…uwer Rollup of 8 pull requests Successful merges: - #164196 (`rust-analyzer` subtree update) - #164037 (Restrict application of optimization attributes from instance) - #164201 (Improve `--bless` output for `tests/debuginfo`) - #164202 ([rustdoc] Move the creation of `IndividualTestOptions` into the test runner closure to ensure the temporary folder is removed right after the test is done running) - #162140 (fn_addr_eq: we actually can guarantee basically nothing) - #163946 (Fix transmutability type mismatch bug) - #163978 (Copy over some methods from At to InferCtxt) - #164045 (-Zassumptions-on-binders: replace region vars with bound vars when handling alias outlives')
Rollup merge of #163946 - lsunsi:next-transmute, r=lcnr,ShoyuVanilla Fix transmutability type mismatch bug Fixes #161251 r? @ShoyuVanilla The change was done as instructed by @ShoyuVanilla and @lcnr on Zulip. There are some leftover questions I'll add as comments (self review). But the original examples are both fixed.
|
yikes xd, I meant #149228 😅 |
|
@lcnr The test added in #149228 passes cleanly on compare mode. Do you want me to open a PR with just the new test? Or maybe just close the PR directly? |
|
please add these tests in a separate PR, yeah 😊 |
Add transmutability test to cover for superseded PR Adds a test present in rust-lang#149228 that was fixed by rust-lang#163946.
Add transmutability test to cover for superseded PR Adds a test present in rust-lang#149228 that was fixed by rust-lang#163946.
View all comments
Fixes #161251
r? @ShoyuVanilla
The change was done as instructed by @ShoyuVanilla and @lcnr on Zulip.
There are some leftover questions I'll add as comments (self review).
But the original examples are both fixed.