Skip to content

Rustdoc doesn't show default type parameters #12291

New issue

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

Closed
huonw opened this issue Feb 15, 2014 · 1 comment
Closed

Rustdoc doesn't show default type parameters #12291

huonw opened this issue Feb 15, 2014 · 1 comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@huonw
Copy link
Member

huonw commented Feb 15, 2014

In

#[feature(default_type_params)];
#[crate_id="deftypar"];
#[crate_type="lib"];

/// Docs...
pub struct Foo<A = int>;

Foo gets rendered as

pub struct Foo<A>;

Docs...

but it should definitely be mentioning the = int part.

@lifthrasiir
Copy link
Contributor

It should also mention that the default type parameter requires the #![feature(default_type_param)] crate attribute. Maybe we can hide the default type parameters by default and only show them at the additional action (e.g. clicking "This struct has default type parameters...").

bors added a commit that referenced this issue Jun 23, 2014
@bors bors closed this as completed in 94bace7 Jun 23, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Feb 26, 2024
Add check for 'in_external_macro' and 'is_from_proc_macro' inside

changelog: Fix rust-lang#12291 #[tracing::instrument()] triggers infinite_loop

Added an in_external_macro and is_from_proc_macro check to the [infinite_loop] lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants