We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 confusingly renders the following function:
pub fn takes_ref<T>(foo: &T) where for<'a> &'a T: Sized {}
(Sized bound just used for demonstration, I know this doesn't add any meaning.)
Sized
as this:
pub fn takes_ref<T>(foo: &T) where &'a T: Sized
The for<'a> is omitted when it shouldn't be, because there's now magically a lifetime parameter that doesn't appear to be declared anywhere.
for<'a>
This doesn't just affect functions, of course:
pub struct Foo<T>(T) where for<'a> &'a T: Sized; // Rendered: pub struct Foo<T>(_) where &'a T: Sized;
pub trait Foo<T> where for<'a> &'a T: Sized {} // Rendered: pub trait Foo<T> where &'a T: Sized { }
Higher-ranked lifetimes on the right-hand side of a where clause bound are rendered correctly:
where
pub trait Foo<T> where T: for<'a> Bar<'a> {} pub trait Bar<'a> {} // `Foo` rendered: pub trait Foo<T> where T: for<'a> Bar<'a> { }
The text was updated successfully, but these errors were encountered:
Causing confusion in the wild.
Sorry, something went wrong.
Triage: duplicate of #78482 (or the other way around), fixed on nightly by #84814.
No branches or pull requests
Rustdoc confusingly renders the following function:
(
Sized
bound just used for demonstration, I know this doesn't add any meaning.)as this:
The
for<'a>
is omitted when it shouldn't be, because there's now magically a lifetime parameter that doesn't appear to be declared anywhere.This doesn't just affect functions, of course:
Higher-ranked lifetimes on the right-hand side of a
where
clause bound are rendered correctly:The text was updated successfully, but these errors were encountered: