Skip to content

librustdoc: set cap-lints=allow when compiling documentation #29529

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

Merged
merged 1 commit into from
Nov 3, 2015

Conversation

Ryman
Copy link
Contributor

@Ryman Ryman commented Nov 2, 2015

This sets the cap-lints setting to 'allow' for all doc compilations. There's precedent for this as rustdoc already whitelists unstable code when compiling documentation, with the expectation being that a regular compile will complain about any problems. I think the same justification applies here.

Problem case in the wild: Manishearth/compiletest-rs#28

r? @Manishearth

@Manishearth
Copy link
Member

r? @alexcrichton

Not entirely familiar with the complete reasoning behind capping ar Allow, deferring to Alex.

@huonw
Copy link
Member

huonw commented Nov 3, 2015

@Manishearth
Copy link
Member

I meant the unstable features stuff. I'm not sure if we should be capping at allow or warn here, and I'm not sure if this should even be a part of rustdoc (not cargo).

Happy with the code changes, though, r=me if nobody has an issue with allow over warn and it being in rustdoc.

@steveklabnik
Copy link
Member

So, one thing is that when docs run without lints, we get into situations like #29523 . I would have loved to have seen a "hey, this feature isn't needed" warning, so that we wouldn't have had the bug.

@Manishearth
Copy link
Member

So I guess we want to cap in docs but not doctests?

@Ryman
Copy link
Contributor Author

Ryman commented Nov 3, 2015

@steveklabnik This change only applies to running rustdoc on rust files without the test flag, there's three more codepaths: testing rust files, compiling markdown files, testing markdown files. 😅

Just confirmed that make-check-docs still fires warnings from tests in rust files.

@steveklabnik
Copy link
Member

@Ryman ah! ignore my objection then, sorry :)

@alexcrichton
Copy link
Member

@steveklabnik oh we actually have support for that, it's just not turned on by default.

I also think that this is fine, seems kinda odd for a documentation generator to be warning you about various parts of your code! Thanks @Ryman!

@bors: r+ b1ef530

@bors
Copy link
Collaborator

bors commented Nov 3, 2015

⌛ Testing commit b1ef530 with merge de11d2a...

bors added a commit that referenced this pull request Nov 3, 2015
This sets the `cap-lints` setting to 'allow' for all doc compilations. There's precedent for this as rustdoc [already whitelists unstable code](https://github.com/rust-lang/rust/blob/master/src/librustdoc/core.rs#L112) when compiling documentation, with the expectation being that a regular compile will complain about any problems. I think the same justification applies here.

Problem case in the wild: Manishearth/compiletest-rs#28

r? @Manishearth
@bors bors merged commit b1ef530 into rust-lang:master Nov 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants