Stabilise attributes on statements.

Note that attributes on expressions are still unstable and are behind the `stmt_expr_attributes` flag.

cc [Tracking issue](https://github.com/rust-lang/rust/issues/15701)
This commit is contained in:
Nick Cameron 2016-10-06 16:44:59 +13:00
parent 9bc6d26092
commit a94f5934cd
10 changed files with 12 additions and 22 deletions

View file

@ -11,7 +11,6 @@
// General test of maybe_uninits state computed by MIR dataflow.
#![feature(rustc_attrs)]
#![feature(stmt_expr_attributes)]
use std::intrinsics::rustc_peek;
use std::mem::{drop, replace};

View file

@ -11,7 +11,6 @@
// General test of maybe_inits state computed by MIR dataflow.
#![feature(rustc_attrs)]
#![feature(stmt_expr_attributes)]
use std::intrinsics::rustc_peek;
use std::mem::{drop, replace};

View file

@ -11,7 +11,6 @@
// General test of maybe_uninits state computed by MIR dataflow.
#![feature(rustc_attrs)]
#![feature(stmt_expr_attributes)]
use std::intrinsics::rustc_peek;
use std::mem::{drop, replace};

View file

@ -11,7 +11,6 @@
// General test of maybe_uninits state computed by MIR dataflow.
#![feature(rustc_attrs)]
#![feature(stmt_expr_attributes)]
use std::intrinsics::rustc_peek;
use std::mem::{drop, replace};

View file

@ -21,15 +21,15 @@ fn main() {
#[attr]
fn a() {}
#[attr] //~ ERROR 15701
#[attr]
{
}
#[attr] //~ ERROR 15701
#[attr]
5;
#[attr] //~ ERROR 15701
#[attr]
stmt_mac!();
}
@ -43,7 +43,7 @@ fn c() {
#[cfg(not(unset))]
fn j() {
#[attr] //~ ERROR 15701
#[attr]
5;
}
@ -55,7 +55,7 @@ fn d() {
#[cfg_attr(not(unset), cfg(not(unset)))]
fn i() {
#[attr] //~ ERROR 15701
#[attr]
8;
}
@ -64,7 +64,7 @@ fn i() {
macro_rules! item_mac {
($e:ident) => {
fn $e() {
#[attr] //~ ERROR 15701
#[attr]
42;
#[cfg(unset)]
@ -75,7 +75,7 @@ macro_rules! item_mac {
#[cfg(not(unset))]
fn k() {
#[attr] //~ ERROR 15701
#[attr]
5;
}
@ -87,7 +87,7 @@ macro_rules! item_mac {
#[cfg_attr(not(unset), cfg(not(unset)))]
fn h() {
#[attr] //~ ERROR 15701
#[attr]
8;
}

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(stmt_expr_attributes)]
#[deny(const_err)]
fn main() {

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(stmt_expr_attributes)]
use std::mem::size_of;
enum Ei8 {

View file

@ -11,7 +11,7 @@
// ignore-emscripten no threads support
// ignore-pretty : (#23623) problems when ending with // comments
#![feature(rustc_attrs, stmt_expr_attributes, zero_one)]
#![feature(rustc_attrs, zero_one)]
use std::num::Zero;
use std::thread;