This is a fairly common attribute on methods, but is not something you need to know when reading the method docs - the purpose of the attribute is for the compiler to tell you about it if you forget to use a value. Removing reclaims some valuable space in the summary of methods.
9 lines
293 B
Rust
9 lines
293 B
Rust
// This should fail a normal compile due to non_camel_case_types,
|
|
// It should pass a doc-compile as it only needs to type-check and
|
|
// therefore should not concern itself with the lints.
|
|
#[deny(warnings)]
|
|
|
|
// @has cap_lints/struct.Foo.html //* 'Struct Foo'
|
|
pub struct Foo {
|
|
field: i32,
|
|
}
|