Uh oh!
There was an error while loading. Please reload this page.
Add const generics to the HIR - #58503
Conversation
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
14dfb4d to
0b4cd07Compare0b4cd07 to
18ce997Compare| #[derive(Clone, RustcEncodable, RustcDecodable, Debug)] | ||
| pub struct ConstArg { | ||
| pub value: AnonConst, | ||
| pub span: Span, |
There was a problem hiding this comment.
This span is identical to the span in body of AnonConst, is it viable to use it instead?
Other AnonConsts don't create extra spans during lowering as far as can I see.
There was a problem hiding this comment.
(The whole ConstArg could be refactored away in that case.)
There was a problem hiding this comment.
Ugh, I see GenericArg::span wants to work in isolation without any contexts.
There was a problem hiding this comment.
Yeah, we went through the same thought process when this was implemented. If you can see a way to refactor this, I'd be all ears.
Uh oh!
There was an error while loading. Please reload this page.
petrochenkov
commented
Feb 16, 2019
LGTM, r=me modulo removing abort / adding lint test (#58503 (comment)). I'll keep @eddyb assigned in case he wants to look. |
varkor
commented
Feb 16, 2019
@bors r=petrochenkov p=1 (Increasing priority because this unblocks other work.) |
bors
commented
Feb 16, 2019
📌 Commit 727e204 has been approved by |
bors
commented
Feb 17, 2019
⌛ Testing commit 727e204 with merge 3cdf81e0294cfe7414af2cae07bd3e82d1975058... |
Centril
commented
Feb 17, 2019
@bors retry |
| } | ||
| hir::GenericParamKind::Const { .. } => { | ||
| let def_id = self.tcx.hir().local_def_id(param.id); | ||
| let encode_info = IsolatedEncoder::encode_info_for_const_param; |
There was a problem hiding this comment.
Maybe open an issue about unifying the param encoding in metadata, the same way GenericParamDef has common fields?
bors
commented
Feb 19, 2019
Add const generics to the HIR Split out from #53645. cc @yodaldevoid r? @eddyb
bors
commented
Feb 19, 2019
☀️ Test successful - checks-travis, status-appveyor |
…tor, r=eddyb Refactor generic parameter encoder functions Addresses rust-lang#58503 (comment). r? @eddyb
…tor, r=eddyb Refactor generic parameter encoder functions Addresses rust-lang#58503 (comment). r? @eddyb
Split out from #53645. This work is a collaborative effort with @yodaldevoid.
r? @eddyb