mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
rustdoc: filter '_ lifetimes from ty::Generics
Fixes a weirdly-rendered section of the std::string::String docs.
This commit is contained in:
parent
5b9775fe17
commit
3ac1a9b50d
@ -629,6 +629,7 @@ fn clean_ty_generics<'tcx>(
|
||||
.params
|
||||
.iter()
|
||||
.filter_map(|param| match param.kind {
|
||||
ty::GenericParamDefKind::Lifetime if param.name == kw::UnderscoreLifetime => None,
|
||||
ty::GenericParamDefKind::Lifetime => Some(param.clean(cx)),
|
||||
ty::GenericParamDefKind::Type { synthetic, .. } => {
|
||||
if param.name == kw::SelfUpper {
|
||||
|
@ -7,3 +7,11 @@ where
|
||||
{
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub struct Extra;
|
||||
|
||||
pub trait MyTrait<T> {
|
||||
fn run() {}
|
||||
}
|
||||
|
||||
impl MyTrait<&Extra> for Extra {}
|
||||
|
@ -11,3 +11,7 @@ extern crate issue_98697_reexport_with_anonymous_lifetime;
|
||||
// @has issue_98697/fn.repro.html '//pre[@class="rust fn"]/code' 'fn repro<F>() where F: Fn(&str)'
|
||||
// @!has issue_98697/fn.repro.html '//pre[@class="rust fn"]/code' 'for<'
|
||||
pub use issue_98697_reexport_with_anonymous_lifetime::repro;
|
||||
|
||||
// @has issue_98697/struct.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header in-band"]' 'impl MyTrait<&Extra> for Extra'
|
||||
// @!has issue_98697/struct.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header in-band"]' 'impl<'
|
||||
pub use issue_98697_reexport_with_anonymous_lifetime::Extra;
|
||||
|
Loading…
Reference in New Issue
Block a user