Skip to content

remove associated_consts feature gate #42809

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 1 commit into from
Jul 7, 2017
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
85 changes: 0 additions & 85 deletions src/doc/unstable-book/src/language-features/associated-consts.md

This file was deleted.

3 changes: 2 additions & 1 deletion src/libcore/lib.rs
Original file line number Diff line number Diff line change
@@ -70,7 +70,6 @@
#![feature(allow_internal_unstable)]
#![feature(asm)]
#![feature(associated_type_defaults)]
#![feature(associated_consts)]
#![feature(cfg_target_feature)]
#![feature(cfg_target_has_atomic)]
#![feature(concat_idents)]
@@ -94,6 +93,8 @@
#![feature(untagged_unions)]
#![feature(unwind_attributes)]

#![cfg_attr(stage0, feature(associated_consts))]

#[prelude_import]
#[allow(unused)]
use prelude::v1::*;
3 changes: 2 additions & 1 deletion src/librustc/lib.rs
Original file line number Diff line number Diff line change
@@ -22,7 +22,6 @@
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![deny(warnings)]

#![feature(associated_consts)]
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(conservative_impl_trait)]
@@ -42,6 +41,8 @@
#![feature(trace_macros)]
#![feature(test)]

#![cfg_attr(stage0, feature(associated_consts))]

#![recursion_limit="256"]

extern crate arena;
4 changes: 2 additions & 2 deletions src/librustc_bitflags/lib.rs
Original file line number Diff line number Diff line change
@@ -10,11 +10,12 @@


#![crate_name = "rustc_bitflags"]
#![feature(associated_consts)]
#![crate_type = "rlib"]
#![no_std]
#![deny(warnings)]

#![cfg_attr(stage0, feature(associated_consts))]

//! A typesafe bitmask flag generator.
#[cfg(test)]
@@ -31,7 +32,6 @@ extern crate std;
///
/// ```{.rust}
/// #![feature(rustc_private)]
/// #![feature(associated_consts)]
/// #[macro_use] extern crate rustc_bitflags;
///
/// bitflags! {
3 changes: 2 additions & 1 deletion src/librustc_borrowck/lib.rs
Original file line number Diff line number Diff line change
@@ -20,7 +20,8 @@

#![feature(quote)]
#![feature(rustc_diagnostic_macros)]
#![feature(associated_consts)]

#![cfg_attr(stage0, feature(associated_consts))]

#[macro_use] extern crate log;
#[macro_use] extern crate syntax;
2 changes: 1 addition & 1 deletion src/librustc_data_structures/lib.rs
Original file line number Diff line number Diff line change
@@ -29,14 +29,14 @@
#![feature(nonzero)]
#![feature(unboxed_closures)]
#![feature(fn_traits)]
#![feature(associated_consts)]
#![feature(unsize)]
#![feature(i128_type)]
#![feature(conservative_impl_trait)]
#![feature(discriminant_value)]
#![feature(specialization)]
#![feature(manually_drop)]

#![cfg_attr(stage0, feature(associated_consts))]
#![cfg_attr(stage0, feature(struct_field_attributes))]

#![cfg_attr(unix, feature(libc))]
3 changes: 2 additions & 1 deletion src/librustc_llvm/lib.rs
Original file line number Diff line number Diff line change
@@ -21,13 +21,14 @@
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![deny(warnings)]

#![feature(associated_consts)]
#![feature(box_syntax)]
#![feature(concat_idents)]
#![feature(libc)]
#![feature(link_args)]
#![feature(static_nobundle)]

#![cfg_attr(stage0, feature(associated_consts))]

extern crate libc;
#[macro_use]
#[no_link]
3 changes: 2 additions & 1 deletion src/librustc_mir/lib.rs
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
#![crate_type = "dylib"]
#![deny(warnings)]

#![feature(associated_consts)]
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(i128_type)]
@@ -28,6 +27,8 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
#![feature(collection_placement)]
#![feature(nonzero)]

#![cfg_attr(stage0, feature(associated_consts))]

#[macro_use] extern crate log;
extern crate graphviz as dot;
#[macro_use]
2 changes: 0 additions & 2 deletions src/librustc_resolve/diagnostics.rs
Original file line number Diff line number Diff line change
@@ -1320,8 +1320,6 @@ match the name of any associated constant in the trait.
Erroneous code example:
```compile_fail,E0438
#![feature(associated_consts)]
trait Foo {}
impl Foo for i32 {
3 changes: 2 additions & 1 deletion src/librustc_resolve/lib.rs
Original file line number Diff line number Diff line change
@@ -16,9 +16,10 @@
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![deny(warnings)]

#![feature(associated_consts)]
#![feature(rustc_diagnostic_macros)]

#![cfg_attr(stage0, feature(associated_consts))]

#[macro_use]
extern crate log;
#[macro_use]
3 changes: 2 additions & 1 deletion src/librustc_trans/lib.rs
Original file line number Diff line number Diff line change
@@ -22,7 +22,6 @@
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![deny(warnings)]

#![feature(associated_consts)]
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(const_fn)]
@@ -35,6 +34,8 @@
#![feature(slice_patterns)]
#![feature(conservative_impl_trait)]

#![cfg_attr(stage0, feature(associated_consts))]

use rustc::dep_graph::WorkProduct;
use syntax_pos::symbol::Symbol;

18 changes: 0 additions & 18 deletions src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
@@ -2777,8 +2777,6 @@ An associated const was implemented when another trait item was expected.
Erroneous code example:
```compile_fail,E0323
#![feature(associated_consts)]
trait Foo {
type N;
}
@@ -2810,8 +2808,6 @@ impl Foo for Bar {
Or:
```
#![feature(associated_consts)]
struct Bar;
trait Foo {
@@ -2829,8 +2825,6 @@ A method was implemented when another trait item was expected. Erroneous
code example:
```compile_fail,E0324
#![feature(associated_consts)]
struct Bar;
trait Foo {
@@ -2850,8 +2844,6 @@ To fix this error, please verify that the method name wasn't misspelled and
verify that you are indeed implementing the correct trait items. Example:
```
#![feature(associated_consts)]
struct Bar;
trait Foo {
@@ -2873,8 +2865,6 @@ An associated type was implemented when another trait item was expected.
Erroneous code example:
```compile_fail,E0325
#![feature(associated_consts)]
struct Bar;
trait Foo {
@@ -2906,8 +2896,6 @@ impl Foo for Bar {
Or:
```
#![feature(associated_consts)]
struct Bar;
trait Foo {
@@ -2927,8 +2915,6 @@ types in the trait definition. This error indicates that there was a mismatch.
Here's an example of this error:
```compile_fail,E0326
#![feature(associated_consts)]
trait Foo {
const BAR: bool;
}
@@ -2991,8 +2977,6 @@ type parameter or `Self`. This is not supported yet. An example causing this
error is shown below:
```
#![feature(associated_consts)]
trait Foo {
const BAR: f64;
}
@@ -3012,8 +2996,6 @@ Currently, the value of `BAR` for a particular type can only be accessed
through a concrete type, as shown below:
```
#![feature(associated_consts)]
trait Foo {
const BAR: f64;
}
2 changes: 1 addition & 1 deletion src/libstd/lib.rs
Original file line number Diff line number Diff line change
@@ -245,7 +245,6 @@
#![feature(allocator_internals)]
#![feature(allow_internal_unstable)]
#![feature(asm)]
#![feature(associated_consts)]
#![feature(box_syntax)]
#![feature(cfg_target_has_atomic)]
#![feature(cfg_target_thread_local)]
@@ -320,6 +319,7 @@
#![cfg_attr(test, feature(float_bits_conv))]

#![cfg_attr(not(stage0), default_lib_allocator)]
#![cfg_attr(stage0, feature(associated_consts))]

// Explicitly import the prelude. The compiler uses this same unstable attribute
// to import the prelude implicitly when building crates that depend on std.
17 changes: 3 additions & 14 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
@@ -198,10 +198,6 @@ declare_features! (
// #23121. Array patterns have some hazards yet.
(active, slice_patterns, "1.0.0", Some(23121)),

// Allows the definition of associated constants in `trait` or `impl`
// blocks.
(active, associated_consts, "1.0.0", Some(29646)),

// Allows the definition of `const fn` functions.
(active, const_fn, "1.2.0", Some(24111)),

@@ -446,6 +442,9 @@ declare_features! (
(accepted, closure_to_fn_coercion, "1.19.0", Some(39817)),
// Allows attributes on struct literal fields.
(accepted, struct_field_attributes, "1.20.0", Some(38814)),
// Allows the definition of associated constants in `trait` or `impl`
// blocks.
(accepted, associated_consts, "1.20.0", Some(29646)),
);

// If you change this, please modify src/doc/unstable-book as well. You must
@@ -1405,11 +1404,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {

fn visit_trait_item(&mut self, ti: &'a ast::TraitItem) {
match ti.node {
ast::TraitItemKind::Const(..) => {
gate_feature_post!(&self, associated_consts,
ti.span,
"associated constants are experimental")
}
ast::TraitItemKind::Method(ref sig, ref block) => {
if block.is_none() {
self.check_abi(sig.abi, ti.span);
@@ -1435,11 +1429,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
}

match ii.node {
ast::ImplItemKind::Const(..) => {
gate_feature_post!(&self, associated_consts,
ii.span,
"associated constants are experimental")
}
ast::ImplItemKind::Method(ref sig, _) => {
if sig.constness.node == ast::Constness::Const {
gate_feature_post!(&self, const_fn, ii.span, "const fn is unstable");
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

pub use self::sub::{Bar, Baz};

1 change: 0 additions & 1 deletion src/test/compile-fail/E0164.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

enum Foo {}

1 change: 0 additions & 1 deletion src/test/compile-fail/E0438.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Bar {}

1 change: 0 additions & 1 deletion src/test/compile-fail/associated-const-ambiguity-report.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Foo {
const ID: i32;
1 change: 0 additions & 1 deletion src/test/compile-fail/associated-const-array-len.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Foo {
const ID: usize;
1 change: 0 additions & 1 deletion src/test/compile-fail/associated-const-dead-code.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]
#![deny(dead_code)]

struct MyFoo;
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Foo {
type Out: Sized;
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Foo {
const NAME: &'static str;
1 change: 0 additions & 1 deletion src/test/compile-fail/associated-const-impl-wrong-type.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Foo {
const BAR: u32; //~ NOTE type in trait
1 change: 0 additions & 1 deletion src/test/compile-fail/associated-const-no-item.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Foo {
const ID: i32;
1 change: 0 additions & 1 deletion src/test/compile-fail/associated-const-private-impl.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

mod bar1 {
pub use self::bar2::Foo;
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

pub enum EFoo { A, B, C, D }

Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

pub trait Foo {
const Y: usize;
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

pub trait Foo {
const Y: usize;
1 change: 0 additions & 1 deletion src/test/compile-fail/associated-const-upper-case-lint.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]
#![deny(non_upper_case_globals)]
#![allow(dead_code)]

1 change: 0 additions & 1 deletion src/test/compile-fail/associated-item-duplicate-names-2.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

struct Foo;

1 change: 0 additions & 1 deletion src/test/compile-fail/associated-item-duplicate-names.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@

// Test for issue #23969

#![feature(associated_consts)]

trait Foo {
type Ty;
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]
#![feature(associated_type_defaults)]

pub trait Tr {
1 change: 0 additions & 1 deletion src/test/compile-fail/auxiliary/issue_41549.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

pub trait Trait {
const CONST: u32;
1 change: 0 additions & 1 deletion src/test/compile-fail/auxiliary/use_from_trait_xc.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

pub use self::sub::{Bar, Baz};

23 changes: 0 additions & 23 deletions src/test/compile-fail/gated-associated_consts.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/test/compile-fail/issue-28992-empty.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@

// Can't use constants as tuple struct patterns

#![feature(associated_consts)]

const C1: i32 = 0;

1 change: 0 additions & 1 deletion src/test/compile-fail/issue-31910.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

enum Enum<T: Trait> {
X = Trait::Number,
1 change: 0 additions & 1 deletion src/test/compile-fail/issue-41549.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@

// aux-build:issue_41549.rs

#![feature(associated_consts)]

extern crate issue_41549;

1 change: 0 additions & 1 deletion src/test/compile-fail/object-safety-associated-consts.rs
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@
// Check that we correctly prevent users from making trait objects
// from traits with associated consts.

#![feature(associated_consts)]

trait Bar {
const X: usize;
1 change: 0 additions & 1 deletion src/test/compile-fail/privacy-sanity.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]
#![feature(optin_builtin_traits)]

trait MarkerTr {}
1 change: 0 additions & 1 deletion src/test/compile-fail/private-in-public-warn.rs
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@
// Private types and traits are not allowed in public interfaces.
// This test also ensures that the checks are performed even inside private modules.

#![feature(associated_consts)]
#![feature(associated_type_defaults)]
#![deny(private_in_public)]
#![allow(unused)]
1 change: 0 additions & 1 deletion src/test/compile-fail/private-in-public.rs
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@
// Private types and traits are not allowed in public interfaces.
// This test also ensures that the checks are performed even inside private modules.

#![feature(associated_consts)]
#![feature(associated_type_defaults)]

mod types {
1 change: 0 additions & 1 deletion src/test/compile-fail/stmt_expr_attrs_no_feature.rs
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@
// except according to those terms.

#![feature(custom_attribute)]
#![feature(associated_consts)]

macro_rules! stmt_mac {
() => {
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait A { }

1 change: 0 additions & 1 deletion src/test/compile-fail/trait-item-privacy.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]
#![feature(associated_type_defaults)]

struct S;
1 change: 0 additions & 1 deletion src/test/compile-fail/use-from-trait.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

use Trait::foo;
//~^ ERROR `foo` is not directly importable
1 change: 0 additions & 1 deletion src/test/incremental/hashes/trait_defs.rs
Original file line number Diff line number Diff line change
@@ -30,7 +30,6 @@
#![crate_type="rlib"]
#![feature(associated_type_defaults)]
#![feature(intrinsics)]
#![feature(associated_consts)]


// Change trait visibility --------------------------------------------------------
1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-const-eval.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Foo {
const NUM: usize;
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@

// aux-build:associated-const-cc-lib.rs

#![feature(associated_consts)]

extern crate associated_const_cc_lib as foolib;

1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-cross-crate-defaults.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@

// aux-build:associated-const-cc-lib.rs

#![feature(associated_consts)]

extern crate associated_const_cc_lib as foolib;

1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-cross-crate.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@

// aux-build:associated-const-cc-lib.rs

#![feature(associated_consts)]

extern crate associated_const_cc_lib as foolib;

1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-in-global-const.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

struct Foo;

1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-inherent-impl.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

struct Foo;

1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-marks-live-code.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

#![deny(dead_code)]

1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-match-patterns.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@

// aux-build:empty-struct.rs

#![feature(associated_consts)]

extern crate empty_struct;
use empty_struct::XEmpty2 as XFoo;
1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-outer-ty-refs.rs
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@
// <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.
#![feature(associated_consts)]

trait Lattice {
const BOTTOM: Self;
1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-overwrite-default.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Foo {
const ID: i32 = 2;
1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-public-impl.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

mod bar1 {
pub use self::bar2::Foo;
1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-range-match-patterns.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

struct Foo;

1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-resolution-order.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

struct MyType;

1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-self-type.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait MyInt {
const ONE: Self;
1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-type-parameters.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Foo {
const X: i32;
1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-ufcs-infer-trait.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Foo {
const ID: i32;
1 change: 0 additions & 1 deletion src/test/run-pass/associated-const-use-default.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Foo {
const ID: i32 = 1;
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

// The main purpose of this test is to ensure that different impls of the same
// trait can refer to each other without setting off the static recursion check
1 change: 0 additions & 1 deletion src/test/run-pass/associated-const.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Foo {
const ID: i32;
1 change: 0 additions & 1 deletion src/test/run-pass/auxiliary/associated-const-cc-lib.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

#![crate_type="lib"]

1 change: 0 additions & 1 deletion src/test/run-pass/issue-23808.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]
#![deny(dead_code)]

// use different types / traits to test all combinations
1 change: 0 additions & 1 deletion src/test/run-pass/issue-24947.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@

// #24947 ICE using a trait-associated const in an array size

#![feature(associated_consts)]

struct Foo;

1 change: 0 additions & 1 deletion src/test/run-pass/issue-25145.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

struct S;

1 change: 0 additions & 1 deletion src/test/run-pass/issue-26095.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait HasNumber<T> {
const Number: usize;
1 change: 0 additions & 1 deletion src/test/run-pass/issue-31267-additional.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

#[derive(Clone, Copy, Debug)]
struct Bar;
1 change: 0 additions & 1 deletion src/test/run-pass/issue-31267.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@

// Regression test for issue #31267

#![feature(associated_consts)]

struct Foo;

1 change: 0 additions & 1 deletion src/test/run-pass/issue-40136.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

macro_rules! m { () => { 0 } }

1 change: 0 additions & 1 deletion src/test/rustdoc/assoc-consts.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

pub trait Foo {
// @has assoc_consts/trait.Foo.html '//*[@class="rust trait"]' \
1 change: 0 additions & 1 deletion src/test/rustdoc/auxiliary/issue-36031.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

pub trait Foo {
const FOO: usize;
1 change: 0 additions & 1 deletion src/test/rustdoc/const-doc.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

use std::marker::PhantomData;

1 change: 0 additions & 1 deletion src/test/rustdoc/issue-28478.rs
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@
// except according to those terms.

#![feature(associated_type_defaults)]
#![feature(associated_consts)]

// @has issue_28478/trait.Bar.html
pub trait Bar {
2 changes: 0 additions & 2 deletions src/test/rustdoc/issue-31808.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(associated_consts, associated_types)]

// Test that associated item impls on primitive types don't crash rustdoc

pub trait Foo {
1 change: 0 additions & 1 deletion src/test/rustdoc/issue-33302.rs
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@
// Ensure constant and array length values are not taken from source
// code, which wreaks havoc with macros.

#![feature(associated_consts)]

macro_rules! make {
($n:expr) => {
1 change: 0 additions & 1 deletion src/test/ui/missing-items/auxiliary/m1.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

pub trait X {
const CONSTANT: u32;
1 change: 0 additions & 1 deletion src/test/ui/missing-items/m2.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@

// aux-build:m1.rs

#![feature(associated_consts)]

extern crate m1;

6 changes: 3 additions & 3 deletions src/test/ui/missing-items/m2.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
error[E0601]: main function not found

error[E0046]: not all trait items implemented, missing: `CONSTANT`, `Type`, `method`
--> $DIR/m2.rs:20:1
--> $DIR/m2.rs:19:1
|
20 | / impl m1::X for X {
21 | | }
19 | / impl m1::X for X {
20 | | }
| |_^ missing `CONSTANT`, `Type`, `method` in implementation
|
= note: `CONSTANT` from trait: `const CONSTANT: u32;`
1 change: 0 additions & 1 deletion src/test/ui/span/impl-wrong-item-for-trait.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

use std::fmt::Debug;

76 changes: 38 additions & 38 deletions src/test/ui/span/impl-wrong-item-for-trait.stderr
Original file line number Diff line number Diff line change
@@ -1,86 +1,86 @@
error[E0437]: type `bar` is not a member of trait `Foo`
--> $DIR/impl-wrong-item-for-trait.rs:47:5
--> $DIR/impl-wrong-item-for-trait.rs:46:5
|
47 | type bar = u64;
46 | type bar = u64;
| ^^^^^^^^^^^^^^^ not a member of trait `Foo`

error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo`
--> $DIR/impl-wrong-item-for-trait.rs:25:5
--> $DIR/impl-wrong-item-for-trait.rs:24:5
|
16 | fn bar(&self);
15 | fn bar(&self);
| -------------- item in trait
...
25 | const bar: u64 = 1;
24 | const bar: u64 = 1;
| ^^^^^^^^^^^^^^^^^^^ does not match trait

error[E0046]: not all trait items implemented, missing: `bar`
--> $DIR/impl-wrong-item-for-trait.rs:22:1
--> $DIR/impl-wrong-item-for-trait.rs:21:1
|
16 | fn bar(&self);
15 | fn bar(&self);
| -------------- `bar` from trait
...
22 | / impl Foo for FooConstForMethod {
23 | | //~^ ERROR E0046
24 | | //~| NOTE missing `bar` in implementation
25 | | const bar: u64 = 1;
21 | / impl Foo for FooConstForMethod {
22 | | //~^ ERROR E0046
23 | | //~| NOTE missing `bar` in implementation
24 | | const bar: u64 = 1;
... |
28 | | const MY_CONST: u32 = 1;
29 | | }
27 | | const MY_CONST: u32 = 1;
28 | | }
| |_^ missing `bar` in implementation

error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo`
--> $DIR/impl-wrong-item-for-trait.rs:37:5
--> $DIR/impl-wrong-item-for-trait.rs:36:5
|
17 | const MY_CONST: u32;
16 | const MY_CONST: u32;
| -------------------- item in trait
...
37 | fn MY_CONST() {}
36 | fn MY_CONST() {}
| ^^^^^^^^^^^^^^^^ does not match trait

error[E0046]: not all trait items implemented, missing: `MY_CONST`
--> $DIR/impl-wrong-item-for-trait.rs:33:1
--> $DIR/impl-wrong-item-for-trait.rs:32:1
|
17 | const MY_CONST: u32;
16 | const MY_CONST: u32;
| -------------------- `MY_CONST` from trait
...
33 | / impl Foo for FooMethodForConst {
34 | | //~^ ERROR E0046
35 | | //~| NOTE missing `MY_CONST` in implementation
36 | | fn bar(&self) {}
32 | / impl Foo for FooMethodForConst {
33 | | //~^ ERROR E0046
34 | | //~| NOTE missing `MY_CONST` in implementation
35 | | fn bar(&self) {}
... |
39 | | //~| NOTE does not match trait
40 | | }
38 | | //~| NOTE does not match trait
39 | | }
| |_^ missing `MY_CONST` in implementation

error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo`
--> $DIR/impl-wrong-item-for-trait.rs:47:5
--> $DIR/impl-wrong-item-for-trait.rs:46:5
|
16 | fn bar(&self);
15 | fn bar(&self);
| -------------- item in trait
...
47 | type bar = u64;
46 | type bar = u64;
| ^^^^^^^^^^^^^^^ does not match trait

error[E0046]: not all trait items implemented, missing: `bar`
--> $DIR/impl-wrong-item-for-trait.rs:44:1
--> $DIR/impl-wrong-item-for-trait.rs:43:1
|
16 | fn bar(&self);
15 | fn bar(&self);
| -------------- `bar` from trait
...
44 | / impl Foo for FooTypeForMethod {
45 | | //~^ ERROR E0046
46 | | //~| NOTE missing `bar` in implementation
47 | | type bar = u64;
43 | / impl Foo for FooTypeForMethod {
44 | | //~^ ERROR E0046
45 | | //~| NOTE missing `bar` in implementation
46 | | type bar = u64;
... |
50 | | const MY_CONST: u32 = 1;
51 | | }
49 | | const MY_CONST: u32 = 1;
50 | | }
| |_^ missing `bar` in implementation

error[E0046]: not all trait items implemented, missing: `fmt`
--> $DIR/impl-wrong-item-for-trait.rs:53:1
--> $DIR/impl-wrong-item-for-trait.rs:52:1
|
53 | / impl Debug for FooTypeForMethod {
54 | | }
52 | / impl Debug for FooTypeForMethod {
53 | | }
| |_^ missing `fmt` in implementation
|
= note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
1 change: 0 additions & 1 deletion src/test/ui/span/issue-29595.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(associated_consts)]

trait Tr {
const C: Self;
4 changes: 2 additions & 2 deletions src/test/ui/span/issue-29595.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error[E0277]: the trait bound `u8: Tr` is not satisfied
--> $DIR/issue-29595.rs:18:17
--> $DIR/issue-29595.rs:17:17
|
18 | let a: u8 = Tr::C; //~ ERROR the trait bound `u8: Tr` is not satisfied
17 | let a: u8 = Tr::C; //~ ERROR the trait bound `u8: Tr` is not satisfied
| ^^^^^ the trait `Tr` is not implemented for `u8`
|
= note: required by `Tr::C`