diff options
| author | Kevin Butler <haqkrs@gmail.com> | 2015-11-02 23:44:53 +0000 |
|---|---|---|
| committer | Kevin Butler <haqkrs@gmail.com> | 2015-11-02 23:44:53 +0000 |
| commit | b1ef5302d5456add7b3314cd871d23a2dc45afb5 (patch) | |
| tree | fe2f4068ed74f31cc26490f2fa3277d94515093d /src/test/rustdoc | |
| parent | 2249b07ae988534a541be390d90396ed99b32955 (diff) | |
| download | rust-b1ef5302d5456add7b3314cd871d23a2dc45afb5.tar.gz rust-b1ef5302d5456add7b3314cd871d23a2dc45afb5.zip | |
librustdoc: ignore lint warnings when compiling documentation
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/cap-lints.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/rustdoc/cap-lints.rs b/src/test/rustdoc/cap-lints.rs new file mode 100644 index 00000000000..e7f308a6f0b --- /dev/null +++ b/src/test/rustdoc/cap-lints.rs @@ -0,0 +1,20 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// 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 //pre '#[must_use]' +#[must_use] +pub struct foo { + field: i32, +} |
