- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Description
# Cargo.toml
[package]
name = "repro"
version = "0.0.0"
edition = "2021"
publish = false
[dependencies]
foo = { path = "foo" }// src/lib.rs
pub use foo::repro;# foo/Cargo.toml
[package]
name = "foo"
version = "0.0.0"
edition = "2021"
publish = false// foo/src/lib.rs
pub fn repro<F>()
where
    F: Fn(&str),
{
    unimplemented!()
}The correct behavior is for both crates' docs to render repro as:
However, recent versions of nightly rustdoc render foo::repro as the above, while rendering repro::repro incorrectly as:
I believe this is a bug because that is not valid syntax in Rust.
error[E0637]: `'_` cannot be used here
 --> src/lib.rs:3:12
  |
3 |     F: for<'_> Fn(&str),
  |            ^^ `'_` is a reserved lifetime nameMetadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.

