mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-22 11:53:44 +00:00
Rollup merge of #98727 - notriddle:notriddle/issue-98697, r=GuillaumeGomez
rustdoc: filter '_ lifetimes from ty::PolyTraitRef Fixes #98697
This commit is contained in:
commit
e59693a046
@ -167,7 +167,7 @@ fn clean_poly_trait_ref_with_bindings<'tcx>(
|
||||
.collect_referenced_late_bound_regions(&poly_trait_ref)
|
||||
.into_iter()
|
||||
.filter_map(|br| match br {
|
||||
ty::BrNamed(_, name) => Some(GenericParamDef {
|
||||
ty::BrNamed(_, name) if name != kw::UnderscoreLifetime => Some(GenericParamDef {
|
||||
name,
|
||||
kind: GenericParamDefKind::Lifetime { outlives: vec![] },
|
||||
}),
|
||||
|
@ -0,0 +1,9 @@
|
||||
/// When reexporting this function, make sure the anonymous lifetimes are not rendered.
|
||||
///
|
||||
/// https://github.com/rust-lang/rust/issues/98697
|
||||
pub fn repro<F>()
|
||||
where
|
||||
F: Fn(&str),
|
||||
{
|
||||
unimplemented!()
|
||||
}
|
13
src/test/rustdoc/issue-98697.rs
Normal file
13
src/test/rustdoc/issue-98697.rs
Normal file
@ -0,0 +1,13 @@
|
||||
// aux-build:issue-98697-reexport-with-anonymous-lifetime.rs
|
||||
// ignore-cross-compile
|
||||
|
||||
// When reexporting a function with a HRTB with anonymous lifetimes,
|
||||
// make sure the anonymous lifetimes are not rendered.
|
||||
//
|
||||
// https://github.com/rust-lang/rust/issues/98697
|
||||
|
||||
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;
|
Loading…
Reference in New Issue
Block a user