New rustdoc lint to respect -Dwarnings correctly
This adds a new lint to `rustc` that is used in rustdoc when a code block is empty or cannot be parsed as valid Rust code. Previously this was unconditionally a warning. As such some documentation comments were (unknowingly) abusing this to pass despite the `-Dwarnings` used when compiling `rustc`, this should not be the case anymore.
This commit is contained in:
parent
3e99439f4d
commit
b574c67b93
8 changed files with 116 additions and 41 deletions
|
@ -46,6 +46,7 @@ pub struct OpaqueTypeDecl<'tcx> {
|
|||
/// type Foo = impl Baz;
|
||||
/// fn bar() -> Foo {
|
||||
/// // ^^^ This is the span we are looking for!
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// In cases where the fn returns `(impl Trait, impl Trait)` or
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue