-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Conversation
Not entirely familiar with the complete reasoning behind capping ar Allow, deferring to Alex. |
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. |
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. |
So I guess we want to cap in docs but not doctests? |
@steveklabnik This change only applies to running Just confirmed that |
@Ryman ah! ignore my objection then, sorry :) |
@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! |
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
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