Uh oh!
There was an error while loading. Please reload this page.
Fix const evaluation ICE in rustdoc - #47862
Conversation
eddyb
commented
Jan 29, 2018
@bors r+ |
bors
commented
Jan 29, 2018
📌 Commit c786dca has been approved by |
ollie27
commented
Jan 30, 2018
The same issue exists when cross crate inlining: rust/src/librustdoc/clean/mod.rs Line 2580 in 90eb44a |
eddyb
commented
Jan 30, 2018
@ollie27 Oh, right. That would have to show |
ollie27
commented
Jan 30, 2018
Would changing that line to this not work? ifletOk(new_n) = cx.tcx.const_eval(param_env.and((def_id, substs))){
n = new_n;} |
eddyb
commented
Jan 30, 2018
Oh oops sorry you're right! @bors r- |
c786dca to
a0cbb7fCompareGuillaumeGomez
commented
Jan 30, 2018
Updated. |
There was a problem hiding this comment.
Can you use the same trick in the other function? You just have to do this first, before const_eval:
let n = tcx.mk_const(ty::Const{val:ConstVal::Unevaluated(def_id, substs),ty: tcx.types.usize});There was a problem hiding this comment.
Do you mean instead of const_eval? Otherwise, this new assignement to n will never be used...
There was a problem hiding this comment.
I mean it'd be this in the other place (line 2450) - rewrote it a bit since previous comment:
let n = cx.tcx.const_eval(param_env.and((def_id, substs))).unwrap_or_else(|_| {
cx.tcx.mk_const(ty::Const{val:ConstVal::Unevaluated(def_id, substs),ty: cx.tcx.types.usize})});a0cbb7f to
6b35d81CompareGuillaumeGomez
commented
Feb 3, 2018
Updated. |
eddyb
commented
Feb 3, 2018
@bors r+ |
bors
commented
Feb 3, 2018
📌 Commit 6b35d81 has been approved by |
…, r=eddyb Fix const evaluation ICE in rustdoc Fixesrust-lang#47860. r? @eddyb
bors
commented
Feb 4, 2018
⌛ Testing commit 6b35d81 with merge edecd1a5251488e5b7001ad0eee516738f648149... |
bors
commented
Feb 4, 2018
💔 Test failed - status-appveyor |
kennytm
commented
Feb 4, 2018
…, r=eddyb Fix const evaluation ICE in rustdoc Fixesrust-lang#47860. r? @eddyb
…, r=eddyb Fix const evaluation ICE in rustdoc Fixesrust-lang#47860. r? @eddyb
bors
commented
Feb 5, 2018
bors
commented
Feb 5, 2018
💥 Test timed out |
@bors clean r- retry (This PR was stuck in the queue as "failure" state.) |
Fixes#47860.
r? @eddyb