Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upThe Great Generics Generalisation: Ty Edition #48523
Conversation
rust-highfive
assigned
eddyb
Feb 25, 2018
rust-highfive
added
the
S-waiting-on-review
label
Feb 25, 2018
This comment has been minimized.
This comment has been minimized.
|
|
bors
added
S-waiting-on-author
and removed
S-waiting-on-review
labels
Feb 25, 2018
varkor
force-pushed the
varkor:generics-ty-generalisations
branch
5 times, most recently
from
2a0b89e
to
b4dbc02
Feb 25, 2018
This comment has been minimized.
This comment has been minimized.
|
Ping from triage, @varkor ! You have some merge conflicts you need to address, will you be able to get to those soon? |
varkor
referenced this pull request
Mar 2, 2018
Merged
The Great Generics Generalisation: HIR Edition #48149
This comment has been minimized.
This comment has been minimized.
|
@shepmaster: the merge conflicts should all be fairly routine (this code has a reasonably high bitrot rate) — I should be able to fix them without issue after a review, so I'll wait for now to avoid repeatedly fixing new conflicts as they arise. |
shepmaster
added
S-waiting-on-review
and removed
S-waiting-on-author
labels
Mar 3, 2018
This comment has been minimized.
This comment has been minimized.
|
Ping from triage, @eddyb ! |
eddyb
reviewed
Mar 6, 2018
| pub fn own_count(&self) -> usize { | ||
| self.regions.len() + self.types.len() | ||
| self.params.len() | ||
| } |
This comment has been minimized.
This comment has been minimized.
eddyb
reviewed
Mar 6, 2018
| regions.into_iter().map(|lt| ty::GenericParam::Lifetime(lt)).collect(); | ||
| let types: Vec<ty::GenericParam> = | ||
| types.into_iter().map(|ty| ty::GenericParam::Type(ty)).collect(); | ||
| let params = lifetimes.into_iter().chain(types.into_iter()).collect(); |
This comment has been minimized.
This comment has been minimized.
eddyb
reviewed
Mar 6, 2018
| if let Some(index) = param.index.checked_sub(self.parent_count() as u32) { | ||
| &self.regions[index as usize - self.has_self as usize] | ||
| if let Some(index) = param.index.checked_sub(self.parent_count as u32) { | ||
| // We're currently assuming that lifetimes precede other generic parameters. |
This comment has been minimized.
This comment has been minimized.
eddyb
reviewed
Mar 6, 2018
| } | ||
| }; | ||
| assert_eq!(def.index() as usize, substs.len()); | ||
| substs.push(param.pack()); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
|
bors
added
S-waiting-on-author
and removed
S-waiting-on-review
labels
Mar 6, 2018
varkor
force-pushed the
varkor:generics-ty-generalisations
branch
from
b4dbc02
to
d0b0eb7
Mar 8, 2018
This comment has been minimized.
This comment has been minimized.
|
|
varkor
force-pushed the
varkor:generics-ty-generalisations
branch
2 times, most recently
from
937afe9
to
689b927
Mar 8, 2018
pietroalbini
added
S-waiting-on-review
and removed
S-waiting-on-author
labels
Mar 12, 2018
This comment has been minimized.
This comment has been minimized.
|
@eddyb ping from triage! This PR has new commits that needs to be reviewed. |
varkor
added some commits
May 14, 2018
varkor
force-pushed the
varkor:generics-ty-generalisations
branch
from
8c72a03
to
5ea91ac
May 15, 2018
This comment was marked as resolved.
This comment was marked as resolved.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
kennytm
added
S-waiting-on-review
and removed
S-waiting-on-author
labels
May 15, 2018
nikomatsakis
approved these changes
May 15, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
bors
added
S-waiting-on-bors
and removed
S-waiting-on-review
labels
May 15, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
May 15, 2018
This comment has been minimized.
This comment has been minimized.
|
|
bors
merged commit 5be2bdb
into
rust-lang:master
May 16, 2018
This comment has been minimized.
This comment has been minimized.
|
Tested on commit e44fc6c.
|
varkor commentedFeb 25, 2018
Part of the generic parameter refactoring effort, split off from #48149. Contains the
ty-relative refactoring.r? @eddyb