-
Notifications
You must be signed in to change notification settings - Fork 0
Support const blocks in const_continue #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: loop_match_attr
Are you sure you want to change the base?
Conversation
self.tcx | ||
.const_eval_resolve_for_typeck(self.typing_env(), uv, constant.span) | ||
.unwrap() | ||
.unwrap(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These unwraps and !has_param assertions should also be errors.
b0fed64
to
af92d9d
Compare
This needs a test. |
337bf45
to
5a77008
Compare
ConstOperand { | ||
span: self.thir[value].span, | ||
user_ty: None, | ||
const_: Const::Ty( | ||
self.thir[value].ty, | ||
ty::Const::new_value( | ||
self.tcx, | ||
ValTree::from_branches( | ||
self.tcx, | ||
[ValTree::from_scalar_int( | ||
self.tcx, | ||
variant_index.as_u32().into(), | ||
)], | ||
), | ||
self.thir[value].ty, | ||
), | ||
), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if this could reuse the logic in const eval.
368f722
to
a89dcbe
Compare
btw do you really want to force the target to be a literal |
d372ec2
to
96c7b35
Compare
I prefer not changing the parser. That makes it less likely that |
b47c983
to
2fc8c4c
Compare
b3a87ed
to
7d88da4
Compare
2fc8c4c
to
7ff01ec
Compare
No description provided.