-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Introduce mir::Unevaluated #102056
Introduce mir::Unevaluated #102056
Conversation
Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred in const_evaluatable.rs cc @lcnr |
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.
nice, small nits, then r=me
impl<'tcx> Unevaluated<'tcx> { | ||
// FIXME: probably should get rid of this method. It's also wrong to | ||
// shrink and then later expand a promoted. | ||
#[inline] |
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.
yeah, once we've removed visit_mir_constant
we should be able to remove this, probably makes sense to do that in yet another pr 😁
☔ The latest upstream changes (presumably #102061) made this pull request unmergeable. Please resolve the merge conflicts. |
6f42f1a
to
85aa94f
Compare
23d044f
to
fad44e0
Compare
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.
final nit, then r=me
@bors delegate+ |
✌️ @b-naber can now approve this pull request |
fad44e0
to
43ddb7f
Compare
43ddb7f
to
a705e65
Compare
@@ -605,7 +605,7 @@ impl<'tcx> Inliner<'tcx> { | |||
caller_body.required_consts.extend( | |||
callee_body.required_consts.iter().copied().filter(|&ct| match ct.literal { | |||
ConstantKind::Ty(_) => { | |||
bug!("should never encounter ty::Unevaluated in `required_consts`") | |||
bug!("should never encounter ty::UnevaluatedConst in `required_consts`") |
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.
this should be "unexpected ty::Const
"
@bors r+ rollup=never maybe perf relevant, probably not 🤷 the queue is pretty short rn |
☀️ Test successful - checks-actions |
Finished benchmarking commit (9a963e3): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
Introduce mir::Unevaluated Previously the distinction between unevaluated constants in the type-system and in mir was not explicit and a little confusing. Probably better to introduce its own type for that. r? `@lcnr`
Previously the distinction between unevaluated constants in the type-system and in mir was not explicit and a little confusing. Probably better to introduce its own type for that.
r? @lcnr