diff options
| author | bors <bors@rust-lang.org> | 2018-05-03 11:52:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-03 11:52:03 +0000 |
| commit | d68b0eceaaf719a4702ab13a7ca62dea5d966082 (patch) | |
| tree | c7a351327d19c398532f139444d4cc652070318d /src/test/run-pass/tool_attributes.rs | |
| parent | 698b956a9fca9688632d617dd6d73cae834237a3 (diff) | |
| parent | 84f450866041e0269875acb1350920308cdc109f (diff) | |
| download | rust-d68b0eceaaf719a4702ab13a7ca62dea5d966082.tar.gz rust-d68b0eceaaf719a4702ab13a7ca62dea5d966082.zip | |
Auto merge of #50030 - flip1995:rfc2103, r=petrochenkov
Implement tool_attributes feature (RFC 2103) cc #44690 This is currently just a rebased and compiling (hopefully) version of #47773. Let's see if travis likes this. I will add the implementation for `tool_lints` this week.
Diffstat (limited to 'src/test/run-pass/tool_attributes.rs')
| -rw-r--r-- | src/test/run-pass/tool_attributes.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/run-pass/tool_attributes.rs b/src/test/run-pass/tool_attributes.rs new file mode 100644 index 00000000000..eb13930de40 --- /dev/null +++ b/src/test/run-pass/tool_attributes.rs @@ -0,0 +1,23 @@ +// Copyright 2018 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. + +// Scoped attributes should not trigger an unused attributes lint. + +#![feature(tool_attributes)] +#![deny(unused_attributes)] + +fn main() { + #[rustfmt::skip] + foo (); +} + +fn foo() { + assert!(true); +} |
