Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up[WIP] The Genesis of Generic Germination #53645
Conversation
rust-highfive
assigned
eddyb
Aug 23, 2018
rust-highfive
added
the
S-waiting-on-review
label
Aug 23, 2018
This comment was marked as off-topic.
This comment was marked as off-topic.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
|
QuietMisdreavus
referenced this pull request
Aug 27, 2018
Merged
Don't show associated const value anymore #53409
mark-i-m
referenced this pull request
Aug 27, 2018
Open
Tracking issue for const generics (RFC 2000) #44580
This comment has been minimized.
This comment has been minimized.
|
(Somehow I read the title as "Genesis of Germanic Germination" and thought why we're adding i18n into rustc itself |
petrochenkov
self-assigned this
Aug 28, 2018
src/libsyntax/parse/parser.rs Outdated
src/libsyntax/parse/parser.rs Outdated
| let mut seen_ty_param = false; | ||
| let mut params = vec![]; | ||
| let mut max_param = None; | ||
| fn enforce_param_order(parser: &Parser, |
This comment has been minimized.
This comment has been minimized.
petrochenkov
Aug 31, 2018
Contributor
Parameters are kept in a single list now, so the order can be enforced in one place in AST validation.
| // parsing problem. Either mark all const args with const (or | ||
| // something else, it doesn't really matter) or merge const args | ||
| // and type args together at the AST level and separate them | ||
| // later on, probably when lowering to the HIR. |
This comment has been minimized.
This comment has been minimized.
petrochenkov
Aug 31, 2018
Contributor
If S<MY_CONST> is supposed to work, then it can use same approach as identifiers in patterns.
In AST it's PatKind::Ident, but in HIR it's turned into a proper pattern based on resolution, for const arguments it would be something like ast::GenericArg::Ident.
I agree this is not necessary to do in this PR though.
src/libsyntax/parse/parser.rs Outdated
petrochenkov
removed their assignment
Sep 1, 2018
This comment has been minimized.
This comment has been minimized.
|
(Note for triage: I'm going to get around to addressing these comments and hopefully fixing the existing crashes soon.) |
TimNN
added
S-waiting-on-author
and removed
S-waiting-on-review
labels
Sep 11, 2018
petrochenkov
referenced this pull request
Sep 20, 2018
Open
Make the turbofish syntax redundant #2544
This comment has been minimized.
This comment has been minimized.
|
Ping from triage! Since it's been I while, I was wondering if you could give us a small update on the status of this PR? |
This comment has been minimized.
This comment has been minimized.
|
I'm going to start investigating the ICE again soon (been busier than I expected). I think @eddyb's going to be leaving some comments soon as well. |
This comment has been minimized.
This comment has been minimized.
|
Ping from triage! Since it's been I while, I was wondering if you could give us a small update on the status of this PR? |
This comment has been minimized.
This comment has been minimized.
|
I've made progress in my local branch since last time, though not quite ready to push. I think a full review will be unlikely before the 2018 edition though, as things are getting busy close to the deadline. |
varkor
force-pushed the
varkor:const-generics-redux
branch
from
f0bae41
to
bfc4b41
Oct 16, 2018
This comment has been minimized.
This comment has been minimized.
|
@vakor: Thanks for the update! |
ExpHP
referenced this pull request
Oct 25, 2018
Open
False warning with #[warn(unused_imports)] for std::ops::Deref #51556
TimNN
added
the
A-allocators
label
Oct 30, 2018
| use lint::builtin::{self, PARENTHESIZED_PARAMS_IN_TYPES_AND_MODULES, | ||
| ELIDED_LIFETIMES_IN_PATHS}; | ||
| use hir::{GenericArg, ConstArg}; | ||
| use lint::builtin::{self, PARENTHESIZED_PARAMS_IN_TYPES_AND_MODULES, ELIDED_LIFETIMES_IN_PATHS}; |
This comment has been minimized.
This comment has been minimized.
eddyb
Nov 5, 2018
Member
This is surprising - these constants/statics should not be imported directly.
|
|
||
| fn consts(&mut self, c: &'tcx ty::Const<'tcx>, c2: &'tcx ty::Const<'tcx>) | ||
| -> RelateResult<'tcx, &'tcx ty::Const<'tcx>> { | ||
| assert_eq!(c, c2); // we are abusing TypeRelation here; both LHS and RHS ought to be == |
This comment has been minimized.
This comment has been minimized.
eddyb
Nov 5, 2018
Member
Huh, that's strange. I guess it's similar to types. I wonder why this hack exists at all.
This comment has been minimized.
This comment has been minimized.
varkor
Nov 6, 2018
Member
I just copied this from the relations for types and lifetimes, guessing it would be similar. I'm not sure why it's actually there.
This comment has been minimized.
This comment has been minimized.
nikomatsakis
Nov 30, 2018
Contributor
Answer: the type relation stuff tracks variance, and the folder does not. I've fixed this multiple times, but always in branches I wound up abandoning. Should just do it on a standalone branch at some point.
src/librustc/ty/relate.rs Outdated
src/librustc/ty/relate.rs Outdated
src/librustc_typeck/astconv.rs Outdated
src/librustdoc/clean/mod.rs Outdated
src/libserialize/serialize.rs Outdated
This comment has been minimized.
This comment has been minimized.
|
Other than the comments I left, I think this is good to go, after a rebase! r? @nikomatsakis (at least a quick look would be greatly appreciated) |
rust-highfive
assigned
nikomatsakis
and unassigned
eddyb
Nov 5, 2018
varkor
force-pushed the
varkor:const-generics-redux
branch
from
b91f20d
to
78bebcb
Nov 8, 2018
This comment has been minimized.
This comment has been minimized.
|
As rebasing is a real pain with a PR this large, I've temporarily flattened all the commits. I'll properly structure the changes closer to approval. |
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 |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
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 |
This comment was marked as outdated.
This comment was marked as outdated.
|
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 |
This comment was marked as outdated.
This comment was marked as outdated.
|
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 |
This comment was marked as outdated.
This comment was marked as outdated.
|
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 |
This comment was marked as outdated.
This comment was marked as outdated.
|
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 |
varkor
force-pushed the
varkor:const-generics-redux
branch
from
2cae5ef
to
cad6b4b
Nov 11, 2018
This comment was marked as outdated.
This comment was marked as outdated.
|
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 |
varkor
force-pushed the
varkor:const-generics-redux
branch
from
cad6b4b
to
d6828ce
Nov 11, 2018
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@varkor Will you get a chance to look at this shortly? It looks like there's a merge conflict and a CI failure from 5 days ago. |
This comment has been minimized.
This comment has been minimized.
|
@Mark-Simulacrum: hopefully this weekend, but there are still some remaining issues I have to sort out before it's ready for a second review yet. |
This comment has been minimized.
This comment has been minimized.
|
@varkor (ps, sorry for being slow, excited to review this though! Sounds like maybe I should wait though until you resolve a few things?) |
This comment has been minimized.
This comment has been minimized.
|
Triage; @varkor Have you been able to get back to this PR? |
This comment has been minimized.
This comment has been minimized.
|
Sorry, I am going to get to this. I've been quite busy recently. This is my priority when I get time. |
nikomatsakis
approved these changes
Nov 30, 2018
Did a first round of review. Looks excellent. Going to build locally also to investigate.
| fn consts(&mut self, a: &'tcx ty::Const<'tcx>, b: &'tcx ty::Const<'tcx>) | ||
| -> RelateResult<'tcx, &'tcx ty::Const<'tcx>> { | ||
| if let ConstValue::Infer(InferConst::Canonical(_)) = a.val { | ||
| // self.relate_var(a.into(), b.into())?; // FIXME(const_generics) |
This comment has been minimized.
This comment has been minimized.
nikomatsakis
Nov 30, 2018
Contributor
This doesn't seem great.. at least do unimplemented! or something =)
varkor
added some commits
Nov 8, 2018
varkor
force-pushed the
varkor:const-generics-redux
branch
from
d6828ce
to
96295ad
Dec 21, 2018
This comment has been minimized.
This comment has been minimized.
|
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 |
varkor commentedAug 23, 2018
Long had its coming been foretold: a collaborative effort with @yodaldevoid, set in motion by @jplatte, to beget a new Kind: one of a very different Sort to those that come before it. Amidst promises of ineffable powers previously thought unobtainable, few dared believe that the prophecies were true. But as they gazed upon that which claimed to be the Beginning, a few gentle sparks of hope fluttered deep within. It was not Time yet. But it was a Sign. And maybe, for some, that was enough.
There's a long way to go, but we're at the point where we would benefit from GitHub's reviewing capabilities.
r? @eddyb