Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upimplement `zip_binders` and add some `dyn Trait`/`impl Trait` tests #282
Conversation
409dce3
to
93e2ca3
fn split(&self) -> (&[ParameterKind<()>], &Self::Output) { | ||
(&self.binders, &self.value) | ||
let p: fn(usize) -> ParameterKind<()> = make_lifetime; | ||
((0..self.num_binders).map(p), &self.ty) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
nikomatsakis
Nov 12, 2019
Author
Collaborator
Because you can't name the resulting type -- the type of make_lifetime
is a unique ZST tied to that function, and it can't be typed. Really what I want here is impl Trait
but that's not available in this context on stable.
This comment has been minimized.
This comment has been minimized.
I'm not sure what am I being pinged for |
This comment has been minimized.
This comment has been minimized.
LGTM after comments |
|
||
goal { | ||
forall<'static> { | ||
dyn forall<'a> Foo<Ref<'a>> + Bar: Foo<Ref<'static>> |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
0e32d60
to
ac3d1e7
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.
nikomatsakis commentedNov 11, 2019
Fixes #275
r? @tmandry -- or somebody else?
cc @kennytm
cc @flodiebold -- I think this makes dyn Trait in chalk work?