Move trait prototype - #161457
Conversation
|
Thanks for the pull request, and welcome! The Rust Project has assigned @lcnr (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
|
A quick |
wow that were a lot of them. looks like the next batch is a bunch of |
This comment has been minimized.
This comment has been minimized.
|
looking at the errors, there is also a bunch of Those are all checks going around the That sure raises a question - can we handle them now? ummm - putting this aside in favour of lower hanging fruits |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
it should give some info tho...
Oh wow that got done with A LOT of tests
This is one of the two options, the other being break ABI. I suspect we can do it, Rust not having a stable one (?)
mostly to avoid adding to every single dynamic symbol the `+ Move`
the output uses the debug print and parses it with regex fixed the regex to fetch the first trait, instead of Move
33dfdac to
30609e6
Compare
This comment has been minimized.
This comment has been minimized.
I am _almost_ sure this is what nia wanted to write. I am modifying the behaviour, but I don't see how should it be different, as Move enters now the implicit trait group
This comment has been minimized.
This comment has been minimized.
|
The job Click to see the possible cause of the failure (guessed by this bot)Important For more information how to resolve CI failures of this job, visit this link. |
|
|
||
| // We don't support empty trait objects. | ||
| if regular_traits.is_empty() && auto_traits.is_empty() { | ||
| if regular_traits.iter().all(|t| tcx.is_implicit_trait(t.0.skip_binder().def_id(), false)) |
There was a problem hiding this comment.
hmm, feel like this can just be regular_traits.chain(auto_traits).all(is_implicit_trait)
also existing, but can you replace the bool of is_implicit_trait wth an enum, e.g.
enum WhateverThisfunctionwants {
Yes,
No,
}
*[View changes since the review](https://triagebot.infra.rust-lang.org/gh-changes-since/rust-lang/rust/161457/9a4ad59ae3073b013cd62f53f8349ddc61a012e8..5a6f61532811493d3a1fd88aecf71ce42594ec2e)*| write!(self, " + ")?; | ||
| } | ||
| first = false; | ||
| write!(self, "PointeeSized")?; |
There was a problem hiding this comment.
do we want somethign like... we do repeat this pattern a lot
let mut first = false;
let mut print_bound = |bound| {
if !first {
write!(self, " + ")?;
first = false;
}
self.write_str(bound)
};
*[View changes since the review](https://triagebot.infra.rust-lang.org/gh-changes-since/rust-lang/rust/161457/9a4ad59ae3073b013cd62f53f8349ddc61a012e8..5a6f61532811493d3a1fd88aecf71ce42594ec2e)*| .collect() | ||
| } else { | ||
| clauses.into_iter().collect() | ||
| }; |
There was a problem hiding this comment.
that one is unfortunately somewhat problematic. gather_explicit_clauses_of is used by a query whose result we write to crate metadata, so this would erase the Move bound from upstream crates which don't have the feature enabled.
Why is this needed
|
☔ The latest upstream changes (presumably #161906) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
Finishing the work started by @nia-e in #156018 :
TODO
feature(move_trait)MoveMoveMoveboundsdyn Movedieselregressesr? lcnr