-
Notifications
You must be signed in to change notification settings - Fork 13k
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
nightly rustdoc reaches recursion limit while beta works fine #79506
Comments
Reduced repro steps:
#![no_std]
pub struct B0;
pub struct B1;
use core::ops::Shl;
use core::ops::Sub;
pub type Shleft<A, B> = <A as Shl<B>>::Output;
pub type Sub1<A> = <A as Sub<B1>>::Output;
pub struct UInt<U, B> {
pub(crate) msb: U,
pub(crate) lsb: B,
}
impl<U, B, Ur, Br> Shl<UInt<Ur, Br>> for UInt<U, B>
where
UInt<Ur, Br>: Sub<B1>,
UInt<UInt<U, B>, B0>: Shl<Sub1<UInt<Ur, Br>>>,
{
type Output = Shleft<UInt<UInt<U, B>, B0>, Sub1<UInt<Ur, Br>>>;
fn shl(self, rhs: UInt<Ur, Br>) -> Self::Output {
unimplemented!()
}
}
Documenting @rustbot label: T-rustdoc regression-from-stable-to-nightly |
Duplicate of #79459 |
This is slightly different from #79459 in that the trait system didn't notice immediately that it was a cycle ... not sure what the difference is. Backtrace
In particular, it sees this match and gives up: rust/compiler/rustc_trait_selection/src/traits/select/mod.rs Lines 954 to 961 in e37f25a
which gives me hope this could be fixed by running queries in canonical mode. |
For the
fixed
crate (which uses typenum),fails with
error[E0275]: overflow evaluating the requirement
.Stable and beta work. Building with
cargo +nightly build
also works.I also tried the suggestion
help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`fixed`)
. But it did not help, and if I keep on increasing the limit, finally I get(signal: 6, SIGABRT: process abort signal)
.Meta
rustc +nightly --version --verbose
:The text was updated successfully, but these errors were encountered: