Change:
Steps to reproduce:
I assume this is the same as
Running into this as well when running on 1.30.0-nightly ( 2018-08-05)
Hit this on the newest nightly ( 2018-08-18)
Same issue, slightly different line number Filtered log:
any idea what's going on here? let us know if you need T-compiler help :)
I didn't check yet, still on my todo list. I'll give it a look this week-end.
It would be great to have a minimized example here =)
True, I'll try to make one.
I think this is the same as as well
visited for triage. PR just needs to be landed.
Reopening; since we never backported , rustdoc ICE's on typenum again.
visiting for triage. It looks like PR is on target to be backported to stable. (In fact, the recent update of the labels to say just leads me to assume that the backport has occurred... yes, it was part of PR )
So, only two questions I have now: I openly mused to myself during this triage session that the failure to backport to beta sooner may represent a process failure of some sort. But there may be a very simple fix: Can/should we revise bors to not autoclose issues that are tagged as stable-to-beta or stable-to-stable regressions? Filed as barosl/homu On the subject of closing: Can we close this issue in light of ? Or do we need to wait until the 1.30.1 point release has officially been deployed?
Closed since 1.30.1 was released already.

Discussion:
&self, obligation: &PredicateObligation<'tcx>, ) -> bool { <del> self.evaluate_obligation(obligation).may_apply() </del> <ins> self.evaluate_obligation_no_overflow(obligation).may_apply() </ins> } /// Evaluates whether the predicate can be satisfied in the given

&self, obligation: &PredicateObligation<'tcx>, ) -> bool { <del> self.evaluate_obligation(obligation) == EvaluationResult::EvaluatedToOk </del> <ins> self.evaluate_obligation_no_overflow(obligation) == EvaluationResult::EvaluatedToOk </ins> } <del> // Helper function that canonicalizes and runs the query, as well as handles // overflow. fn evaluate_obligation( </del> <ins> /// Evaluate a given predicate, capturing overflow and propagating it back. pub fn evaluate_obligation( </ins> &self, obligation: &PredicateObligation<'tcx>, <del> ) -> EvaluationResult { </del> <ins> ) -> Result<EvaluationResult, OverflowError> { </ins> let mut _orig_values = SmallVec::new(); let c_pred = self.canonicalize_query(&obligation.param_env.and(obligation.predicate), &mut _orig_values); // Run canonical query. If overflow occurs, rerun from scratch but this time // in standard trait query mode so that overflow is handled appropriately // within `SelectionContext`. <del> match self.tcx.global_tcx().evaluate_obligation(c_pred) { </del> <ins> self.tcx.global_tcx().evaluate_obligation(c_pred) } // Helper function that canonicalizes and runs the query. If an // overflow results, we re-run it in the local context so we can // report a nice error. fn evaluate_obligation_no_overflow( &self, obligation: &PredicateObligation<'tcx>, ) -> EvaluationResult { match self.evaluate_obligation(obligation) { </ins> Ok(result) => result, Err(OverflowError) => { let mut selcx = SelectionContext::with_query_mode(&self, TraitQueryMode::Standard); selcx.evaluate_obligation_recursively(obligation) <del> .expect("Overflow should be caught earlier in standard query mode") </del> <ins> .unwrap_or_else(|r| { span_bug!( obligation.cause.span, "Overflow should be caught earlier in standard query mode: {:?}, {:?}", obligation, r, ) }) </ins> } } }

let tcx = self.tcx(); let trait_ref = cache_fresh_trait_pred.skip_binder().trait_ref; if self.can_use_global_caches(param_env) { <del> if let Some(trait_ref) = tcx.lift_to_global(&trait_ref) { </del> <ins> if let Err(Overflow) = candidate { // Don't cache overflow globally; we only produce this // in certain modes. } else if let Some(trait_ref) = tcx.lift_to_global(&trait_ref) { </ins> if let Some(candidate) = tcx.lift_to_global(&candidate) { debug!( "insert_candidate_cache(trait_ref={:?}, candidate={:?}) global",

super::ConstEvalFailure(ref err) => tcx.lift(&**err).map(|err| super::ConstEvalFailure( err.into(), )), <del> super::Overflow => bug!(), // FIXME: ape ConstEvalFailure? </del> <ins> super::Overflow => Some(super::Overflow), </ins> } } }

// FIXME(eddyb) ignoring `obligations` might cause false positives. drop(obligations); <del> let may_apply = infcx.predicate_may_hold(&traits::Obligation::new( cause.clone(), param_env, trait_ref.to_predicate(), )); </del> <ins> debug!( "invoking predicate_may_hold: {:?}", trait_ref, ); let may_apply = match infcx.evaluate_obligation( &traits::Obligation::new( cause.clone(), param_env, trait_ref.to_predicate(), ), ) { Ok(eval_result) => eval_result.may_apply(), Err(traits::OverflowError) => true, // overflow doesn't mean yes *or* no }; </ins> if !may_apply { return }

<ins> // Regression test for #52873. We used to ICE due to unexpected // overflows when checking for "blanket impl inclusion". use std::marker::PhantomData; use std::cmp::Ordering; use std::ops::{Add, Mul}; pub type True = B1; pub type False = B0; pub type U0 = UTerm; pub type U1 = UInt<UTerm, B1>; pub trait NonZero {} pub trait Bit { } pub trait Unsigned { } #[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Hash, Debug, Default)] pub struct B0; impl B0 { #[inline] pub fn new() -> B0 { B0 } } #[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Hash, Debug, Default)] pub struct B1; impl B1 { #[inline] pub fn new() -> B1 { B1 } } impl Bit for B0 { } impl Bit for B1 { } impl NonZero for B1 {} pub trait PrivatePow<Y, N> { type Output; } pub type PrivatePowOut<A, Y, N> = <A as PrivatePow<Y, N>>::Output; pub type Add1<A> = <A as Add<::B1>>::Output; pub type Prod<A, B> = <A as Mul<B>>::Output; pub type Square<A> = <A as Mul>::Output; pub type Sum<A, B> = <A as Add<B>>::Output; #[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Hash, Debug, Default)] pub struct UTerm; impl UTerm { #[inline] pub fn new() -> UTerm { UTerm } } impl Unsigned for UTerm { } #[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Hash, Debug, Default)] pub struct UInt<U, B> { _marker: PhantomData<(U, B)>, } impl<U: Unsigned, B: Bit> UInt<U, B> { #[inline] pub fn new() -> UInt<U, B> { UInt { _marker: PhantomData, } } } impl<U: Unsigned, B: Bit> Unsigned for UInt<U, B> { } impl<U: Unsigned, B: Bit> NonZero for UInt<U, B> {} impl Add<B0> for UTerm { type Output = UTerm; fn add(self, _: B0) -> Self::Output { UTerm } } impl<U: Unsigned, B: Bit> Add<B0> for UInt<U, B> { type Output = UInt<U, B>; fn add(self, _: B0) -> Self::Output { UInt::new() } } impl<U: Unsigned> Add<U> for UTerm { type Output = U; fn add(self, _: U) -> Self::Output { unsafe { ::std::mem::uninitialized() } } } impl<U: Unsigned, B: Bit> Mul<B0> for UInt<U, B> { type Output = UTerm; fn mul(self, _: B0) -> Self::Output { UTerm } } impl<U: Unsigned, B: Bit> Mul<B1> for UInt<U, B> { type Output = UInt<U, B>; fn mul(self, _: B1) -> Self::Output { UInt::new() } } impl<U: Unsigned> Mul<U> for UTerm { type Output = UTerm; fn mul(self, _: U) -> Self::Output { UTerm } } impl<Ul: Unsigned, B: Bit, Ur: Unsigned> Mul<UInt<Ur, B>> for UInt<Ul, B0> where Ul: Mul<UInt<Ur, B>>, { type Output = UInt<Prod<Ul, UInt<Ur, B>>, B0>; fn mul(self, _: UInt<Ur, B>) -> Self::Output { unsafe { ::std::mem::uninitialized() } } } pub trait Pow<Exp> { type Output; } impl<X: Unsigned, N: Unsigned> Pow<N> for X where X: PrivatePow<U1, N>, { type Output = PrivatePowOut<X, U1, N>; } impl<Y: Unsigned, X: Unsigned> PrivatePow<Y, U0> for X { type Output = Y; } impl<Y: Unsigned, X: Unsigned> PrivatePow<Y, U1> for X where X: Mul<Y>, { type Output = Prod<X, Y>; } impl<Y: Unsigned, U: Unsigned, B: Bit, X: Unsigned> PrivatePow<Y, UInt<UInt<U, B>, B0>> for X where X: Mul, Square<X>: PrivatePow<Y, UInt<U, B>>, { type Output = PrivatePowOut<Square<X>, Y, UInt<U, B>>; } </ins>