commit
132b56cefc
3 changed files with 47 additions and 1 deletions
5
src/test/run-make/rustdoc-must-use/Makefile
Normal file
5
src/test/run-make/rustdoc-must-use/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
-include ../tools.mk
|
||||
|
||||
all: lib.rs
|
||||
$(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc lib.rs
|
||||
$(HTMLDOCCK) $(TMPDIR)/doc lib.rs
|
||||
23
src/test/run-make/rustdoc-must-use/lib.rs
Normal file
23
src/test/run-make/rustdoc-must-use/lib.rs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// 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.
|
||||
|
||||
#![crate_type="lib"]
|
||||
|
||||
// @has lib/struct.Struct.html //pre '#[must_use]'
|
||||
#[must_use]
|
||||
pub struct Struct {
|
||||
field: i32,
|
||||
}
|
||||
|
||||
// @has lib/enum.Enum.html //pre '#[must_use = "message"]'
|
||||
#[must_use = "message"]
|
||||
pub enum Enum {
|
||||
Variant(i32),
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue