]> git.lizzy.rs Git - rust.git/commitdiff
remove associated_consts feature gate
authorSean McArthur <sean.monstar@gmail.com>
Thu, 6 Jul 2017 18:52:25 +0000 (11:52 -0700)
committerSean McArthur <sean.monstar@gmail.com>
Thu, 6 Jul 2017 18:52:25 +0000 (11:52 -0700)
87 files changed:
src/doc/unstable-book/src/language-features/associated-consts.md [deleted file]
src/libcore/lib.rs
src/librustc/lib.rs
src/librustc_bitflags/lib.rs
src/librustc_borrowck/lib.rs
src/librustc_data_structures/lib.rs
src/librustc_llvm/lib.rs
src/librustc_mir/lib.rs
src/librustc_resolve/diagnostics.rs
src/librustc_resolve/lib.rs
src/librustc_trans/lib.rs
src/librustc_typeck/diagnostics.rs
src/libstd/lib.rs
src/libsyntax/feature_gate.rs
src/test/compile-fail-fulldeps/auxiliary/use_from_trait_xc.rs
src/test/compile-fail/E0164.rs
src/test/compile-fail/E0438.rs
src/test/compile-fail/associated-const-ambiguity-report.rs
src/test/compile-fail/associated-const-array-len.rs
src/test/compile-fail/associated-const-dead-code.rs
src/test/compile-fail/associated-const-generic-obligations.rs
src/test/compile-fail/associated-const-impl-wrong-lifetime.rs
src/test/compile-fail/associated-const-impl-wrong-type.rs
src/test/compile-fail/associated-const-no-item.rs
src/test/compile-fail/associated-const-private-impl.rs
src/test/compile-fail/associated-const-type-parameter-arms.rs
src/test/compile-fail/associated-const-type-parameter-arrays-2.rs
src/test/compile-fail/associated-const-type-parameter-arrays.rs
src/test/compile-fail/associated-const-upper-case-lint.rs
src/test/compile-fail/associated-item-duplicate-names-2.rs
src/test/compile-fail/associated-item-duplicate-names.rs
src/test/compile-fail/associated-types-overridden-default.rs
src/test/compile-fail/auxiliary/issue_41549.rs
src/test/compile-fail/auxiliary/use_from_trait_xc.rs
src/test/compile-fail/gated-associated_consts.rs [deleted file]
src/test/compile-fail/issue-28992-empty.rs
src/test/compile-fail/issue-31910.rs
src/test/compile-fail/issue-41549.rs
src/test/compile-fail/object-safety-associated-consts.rs
src/test/compile-fail/privacy-sanity.rs
src/test/compile-fail/private-in-public-warn.rs
src/test/compile-fail/private-in-public.rs
src/test/compile-fail/stmt_expr_attrs_no_feature.rs
src/test/compile-fail/trait-impl-can-not-have-untraitful-items.rs
src/test/compile-fail/trait-item-privacy.rs
src/test/compile-fail/use-from-trait.rs
src/test/incremental/hashes/trait_defs.rs
src/test/run-pass/associated-const-const-eval.rs
src/test/run-pass/associated-const-cross-crate-const-eval.rs
src/test/run-pass/associated-const-cross-crate-defaults.rs
src/test/run-pass/associated-const-cross-crate.rs
src/test/run-pass/associated-const-in-global-const.rs
src/test/run-pass/associated-const-inherent-impl.rs
src/test/run-pass/associated-const-marks-live-code.rs
src/test/run-pass/associated-const-match-patterns.rs
src/test/run-pass/associated-const-outer-ty-refs.rs
src/test/run-pass/associated-const-overwrite-default.rs
src/test/run-pass/associated-const-public-impl.rs
src/test/run-pass/associated-const-range-match-patterns.rs
src/test/run-pass/associated-const-resolution-order.rs
src/test/run-pass/associated-const-self-type.rs
src/test/run-pass/associated-const-type-parameters.rs
src/test/run-pass/associated-const-ufcs-infer-trait.rs
src/test/run-pass/associated-const-use-default.rs
src/test/run-pass/associated-const-use-impl-of-same-trait.rs
src/test/run-pass/associated-const.rs
src/test/run-pass/auxiliary/associated-const-cc-lib.rs
src/test/run-pass/issue-23808.rs
src/test/run-pass/issue-24947.rs
src/test/run-pass/issue-25145.rs
src/test/run-pass/issue-26095.rs
src/test/run-pass/issue-31267-additional.rs
src/test/run-pass/issue-31267.rs
src/test/run-pass/issue-40136.rs
src/test/rustdoc/assoc-consts.rs
src/test/rustdoc/auxiliary/issue-36031.rs
src/test/rustdoc/const-doc.rs
src/test/rustdoc/issue-28478.rs
src/test/rustdoc/issue-31808.rs
src/test/rustdoc/issue-33302.rs
src/test/ui/missing-items/auxiliary/m1.rs
src/test/ui/missing-items/m2.rs
src/test/ui/missing-items/m2.stderr
src/test/ui/span/impl-wrong-item-for-trait.rs
src/test/ui/span/impl-wrong-item-for-trait.stderr
src/test/ui/span/issue-29595.rs
src/test/ui/span/issue-29595.stderr

diff --git a/src/doc/unstable-book/src/language-features/associated-consts.md b/src/doc/unstable-book/src/language-features/associated-consts.md
deleted file mode 100644 (file)
index d661108..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-# `associated_consts`
-
-The tracking issue for this feature is: [#29646]
-
-[#29646]: https://github.com/rust-lang/rust/issues/29646
-
-------------------------
-
-With the `associated_consts` feature, you can define constants like this:
-
-```rust
-#![feature(associated_consts)]
-
-trait Foo {
-    const ID: i32;
-}
-
-impl Foo for i32 {
-    const ID: i32 = 1;
-}
-
-fn main() {
-    assert_eq!(1, i32::ID);
-}
-```
-
-Any implementor of `Foo` will have to define `ID`. Without the definition:
-
-```rust,ignore
-#![feature(associated_consts)]
-
-trait Foo {
-    const ID: i32;
-}
-
-impl Foo for i32 {
-}
-```
-
-gives
-
-```text
-error: not all trait items implemented, missing: `ID` [E0046]
-     impl Foo for i32 {
-     }
-```
-
-A default value can be implemented as well:
-
-```rust
-#![feature(associated_consts)]
-
-trait Foo {
-    const ID: i32 = 1;
-}
-
-impl Foo for i32 {
-}
-
-impl Foo for i64 {
-    const ID: i32 = 5;
-}
-
-fn main() {
-    assert_eq!(1, i32::ID);
-    assert_eq!(5, i64::ID);
-}
-```
-
-As you can see, when implementing `Foo`, you can leave it unimplemented, as
-with `i32`. It will then use the default value. But, as in `i64`, we can also
-add our own definition.
-
-Associated constants don’t have to be associated with a trait. An `impl` block
-for a `struct` or an `enum` works fine too:
-
-```rust
-#![feature(associated_consts)]
-
-struct Foo;
-
-impl Foo {
-    const FOO: u32 = 3;
-}
-```
index 97aaaffe8bc88909ff21401664f1077a3e199d20..e8e31ffea0b98d0d85c01d77feea00641cd9e723 100644 (file)
@@ -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::*;
index efa6a6cccc2b6850583560a5ea2113f27a315b07..e0317e5e7f8a7a821df05e2738e21c5fea357821 100644 (file)
@@ -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;
index 7576d9eeb3f750432abff625bb239fb9a7c8ad5a..83660714af78d5771ae391c18b518beecdd38ee3 100644 (file)
 
 
 #![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 @@
 ///
 /// ```{.rust}
 /// #![feature(rustc_private)]
-/// #![feature(associated_consts)]
 /// #[macro_use] extern crate rustc_bitflags;
 ///
 /// bitflags! {
index a2b1e3c26637dbd3876a7eccbb6bd3ce96ae9671..723df564419a40712a8e0c8d376e1842d49dde2c 100644 (file)
@@ -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;
index d63b4c9c31b5bc8081c76593cd2e927a4d9de09d..5d856597cad53744db6565cda6a40fad20eff267 100644 (file)
@@ -29,7 +29,6 @@
 #![feature(nonzero)]
 #![feature(unboxed_closures)]
 #![feature(fn_traits)]
-#![feature(associated_consts)]
 #![feature(unsize)]
 #![feature(i128_type)]
 #![feature(conservative_impl_trait)]
@@ -37,6 +36,7 @@
 #![feature(specialization)]
 #![feature(manually_drop)]
 
+#![cfg_attr(stage0, feature(associated_consts))]
 #![cfg_attr(stage0, feature(struct_field_attributes))]
 
 #![cfg_attr(unix, feature(libc))]
index b5dfe9bb1678cd6acc909cdf38c9df53ce76dfc6..947e433fdb936c7ea6a3adeb9b110163528b7b8c 100644 (file)
        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]
index 71855d3805e139c2c8e3008e85273c83fe378a46..bb1767773327c5a1ea86a2c2c1086da1ad9858c7 100644 (file)
@@ -19,7 +19,6 @@
 #![crate_type = "dylib"]
 #![deny(warnings)]
 
-#![feature(associated_consts)]
 #![feature(box_patterns)]
 #![feature(box_syntax)]
 #![feature(i128_type)]
@@ -28,6 +27,8 @@
 #![feature(collection_placement)]
 #![feature(nonzero)]
 
+#![cfg_attr(stage0, feature(associated_consts))]
+
 #[macro_use] extern crate log;
 extern crate graphviz as dot;
 #[macro_use]
index 34f3ff276ccd97f9137d2ff9428f9d54f5141e08..28b5b7c440cfd7aa56403f5d4a1224b1e2592692 100644 (file)
@@ -1320,8 +1320,6 @@ impl Foo for i32 {}
 Erroneous code example:
 
 ```compile_fail,E0438
-#![feature(associated_consts)]
-
 trait Foo {}
 
 impl Foo for i32 {
index 4bfe4d25ded9373ecdfe3a96e907469320426894..b60a8df407f7bd0f563664c9f3c6afc07e953158 100644 (file)
       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]
index 5c76f778f8d63610553bd35a36eadc57e2d684e8..3038c7d6c782edf43c40c4e41f63aa70fc55b44e 100644 (file)
@@ -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;
 
index 37f6f3753d7b4fea373fba03fb68c68b3323b797..368fada511b9fe392de2eb098c3b00056c18a2f1 100644 (file)
@@ -2777,8 +2777,6 @@ unsafe impl Send for &'static Foo {}
 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 @@ impl Foo for Bar {
 code example:
 
 ```compile_fail,E0324
-#![feature(associated_consts)]
-
 struct Bar;
 
 trait Foo {
@@ -2850,8 +2844,6 @@ fn N() {}
 verify that you are indeed implementing the correct trait items. Example:
 
 ```
-#![feature(associated_consts)]
-
 struct Bar;
 
 trait Foo {
@@ -2873,8 +2865,6 @@ fn M() {} // ok!
 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 @@ impl Foo for Bar {
 Here's an example of this error:
 
 ```compile_fail,E0326
-#![feature(associated_consts)]
-
 trait Foo {
     const BAR: bool;
 }
@@ -2991,8 +2977,6 @@ impl<T, U> CoerceUnsized<MyType<U>> for MyType<T>
 error is shown below:
 
 ```
-#![feature(associated_consts)]
-
 trait Foo {
     const BAR: f64;
 }
@@ -3012,8 +2996,6 @@ fn get_bar_bad<F: Foo>(t: F) -> f64 {
 through a concrete type, as shown below:
 
 ```
-#![feature(associated_consts)]
-
 trait Foo {
     const BAR: f64;
 }
index c4bdf7c5b822b3ae15f8c0b50a4f393a4951ebc4..2fc107c663bb41e9557a25545f614dd293900ad5 100644 (file)
 #![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)]
 #![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.
index cb625b1ac066e4d0f6d5c9f248b399ac46279fca..9adba7f50ccaf3aca50684243987e097980b6842 100644 (file)
@@ -198,10 +198,6 @@ pub fn new() -> 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 @@ pub fn new() -> 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 @@ fn visit_fn(&mut self,
 
     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 @@ fn visit_impl_item(&mut self, ii: &'a ast::ImplItem) {
         }
 
         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");
index 7024c9dad7c11acb37fe157e021eaf19732eb4b5..9a6d176d0887b8d026dc41fa5406345f9cdf5abb 100644 (file)
@@ -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};
 
index 8d21cde84da1c06bd9a498b408225ec84887d9bf..cf6cf15115ac0a1dd88b027143557150a9a02d8b 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(associated_consts)]
 
 enum Foo {}
 
index 2e2df4bee5a35242caa2451d02dac642e9a9d436..99e0dbbcea804b5abc920dc89a84912397f0a84e 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(associated_consts)]
 
 trait Bar {}
 
index 22292a6da9dfffe5d6221d313687975f5bcdd082..5051e78d1ba178b07f318479a85bc99c4f6c372f 100644 (file)
@@ -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;
index 7f77ae2ec1f10ec4b954b29e780527dead31b99b..2cc10f0f956b7105a8d9346403c52aa5a69cf1f7 100644 (file)
@@ -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;
index 1ed156d45f5507644323e2302b9aa37436d6d9f5..42db13f4f3bd4423260a5a9e76c376310c0afdfe 100644 (file)
@@ -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;
index 90afe8d7336a7e41e0e2141488a59b3b8a0d82ea..45f53418dca50d7e538ba2e592dfeb243beee7ce 100644 (file)
@@ -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;
index 834f346069418a76f3a08fa919ffa04b8d5b49e7..51681a4bb880b54e176f9095d6d92b98759d8aae 100644 (file)
@@ -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;
index ec495c87b1a3f70e1c56d8d715fd92bad73502da..e38851ccd6ff6f023790eb22a17e8bb0b974bf70 100644 (file)
@@ -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
index 89d1ac13087a9bd2c687857506e252b13b54f829..f9a57cd6d75ef39da232bde135858ad63793d3ae 100644 (file)
@@ -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;
index 6ebe80b5701b9dbcb090da8e330833df9f6cd88f..b5accfff5bbf545808901a1ceb6a66ea4794ff93 100644 (file)
@@ -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;
index f564157b498147c98c40fae27cf758bb19cf8885..52bb4a1b463b4b7f75709c567bdb0481aef7d439 100644 (file)
@@ -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 }
 
index e284a61eb2daa3bf9d74c9d079629681749a4efa..d196cf2215601b4389e772cc72b5092abf8055a7 100644 (file)
@@ -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;
index 848ea65a9cfd15d9a6d1a2f8e9213ef7cac55a27..0b24cab2a681cc6c6138b320c23ca8a799178deb 100644 (file)
@@ -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;
index 752691fa1c5500f691654a6357a360b28d8c25b9..497ff426b2fae5f8d8939895032c6ec2ec155d17 100644 (file)
@@ -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)]
 
index ab903591fbb069b3f15a68b30cb19812965b8f20..85ea949b9c8da28603ecca4bfb991f1f6a10a48f 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(associated_consts)]
 
 struct Foo;
 
index 85868f5c02085df966afe230c66a480cde32f3cd..a2fc1bc01776771db2655ff034febde660eef7cd 100644 (file)
@@ -10,7 +10,6 @@
 
 // Test for issue #23969
 
-#![feature(associated_consts)]
 
 trait Foo {
     type Ty;
index 19f13f5fc2f2ba7bd5da444ed4a8adf4fe469014..946a4b2f73ac4ff82ddaa845267d21ff0328d554 100644 (file)
@@ -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 {
index 77b203997b42a35ace13224a1bc5554109dfe593..5a6db789282733319c8dbe7f1835bdf5bd4f2c98 100644 (file)
@@ -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;
index 7024c9dad7c11acb37fe157e021eaf19732eb4b5..9a6d176d0887b8d026dc41fa5406345f9cdf5abb 100644 (file)
@@ -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};
 
diff --git a/src/test/compile-fail/gated-associated_consts.rs b/src/test/compile-fail/gated-associated_consts.rs
deleted file mode 100644 (file)
index ee4422f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015 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.
-
-// gate-test-associated_consts
-
-trait MyTrait {
-    const C: bool;
-    //~^ associated constants are experimental
-}
-
-struct Foo;
-
-impl Foo {
-    const C: bool = true;
-    //~^ associated constants are experimental
-}
index 48aabce708eab277d3bcfb944a5fbe15734272f0..536784508b77b7ffa1764f12ba0b81fb32a28075 100644 (file)
@@ -10,7 +10,6 @@
 
 // Can't use constants as tuple struct patterns
 
-#![feature(associated_consts)]
 
 const C1: i32 = 0;
 
index aac8b89e882b3b7f6adcec6367a7f13e25190e90..7524049c5df3d73bee295eb1b8a884a2d7603662 100644 (file)
@@ -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,
index c4aab4bcabf637f79c7cc0afb6603b33d6021e27..67be194c8ed2a76fd03b9b8dc69a07f3fc753a41 100644 (file)
@@ -10,7 +10,6 @@
 
 // aux-build:issue_41549.rs
 
-#![feature(associated_consts)]
 
 extern crate issue_41549;
 
index c442cd4083657f6045c447acb3dc7f2998f753eb..ebb52face06ac516d3221d8d75afd4cf5877a965 100644 (file)
@@ -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;
index 063848f62aa9ee9f23c5cd100fd0ce657586cd36..933ec3837dfc712a2ab2b0dd3abce3aa95438e8e 100644 (file)
@@ -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 {}
index 92d96595fd780a5f157cfe1dd82e6a6140381a22..f030012b172f0ac18fb815b3edbdea70593b38ae 100644 (file)
@@ -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)]
index b819ef116efe91d5c8eb0949404edd441c4ff79f..b865e391d29c17b2b240daa5a14f4f38fde2eba2 100644 (file)
@@ -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 {
index 2fda2ee0900c7470ea82f045817f7cd223e54532..d8626dfd39ee805897b89fecc2b8ff5a57060249 100644 (file)
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 #![feature(custom_attribute)]
-#![feature(associated_consts)]
 
 macro_rules! stmt_mac {
     () => {
index 0ed4e62778e8b7297f91a42b05d0cde82ae4341e..cc143a6209d41e759021cfc62bb9d5d0496b5983 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(associated_consts)]
 
 trait A { }
 
index e915ca05f6751c1cf849a1dca2fb6aff3229caf1..b8d83e5adf23da1f72c8ec6bc07c62aa26276b61 100644 (file)
@@ -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;
index 58e37bbfa3ea7c7729d56545777f2aff02527e81..33adc2b5bfe5a8abcf05fccb46a27c341869972e 100644 (file)
@@ -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
index 61a2be054a51a61e8758f837d3d67a3344b235b9..e47556a790b62652835cc525e652fb5e69536da2 100644 (file)
@@ -30,7 +30,6 @@
 #![crate_type="rlib"]
 #![feature(associated_type_defaults)]
 #![feature(intrinsics)]
-#![feature(associated_consts)]
 
 
 // Change trait visibility --------------------------------------------------------
index 0b230df41469f0af3f1b3d1407c21cd049ca7428..9c36a42527f1250e4e6a4c9dca5d2ee19db000cd 100644 (file)
@@ -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;
index 7d31bb5b1a5e2dd7c0b4ec50986d3df296161aba..c2758b1aed77f175732911fbcc2812f3c4f8a161 100644 (file)
@@ -10,7 +10,6 @@
 
 // aux-build:associated-const-cc-lib.rs
 
-#![feature(associated_consts)]
 
 extern crate associated_const_cc_lib as foolib;
 
index 92d2aae61c8e526d440b091be762cd2e8ccecc1d..084c448ba2ab16028e4de867f8df0230cc3ae97c 100644 (file)
@@ -10,7 +10,6 @@
 
 // aux-build:associated-const-cc-lib.rs
 
-#![feature(associated_consts)]
 
 extern crate associated_const_cc_lib as foolib;
 
index 73d5dc5df96f6949b60ba63064eb2fd5875f6091..a882d6ae23d8a3bb9e5549758ea2e8f429a2a3e2 100644 (file)
@@ -10,7 +10,6 @@
 
 // aux-build:associated-const-cc-lib.rs
 
-#![feature(associated_consts)]
 
 extern crate associated_const_cc_lib as foolib;
 
index e3a1e29d20f54387a7a83e8318264b430faf09cd..b7fb4d73259b32d476c1ea1a9837f1966e8e266e 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(associated_consts)]
 
 struct Foo;
 
index 5c9abf982b158253145f73a729a5404e1b07ba1e..86454a4a09117fd4160413e327d306a16f0ee735 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(associated_consts)]
 
 struct Foo;
 
index ea91a95312983a17cbe62723e1704d4b1e27ec1f..bfeb78ddfe5c726fb23ea087464cee199b9959d8 100644 (file)
@@ -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)]
 
index 01d1b27bfc99f803a42643588485cae13edbb471..54603e6e0d9aaacd566f1b792723238f381d0098 100644 (file)
@@ -10,7 +10,6 @@
 
 // aux-build:empty-struct.rs
 
-#![feature(associated_consts)]
 
 extern crate empty_struct;
 use empty_struct::XEmpty2 as XFoo;
index 2e6fb11a12d6bb6cae799208fd617aa85f4bb35c..987c64dbff562ab99627092ba8e9040af0803f4d 100644 (file)
@@ -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;
index 0846ad9a571b34a9106ef35261ba2c0bb6a31cb0..bb594cfa0f9739dcf3835f22954ea737bddd1697 100644 (file)
@@ -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;
index b1d071799e1a8b3e5db41598a34e2336ddce1efb..5ff363844a124ac07f2a4c79c476a1b130b46e01 100644 (file)
@@ -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;
index d38ccca689141e3a24f13ee8d4b2ba0f1708a24c..d72e1efc4d74ce08cf449c47065b005781e16b59 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(associated_consts)]
 
 struct Foo;
 
index 98b7164ab74ad142846e20d56c42f71eb2a293bf..5fa49b48200dbef1b1738c83481b254d15059bbf 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(associated_consts)]
 
 struct MyType;
 
index d3add976b5af871202d780e29b1f78f45aecb35d..16ccb5b39552c9747620cbe229ff6ed9a73f09bb 100644 (file)
@@ -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;
index df2083530646e3404c7825a4e638adf8a4a6c9b6..7859a87e014b0f15c3885a8b84be7935f3cbe790 100644 (file)
@@ -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;
index aa3e14a939784cee9620f6f20dd19937a6c76a30..b22630678249fd70e48c6b4203cdb66c582cb06b 100644 (file)
@@ -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;
index 5813d86742532b7943148f4a0a5d9fdb26ab5db7..5ed9a6dea3dd7580291f8516752111d4339d1a34 100644 (file)
@@ -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;
index 62658470baa525631c3429f8b703a5b2d85b1492..986f160f3cbd037d0fe11ffbfd77176427d68d8b 100644 (file)
@@ -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
index d9065445009312697a80bb44e877efe45d726d21..3c84f4a833530f99c71c38a1ede3d2eafaf528b6 100644 (file)
@@ -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;
index 1fd8fee0117c5c31b287405a19faa33526a258f3..e4cada40db3c99c800dd8f90c9eac5656167e380 100644 (file)
@@ -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"]
 
index 0302b11fdbb7bb765ed1f5a14d0b82b9bfdb2596..1435a1b5d387838e484f975baf0c83695a309d7d 100644 (file)
@@ -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
index 2b0c90c4d15d4f361772f749ee9f2c63fea07914..19a364a93fd792c218e14f25a37c45947176e9e4 100644 (file)
@@ -10,7 +10,6 @@
 
 // #24947 ICE using a trait-associated const in an array size
 
-#![feature(associated_consts)]
 
 struct Foo;
 
index 6f02f2783818e281ddb446ac48e2e0cec6ab0345..d5d23012e040bb47912c3f48488e2ee36665072c 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(associated_consts)]
 
 struct S;
 
index f34685c6936cbd05af2562d59b2369d32eac86d2..9d8d9c3ff2e3b3e16d4e3245d4bcbf0e5beef920 100644 (file)
@@ -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;
index a6b42525887869d207154583c9a753dbf718feda..06ab310f6d21fd81b4d98f89f328b34bee08114a 100644 (file)
@@ -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;
index 90eb0f6c841eeacc32699f3b16341f9bfccfc6b6..9cbdde4049164005eeca97a48a892e9a01a8d04c 100644 (file)
@@ -10,7 +10,6 @@
 
 // Regression test for issue #31267
 
-#![feature(associated_consts)]
 
 struct Foo;
 
index db642812b4be4ae9402a356544ae54b3e561e0d3..488754af06fb81b37c18d5044fe9a72a39bbc453 100644 (file)
@@ -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 } }
 
index 8720d419a4de69712bab4935c87469773fc637d2..2edf61288f588544a882bd7d430bfd6343b41a7b 100644 (file)
@@ -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"]' \
index 6b8a4b9f13703d13d184e73ffa5b11e496adb1a7..6611cc428b0e14b27f0c7084106515b31e8fa95f 100644 (file)
@@ -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;
index 9f70fe43175b9a68d555cab7efbbeccf9c327c9c..9884e3d2c199536d7144ebf55f34ac6d7875d8dd 100644 (file)
@@ -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;
 
index 493c08693e94a6d1e317f5d69000dff1d4792780..c1141cb031e4fcae1a0d2e5576dd1777a85947b1 100644 (file)
@@ -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 {
index 46be8229d7c651ba2982fb01a88dc8d1b381a84b..20105babfd92d987c0b896e70f57eb59dded40aa 100644 (file)
@@ -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 {
index a34ee908ef295adff271c5ef0aa09044fc29ac78..a6ff001b96fb31282d712fc4ab97b6e1308db7b7 100644 (file)
@@ -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) => {
index f8389692267e135b22fb85a416f3d2a00215e82e..49fc586d6b52f7ba4abe978c1c36d47f40a4623b 100644 (file)
@@ -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;
index fc09039640b99f97cfb29b1bcff93f1849422815..ffd7ff7f4323d989b72fe5339497a5bfa3960acd 100644 (file)
@@ -10,7 +10,6 @@
 
 // aux-build:m1.rs
 
-#![feature(associated_consts)]
 
 extern crate m1;
 
index 51afb95b89611d3583d4c4c7c740baa29b0eea3a..ce061bd167a88c322179b80c5bd11c82bb22b010 100644 (file)
@@ -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;`
index 54ed42af5d582028bd4b241ddbc32daebfddb9ae..091df1d5dc898852fa5fa115dc7e176439ad99b0 100644 (file)
@@ -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;
 
index 2c4c6a148d7b37ec107ecd6b73665a675048f371..5812cab0d050a300d21bcb9ec0d4d87635267a8a 100644 (file)
@@ -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>`
index 79704619ccd370cf13ebf5a896e315588e3f55ba..ed7f2d1a92e75525d56a30ce51ef638415006218 100644 (file)
@@ -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;
index abbac245f89f66b191709212f42738ac9d8e2244..81ba0057d717341dbc4dd8f75984f62d20370545 100644 (file)
@@ -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`