From b1ef5302d5456add7b3314cd871d23a2dc45afb5 Mon Sep 17 00:00:00 2001 From: Kevin Butler Date: Mon, 2 Nov 2015 23:44:53 +0000 Subject: librustdoc: ignore lint warnings when compiling documentation --- src/test/rustdoc/cap-lints.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/test/rustdoc/cap-lints.rs (limited to 'src/test/rustdoc') 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 or the MIT license +// , 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, +} -- cgit 1.4.1-3-g733a5