Rollup merge of #36995 - nrc:stable, r=@nikomatsakis

stabilise ?, attributes on stmts, deprecate Reflect

r? @nikomatsakis
This commit is contained in:
Alex Crichton 2016-10-12 10:15:26 -07:00
commit 9d70ff384f
55 changed files with 53 additions and 133 deletions

View file

@ -1,18 +0,0 @@
// Copyright 2016 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.
macro_rules! id {
($e:expr) => { $e }
}
fn main() {
id!(x?); //~ error: the `?` operator is not stable (see issue #31436)
y?; //~ error: the `?` operator is not stable (see issue #31436)
}

View file

@ -8,12 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(question_mark)]
// Make sure that the span of try shorthand does not include the trailing
// semicolon;
fn a() -> Result<i32, ()> {
Err(5)?; //~ ERROR 16:5: 16:12
Err(5)?; //~ ERROR 14:5: 14:12
Ok(1)
}

View file

@ -8,9 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(reflect_marker)]
use std::marker::Reflect;
use std::any::Any;
struct Foo;

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

@ -14,7 +14,6 @@
#![allow(unused_must_use)]
#![allow(unused_features)]
#![feature(box_syntax)]
#![feature(question_mark)]
use std::fmt::{self, Write};
use std::usize;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(conservative_impl_trait, question_mark)]
#![feature(conservative_impl_trait)]
struct State;
type Error = ();

View file

@ -10,8 +10,6 @@
// pretty-expanded FIXME #23616
#![feature(question_mark)]
use std::fs::File;
use std::io::{self, BufReader, Read};

View file

@ -8,17 +8,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(reflect_marker)]
use std::any::TypeId;
use std::marker::Reflect;
use std::rc::Rc;
type Fp<T> = Rc<T>;
struct Engine;
trait Component: 'static + Reflect {}
trait Component: 'static {}
impl Component for Engine {}
trait Env {

View file

@ -10,8 +10,6 @@
// Regression test for #20797.
#![feature(question_mark)]
use std::default::Default;
use std::io;
use std::fs;

View file

@ -11,8 +11,6 @@
// Regression test for #21400 which itself was extracted from
// stackoverflow.com/questions/28031155/is-my-borrow-checker-drunk/28031580
#![feature(question_mark)]
fn main() {
let mut t = Test;
assert_eq!(t.method1("one"), Ok(1));

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;

View file

@ -18,8 +18,6 @@
// This test verifies that the expansion is hygienic, i.e. it's not affected by other `val` and
// `err` bindings that may be in scope.
#![feature(question_mark)]
use std::num::ParseIntError;
fn main() {

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(question_mark)]
use std::fs::File;
use std::io::{Read, self};
use std::num::ParseIntError;