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
3 changed files with 13 additions and 0 deletions
|
@ -629,6 +629,7 @@ fn clean_ty_generics<'tcx>(
|
||||||
.params
|
.params
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|param| match param.kind {
|
.filter_map(|param| match param.kind {
|
||||||
|
ty::GenericParamDefKind::Lifetime if param.name == kw::UnderscoreLifetime => None,
|
||||||
ty::GenericParamDefKind::Lifetime => Some(param.clean(cx)),
|
ty::GenericParamDefKind::Lifetime => Some(param.clean(cx)),
|
||||||
ty::GenericParamDefKind::Type { synthetic, .. } => {
|
ty::GenericParamDefKind::Type { synthetic, .. } => {
|
||||||
if param.name == kw::SelfUpper {
|
if param.name == kw::SelfUpper {
|
||||||
|
|
|
@ -7,3 +7,11 @@ where
|
||||||
{
|
{
|
||||||
unimplemented!()
|
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' 'fn repro<F>() where F: Fn(&str)'
|
||||||
// @!has issue_98697/fn.repro.html '//pre[@class="rust fn"]/code' 'for<'
|
// @!has issue_98697/fn.repro.html '//pre[@class="rust fn"]/code' 'for<'
|
||||||
pub use issue_98697_reexport_with_anonymous_lifetime::repro;
|
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…
Add table
Add a link
Reference in a new issue