Skip to content

stabilise ?, attributes on stmts, deprecate Reflect #36995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
@@ -2472,8 +2472,7 @@ The currently implemented features of the reference compiler are:
* - `default_type_parameter_fallback` - Allows type parameter defaults to
influence type inference.

* - `stmt_expr_attributes` - Allows attributes on expressions and
non-item statements.
* - `stmt_expr_attributes` - Allows attributes on expressions.

* - `type_ascription` - Allows type ascription expressions `expr: Type`.

7 changes: 3 additions & 4 deletions src/libcore/any.rs
Original file line number Diff line number Diff line change
@@ -73,7 +73,6 @@

use fmt;
use intrinsics;
use marker::Reflect;

///////////////////////////////////////////////////////////////////////////////
// Any trait
@@ -86,7 +85,7 @@ use marker::Reflect;
///
/// [mod]: index.html
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Any: Reflect + 'static {
pub trait Any: 'static {
/// Gets the `TypeId` of `self`.
///
/// # Examples
@@ -112,7 +111,7 @@ pub trait Any: Reflect + 'static {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Reflect + 'static + ?Sized > Any for T {
impl<T: 'static + ?Sized > Any for T {
fn get_type_id(&self) -> TypeId { TypeId::of::<T>() }
}

@@ -366,7 +365,7 @@ impl TypeId {
/// }
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub fn of<T: ?Sized + Reflect + 'static>() -> TypeId {
pub fn of<T: ?Sized + 'static>() -> TypeId {
TypeId {
t: unsafe { intrinsics::type_id::<T>() },
}
2 changes: 1 addition & 1 deletion src/libcore/lib.rs
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@
#![feature(specialization)]
#![feature(staged_api)]
#![feature(unboxed_closures)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#![feature(never_type)]
#![feature(prelude_import)]

3 changes: 3 additions & 0 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
@@ -255,6 +255,9 @@ macro_rules! debug_assert_ne {
/// Helper macro for reducing boilerplate code for matching `Result` together
/// with converting downstream errors.
///
/// Prefer using `?` syntax to `try!`. `?` is built in to the language and is
/// more succinct than `try!`. It is the standard method for error propagation.
///
/// `try!` matches the given `Result`. In case of the `Ok` variant, the
/// expression has the value of the wrapped value.
///
3 changes: 3 additions & 0 deletions src/libcore/marker.rs
Original file line number Diff line number Diff line change
@@ -587,11 +587,14 @@ mod impls {
#[unstable(feature = "reflect_marker",
reason = "requires RFC and more experience",
issue = "27749")]
#[rustc_deprecated(since = "1.14.0", reason = "Specialization makes parametricity impossible")]
#[rustc_on_unimplemented = "`{Self}` does not implement `Any`; \
ensure all type parameters are bounded by `Any`"]
pub trait Reflect {}

#[unstable(feature = "reflect_marker",
reason = "requires RFC and more experience",
issue = "27749")]
#[rustc_deprecated(since = "1.14.0", reason = "Specialization makes parametricity impossible")]
#[allow(deprecated)]
impl Reflect for .. { }
2 changes: 1 addition & 1 deletion src/libgraphviz/lib.rs
Original file line number Diff line number Diff line change
@@ -295,7 +295,7 @@
#![cfg_attr(not(stage0), deny(warnings))]

#![feature(str_escape)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]

use self::LabelText::*;

2 changes: 1 addition & 1 deletion src/liblibc
Submodule liblibc updated 44 files
+3 −0 .travis.yml
+2 −0 README.md
+1 −1 ci/docker/aarch64-unknown-linux-gnu/Dockerfile
+1 −1 ci/docker/arm-unknown-linux-gnueabihf/Dockerfile
+1 −1 ci/docker/i686-unknown-linux-gnu/Dockerfile
+14 −6 ci/docker/i686-unknown-linux-musl/Dockerfile
+1 −1 ci/docker/mips-unknown-linux-gnu/Dockerfile
+14 −0 ci/docker/mips-unknown-linux-musl/Dockerfile
+1 −1 ci/docker/mipsel-unknown-linux-musl/Dockerfile
+1 −1 ci/docker/powerpc-unknown-linux-gnu/Dockerfile
+1 −1 ci/docker/powerpc64-unknown-linux-gnu/Dockerfile
+1 −1 ci/docker/x86_64-unknown-linux-gnu/Dockerfile
+4 −4 ci/docker/x86_64-unknown-linux-musl/Dockerfile
+1 −1 ci/docker/x86_64-unknown-openbsd/Dockerfile
+7 −2 ci/run.sh
+14 −0 libc-test/Cargo.lock
+15 −0 libc-test/generate-files/Cargo.lock
+2 −0 src/unix/bsd/freebsdlike/dragonfly/mod.rs
+2 −0 src/unix/bsd/freebsdlike/freebsd/mod.rs
+2 −0 src/unix/bsd/freebsdlike/mod.rs
+2 −0 src/unix/bsd/mod.rs
+4 −2 src/unix/bsd/netbsdlike/mod.rs
+3 −0 src/unix/bsd/netbsdlike/netbsd/mod.rs
+2 −0 src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs
+2 −0 src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs
+13 −0 src/unix/bsd/netbsdlike/netbsd/other/mod.rs
+2 −0 src/unix/bsd/netbsdlike/openbsdlike/mod.rs
+2 −0 src/unix/haiku/b32.rs
+2 −0 src/unix/haiku/b64.rs
+746 −0 src/unix/haiku/mod.rs
+7 −2 src/unix/mod.rs
+0 −2 src/unix/notbsd/linux/mips.rs
+11 −1 src/unix/notbsd/linux/mod.rs
+0 −2 src/unix/notbsd/linux/musl/b32/arm.rs
+0 −2 src/unix/notbsd/linux/musl/b32/asmjs.rs
+0 −2 src/unix/notbsd/linux/musl/b32/mips.rs
+0 −2 src/unix/notbsd/linux/musl/b32/x86.rs
+0 −2 src/unix/notbsd/linux/musl/b64/mod.rs
+2 −0 src/unix/notbsd/linux/musl/mod.rs
+11 −0 src/unix/notbsd/linux/other/b64/x86_64.rs
+0 −2 src/unix/notbsd/linux/other/mod.rs
+0 −2 src/unix/notbsd/linux/s390x.rs
+2 −0 src/unix/notbsd/mod.rs
+6 −1 src/unix/solaris/mod.rs
24 changes: 0 additions & 24 deletions src/librustc/diagnostics.rs
Original file line number Diff line number Diff line change
@@ -1327,30 +1327,6 @@ let x: i32 = "I am not a number!";
// |
// type `i32` assigned to variable `x`
```

Another situation in which this occurs is when you attempt to use the `try!`
macro inside a function that does not return a `Result<T, E>`:

```compile_fail,E0308
use std::fs::File;

fn main() {
let mut f = try!(File::create("foo.txt"));
}
```

This code gives an error like this:

```text
<std macros>:5:8: 6:42 error: mismatched types:
expected `()`,
found `core::result::Result<_, _>`
(expected (),
found enum `core::result::Result`) [E0308]
```

`try!` returns a `Result<T, E>`, and so the function must. But `main()` has
`()` as its return type, hence the error.
"##,

E0309: r##"
2 changes: 1 addition & 1 deletion src/librustc/lib.rs
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@
#![feature(rustc_private)]
#![feature(slice_patterns)]
#![feature(staged_api)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#![cfg_attr(test, feature(test))]

extern crate arena;
2 changes: 1 addition & 1 deletion src/librustc_back/lib.rs
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(step_by)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#![cfg_attr(test, feature(test, rand))]

extern crate syntax;
2 changes: 1 addition & 1 deletion src/librustc_borrowck/lib.rs
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
#![feature(staged_api)]
#![feature(associated_consts)]
#![feature(nonzero)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#[macro_use] extern crate log;
#[macro_use] extern crate syntax;
extern crate syntax_pos;
2 changes: 1 addition & 1 deletion src/librustc_const_eval/lib.rs
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
#![feature(staged_api)]
#![feature(rustc_diagnostic_macros)]
#![feature(slice_patterns)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#![feature(box_patterns)]
#![feature(box_syntax)]

2 changes: 1 addition & 1 deletion src/librustc_const_math/lib.rs
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@

#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]

#[macro_use] extern crate log;
#[macro_use] extern crate syntax;
2 changes: 1 addition & 1 deletion src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@
#![feature(rustc_private)]
#![feature(set_stdio)]
#![feature(staged_api)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]

extern crate arena;
extern crate flate;
2 changes: 1 addition & 1 deletion src/librustc_errors/lib.rs
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
#![allow(unused_attributes)]
#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#![feature(range_contains)]
#![feature(libc)]
#![feature(unicode)]
2 changes: 1 addition & 1 deletion src/librustc_incremental/lib.rs
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
#![cfg_attr(not(stage0), deny(warnings))]

#![feature(dotdot_in_tuple_patterns)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(rand)]
2 changes: 1 addition & 1 deletion src/librustc_metadata/lib.rs
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@
#![feature(dotdot_in_tuple_patterns)]
#![feature(proc_macro_internals)]
#![feature(proc_macro_lib)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#![feature(quote)]
#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]
2 changes: 1 addition & 1 deletion src/librustc_mir/lib.rs
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]

#[macro_use] extern crate log;
extern crate graphviz as dot;
2 changes: 1 addition & 1 deletion src/librustc_trans/lib.rs
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
#![feature(slice_patterns)]
#![feature(staged_api)]
#![feature(unicode)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]

use rustc::dep_graph::WorkProduct;

2 changes: 1 addition & 1 deletion src/librustc_typeck/lib.rs
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ This API is completely unstable and subject to change.
#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]

#[macro_use] extern crate log;
#[macro_use] extern crate syntax;
2 changes: 1 addition & 1 deletion src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
#![feature(staged_api)]
#![feature(test)]
#![feature(unicode)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]

extern crate arena;
extern crate getopts;
2 changes: 1 addition & 1 deletion src/libserialize/lib.rs
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ Core encoding and decoding interfaces.
#![feature(specialization)]
#![feature(staged_api)]
#![feature(unicode)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#![cfg_attr(test, feature(test))]

// test harness access
3 changes: 1 addition & 2 deletions src/libstd/error.rs
Original file line number Diff line number Diff line change
@@ -55,15 +55,14 @@ use any::TypeId;
use cell;
use char;
use fmt::{self, Debug, Display};
use marker::Reflect;
use mem::transmute;
use num;
use str;
use string;

/// Base functionality for all errors in Rust.
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Error: Debug + Display + Reflect {
pub trait Error: Debug + Display {
/// A short description of the error.
///
/// The description should not contain newlines or sentence-ending
3 changes: 1 addition & 2 deletions src/libstd/io/buffered.rs
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@

use io::prelude::*;

use marker::Reflect;
use cmp;
use error;
use fmt;
@@ -578,7 +577,7 @@ impl<W> From<IntoInnerError<W>> for Error {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<W: Reflect + Send + fmt::Debug> error::Error for IntoInnerError<W> {
impl<W: Send + fmt::Debug> error::Error for IntoInnerError<W> {
fn description(&self) -> &str {
error::Error::description(self.error())
}
3 changes: 1 addition & 2 deletions src/libstd/lib.rs
Original file line number Diff line number Diff line change
@@ -255,10 +255,9 @@
#![feature(panic_unwind)]
#![feature(placement_in_syntax)]
#![feature(prelude_import)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#![feature(rand)]
#![feature(raw)]
#![feature(reflect_marker)]
#![feature(repr_simd)]
#![feature(rustc_attrs)]
#![feature(shared)]
5 changes: 2 additions & 3 deletions src/libstd/sync/mpsc/mod.rs
Original file line number Diff line number Diff line change
@@ -270,7 +270,6 @@ use error;
use fmt;
use mem;
use cell::UnsafeCell;
use marker::Reflect;
use time::{Duration, Instant};

#[unstable(feature = "mpsc_select", issue = "27800")]
@@ -1163,7 +1162,7 @@ impl<T> fmt::Display for SendError<T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Send + Reflect> error::Error for SendError<T> {
impl<T: Send> error::Error for SendError<T> {
fn description(&self) -> &str {
"sending on a closed channel"
}
@@ -1198,7 +1197,7 @@ impl<T> fmt::Display for TrySendError<T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Send + Reflect> error::Error for TrySendError<T> {
impl<T: Send> error::Error for TrySendError<T> {

fn description(&self) -> &str {
match *self {
5 changes: 2 additions & 3 deletions src/libstd/sys/common/poison.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@

use error::{Error};
use fmt;
use marker::Reflect;
use sync::atomic::{AtomicBool, Ordering};
use thread;

@@ -117,7 +116,7 @@ impl<T> fmt::Display for PoisonError<T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Reflect> Error for PoisonError<T> {
impl<T> Error for PoisonError<T> {
fn description(&self) -> &str {
"poisoned lock: another task failed inside"
}
@@ -174,7 +173,7 @@ impl<T> fmt::Display for TryLockError<T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Reflect> Error for TryLockError<T> {
impl<T> Error for TryLockError<T> {
fn description(&self) -> &str {
match *self {
TryLockError::Poisoned(ref p) => p.description(),
5 changes: 2 additions & 3 deletions src/libsyntax/config.rs
Original file line number Diff line number Diff line change
@@ -153,7 +153,7 @@ impl<'a> StripUnconfigured<'a> {
}

// Visit attributes on expression and statements (but not attributes on items in blocks).
fn visit_stmt_or_expr_attrs(&mut self, attrs: &[ast::Attribute]) {
fn visit_expr_attrs(&mut self, attrs: &[ast::Attribute]) {
// flag the offending attributes
for attr in attrs.iter() {
if !self.features.map(|features| features.stmt_expr_attributes).unwrap_or(true) {
@@ -227,7 +227,7 @@ impl<'a> StripUnconfigured<'a> {
}

pub fn configure_expr(&mut self, expr: P<ast::Expr>) -> P<ast::Expr> {
self.visit_stmt_or_expr_attrs(expr.attrs());
self.visit_expr_attrs(expr.attrs());

// If an expr is valid to cfg away it will have been removed by the
// outer stmt or expression folder before descending in here.
@@ -245,7 +245,6 @@ impl<'a> StripUnconfigured<'a> {
}

pub fn configure_stmt(&mut self, stmt: ast::Stmt) -> Option<ast::Stmt> {
self.visit_stmt_or_expr_attrs(stmt.attrs());
self.configure(stmt)
}
}
8 changes: 2 additions & 6 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
@@ -253,9 +253,6 @@ declare_features! (
// a...b and ...b
(active, inclusive_range_syntax, "1.7.0", Some(28237)),

// `expr?`
(active, question_mark, "1.9.0", Some(31436)),

// impl specialization (RFC 1210)
(active, specialization, "1.7.0", Some(31844)),

@@ -348,6 +345,8 @@ declare_features! (
(accepted, while_let, "1.0.0", None),
// Allows `#[deprecated]` attribute
(accepted, deprecated, "1.9.0", Some(29935)),
// `expr?`
(accepted, question_mark, "1.14.0", Some(31436)),
);
// (changing above list without updating src/doc/reference.md makes @cmr sad)

@@ -1072,9 +1071,6 @@ impl<'a> Visitor for PostExpansionVisitor<'a> {
e.span,
"inclusive range syntax is experimental");
}
ast::ExprKind::Try(..) => {
gate_feature_post!(&self, question_mark, e.span, "the `?` operator is not stable");
}
ast::ExprKind::InPlace(..) => {
gate_feature_post!(&self, placement_in_syntax, e.span, EXPLAIN_PLACEMENT_IN);
}
2 changes: 1 addition & 1 deletion src/libsyntax/lib.rs
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@
#![feature(staged_api)]
#![feature(str_escape)]
#![feature(unicode)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#![feature(rustc_diagnostic_macros)]
#![feature(specialization)]

2 changes: 1 addition & 1 deletion src/libsyntax_pos/lib.rs
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
#![allow(unused_attributes)]
#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#![feature(specialization)]

use std::cell::{Cell, RefCell};
2 changes: 1 addition & 1 deletion src/libterm/lib.rs
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@
#![cfg_attr(windows, feature(libc))]
// Handle rustfmt skips
#![feature(custom_attribute)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#![allow(unused_attributes)]

use std::io::prelude::*;
2 changes: 1 addition & 1 deletion src/libtest/lib.rs
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@
#![feature(rustc_private)]
#![feature(set_stdio)]
#![feature(staged_api)]
#![feature(question_mark)]
#![cfg_attr(stage0, feature(question_mark))]
#![feature(panic_unwind)]

extern crate getopts;
18 changes: 0 additions & 18 deletions src/test/compile-fail/feature-gate-try-operator.rs

This file was deleted.

4 changes: 1 addition & 3 deletions src/test/compile-fail/issue-32709.rs
Original file line number Diff line number Diff line change
@@ -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)
}

3 changes: 0 additions & 3 deletions src/test/compile-fail/issue-33876.rs
Original file line number Diff line number Diff line change
@@ -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;
1 change: 0 additions & 1 deletion src/test/compile-fail/mir-dataflow/def-inits-1.rs
Original file line number Diff line number Diff line change
@@ -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};
1 change: 0 additions & 1 deletion src/test/compile-fail/mir-dataflow/inits-1.rs
Original file line number Diff line number Diff line change
@@ -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};
1 change: 0 additions & 1 deletion src/test/compile-fail/mir-dataflow/uninits-1.rs
Original file line number Diff line number Diff line change
@@ -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};
1 change: 0 additions & 1 deletion src/test/compile-fail/mir-dataflow/uninits-2.rs
Original file line number Diff line number Diff line change
@@ -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};
16 changes: 8 additions & 8 deletions src/test/compile-fail/stmt_expr_attrs_no_feature.rs
Original file line number Diff line number Diff line change
@@ -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;
}

2 changes: 0 additions & 2 deletions src/test/run-pass/const-negation.rs
Original file line number Diff line number Diff line change
@@ -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() {
2 changes: 0 additions & 2 deletions src/test/run-pass/enum-discrim-autosizing.rs
Original file line number Diff line number Diff line change
@@ -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 {
1 change: 0 additions & 1 deletion src/test/run-pass/ifmt.rs
Original file line number Diff line number Diff line change
@@ -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;
2 changes: 1 addition & 1 deletion src/test/run-pass/impl-trait/example-st.rs
Original file line number Diff line number Diff line change
@@ -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 = ();
2 changes: 0 additions & 2 deletions src/test/run-pass/issue-17121.rs
Original file line number Diff line number Diff line change
@@ -10,8 +10,6 @@

// pretty-expanded FIXME #23616

#![feature(question_mark)]

use std::fs::File;
use std::io::{self, BufReader, Read};

5 changes: 1 addition & 4 deletions src/test/run-pass/issue-19404.rs
Original file line number Diff line number Diff line change
@@ -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 {
2 changes: 0 additions & 2 deletions src/test/run-pass/issue-20797.rs
Original file line number Diff line number Diff line change
@@ -10,8 +10,6 @@

// Regression test for #20797.

#![feature(question_mark)]

use std::default::Default;
use std::io;
use std::fs;
2 changes: 0 additions & 2 deletions src/test/run-pass/issue-21400.rs
Original file line number Diff line number Diff line change
@@ -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));
2 changes: 1 addition & 1 deletion src/test/run-pass/issue-8460.rs
Original file line number Diff line number Diff line change
@@ -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;
2 changes: 0 additions & 2 deletions src/test/run-pass/try-operator-hygiene.rs
Original file line number Diff line number Diff line change
@@ -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() {
2 changes: 0 additions & 2 deletions src/test/run-pass/try-operator.rs
Original file line number Diff line number Diff line change
@@ -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;
1 change: 0 additions & 1 deletion src/tools/compiletest/src/main.rs
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@
#![feature(box_syntax)]
#![feature(rustc_private)]
#![feature(test)]
#![feature(question_mark)]
#![feature(libc)]

#![deny(warnings)]
1 change: 0 additions & 1 deletion src/tools/error_index_generator/main.rs
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@
// except according to those terms.

#![feature(rustc_private, rustdoc)]
#![feature(question_mark)]

extern crate syntax;
extern crate rustdoc;
2 changes: 0 additions & 2 deletions src/tools/linkchecker/main.rs
Original file line number Diff line number Diff line change
@@ -24,8 +24,6 @@
//! A few whitelisted exceptions are allowed as there's known bugs in rustdoc,
//! but this should catch the majority of "broken link" cases.
#![feature(question_mark)]

extern crate url;

use std::env;
1 change: 0 additions & 1 deletion src/tools/rustbook/main.rs
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@

#![feature(rustc_private)]
#![feature(rustdoc)]
#![feature(question_mark)]

extern crate rustdoc;
extern crate rustc_back;