Skip to content

Rustdoc should give an error if you set both doc(inline) and doc(no_inline) #80275

Closed
@jyn514

Description

@jyn514
Member

Given the following code:

#![crate_type = "lib"]

pub mod inner {
    pub struct S;
}

#[doc(inline)]
#[doc(no_inline)]
pub use inner::S;

Rustdoc will generate image
This is bogus: rustdoc is ignoring one of the attributes. Instead, it should give an error that you can't apply both attributes to the same item.

Thought of while reviewing #80267.

Activity

added
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
C-bugCategory: This is a bug.
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
on Dec 21, 2020
LeSeulArtichaut

LeSeulArtichaut commented on Dec 22, 2020

@LeSeulArtichaut
Contributor

I'll take a look at this as a first rustdoc issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

C-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @Manishearth@jyn514@LeSeulArtichaut

    Issue actions

      Rustdoc should give an error if you set both `doc(inline)` and `doc(no_inline)` · Issue #80275 · rust-lang/rust