Add tests for a new feature 'tool_attributes'

This commit is contained in:
Seiichi Uchida 2018-01-30 13:12:37 +09:00 committed by flip1995
parent c1168be536
commit e27d20a7ba
No known key found for this signature in database
GPG key ID: 6757AB26F72F0084
6 changed files with 97 additions and 0 deletions

View file

@ -0,0 +1,15 @@
// 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.
fn main() {
#[rustfmt::skip] //~ ERROR scoped attribute `rustfmt::skip` is experimental
let x = 3
;
}

View file

@ -0,0 +1,10 @@
error[E0658]: scoped attribute `rustfmt::skip` is experimental (see issue #44690)
--> $DIR/feature-gate-tool_attributes.rs:12:5
|
12 | #[rustfmt::skip] //~ ERROR scoped attribute `rustfmt::skip` is experimental
| ^^^^^^^^^^^^^^^^
|
= help: add #![feature(tool_attributes)] to the crate attributes to enable
error: aborting due to previous error