-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 removes Try from <Self as Try>::Residual in std::ops::FromResidual #85454
Comments
Hypothesis: this a a weird case in the associated type normalization, since in just about any other position this would only be allowed because there'd be a (It's a very unusual case, and also broke R-A: rust-lang/rust-analyzer#8692) |
I researched a bit into this issue. The problem is that rustdoc never renders a rust/src/librustdoc/html/format.rs Lines 840 to 845 in 9f8012e
This is another example where the cast is stripped away by rustdoc: pub trait A {
type Tar;
}
pub struct Foo {}
impl Foo {
pub fn foo() -> <Self as A>::Tar {}
}
impl A for Foo { type Tar = u32; } would be shown as: pub fn foo() -> Self::Tar However, it's a bit harder to fix this because simply removing this check would lead to false-positive where |
This needs to be re-opened because it does not work if the trait is re-exported. I will try to investigate and fix it in the next few days |
@Stupremee #84579 might be related. |
Cross Crate re-exports are really weird in general. They already caused me so much pain |
@Stupremee #84579 (comment) might be interesting. |
In the docs for the new FromResidual trait here:
https://doc.rust-lang.org/nightly/std/ops/trait.FromResidual.html
The trait is shown as:
which is not valid and will not compile, in the source it looks like this:
The text was updated successfully, but these errors were encountered: