Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
jyn514 opened this issue Dec 21, 2020 · 1 comment · Fixed by #80300
Closed

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

jyn514 opened this issue Dec 21, 2020 · 1 comment · Fixed by #80300
Assignees
Labels
C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jyn514
Copy link
Member

jyn514 commented Dec 21, 2020

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.

@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. labels Dec 21, 2020
@LeSeulArtichaut
Copy link
Contributor

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. 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.

3 participants