-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
rustdoc: ICE: synthetic blanket impls: no errors encountered even though span_delayed_bug
issued
#119792
Comments
span_delayed_bug
issuedspan_delayed_bug
issued
I've been poking at this for a bit, and haven't really gotten a full MCVE (it still depends on extern crate num_traits;
pub(crate) struct Rad<S>(S);
pub(crate) struct AngleWrapped<S>(S);
impl<S> std::ops::Add for AngleWrapped<S> {
type Output = ();
fn add(self, other: Self) -> Self::Output {
loop {}
}
}
impl<S> std::ops::Add<Rad<S>> for AngleWrapped<S> {
type Output = ();
fn add(self, angle: Rad<S>) -> Self::Output {
loop {}
}
}
impl<S> std::ops::Sub for AngleWrapped<S> {
type Output = ();
fn sub(self, other: Self) -> Self::Output {
loop {}
}
}
impl<S> std::ops::Sub<Rad<S>> for AngleWrapped<S> {
type Output = ();
fn sub(self, angle: Rad<S>) -> Self::Output {
loop {}
}
}
impl<S> std::ops::Mul<S> for AngleWrapped<S> {
type Output = ();
fn mul(self, scalar: S) -> Self::Output {
loop {}
}
}
impl<S> std::ops::Div for AngleWrapped<S> {
type Output = ();
fn div(self, other: Self) -> Self::Output {
loop {}
}
}
impl<S> std::ops::Rem for AngleWrapped<S> {
type Output = ();
fn rem(self, other: Self) -> Self::Output {
loop {}
}
} |
Also, bisected this and got searched nightlies: from nightly-2023-12-14 to nightly-2023-12-15 bisected with cargo-bisect-rustc v0.6.7Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start=2023-12-14 --end=2023-12-15 --preserve -- doc Looks like #117749 ? |
Minimized to: struct Wrapper<T>(T);
trait Div<Rhs> {}
trait Mul<Rhs> {
type Output;
}
impl<T> Mul<T> for Wrapper<T> {
type Output = ();
}
impl<T> Div<Self> for Wrapper<T> {}
pub trait NumOps<Rhs> {}
impl<T, Rhs> NumOps<Rhs> for T where T: Mul<Rhs, Output = ()> + Div<Rhs> {} |
Triage: I can no longer reproduce this. Can be closed once a regression test has been added. |
span_delayed_bug
issuedspan_delayed_bug
issued
…ket-impls, r=GuillaumeGomez rustdoc: add a regression test for a former blanket impl synthesis ICE Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering). r? rustdoc
…ket-impls, r=GuillaumeGomez rustdoc: add a regression test for a former blanket impl synthesis ICE Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering). r? rustdoc
…ket-impls, r=GuillaumeGomez rustdoc: add a regression test for a former blanket impl synthesis ICE Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering). r? rustdoc
…ket-impls, r=GuillaumeGomez rustdoc: add a regression test for a former blanket impl synthesis ICE Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering). r? rustdoc
…ket-impls, r=GuillaumeGomez rustdoc: add a regression test for a former blanket impl synthesis ICE Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering). r? rustdoc
Rollup merge of rust-lang#125909 - fmease:rustdoc-add-test-synth-blanket-impls, r=GuillaumeGomez rustdoc: add a regression test for a former blanket impl synthesis ICE Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering). r? rustdoc
This only happens with rust doc.
Crate builds and runs tests successfully on current master: https://gitlab.com/spearman/math-utils-rs/-/commit/9a16929f40de8a21815cae85d889bca8edf28ae2
ICE occurs with
$ cargo doc --no-deps
Code
The backtrace doesn't seem to point to any specific code in the crate.
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: