Migrate even more feature gate tests to ui

We also rename some of the files to conform to the
feature-gate-<feat_name>.rs pattern that is most common.
This commit is contained in:
est31 2017-12-06 10:18:03 +01:00
parent 38438c618c
commit 6dba3e68e6
71 changed files with 1012 additions and 71 deletions

View File

@ -1,15 +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-no_core
#![no_core] //~ ERROR no_core is experimental
fn main() {}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-abi_unadjusted
extern "unadjusted" fn foo() {
//~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable
}

View File

@ -0,0 +1,12 @@
error: unadjusted ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi_unadjusted.rs:11:1
|
11 | / extern "unadjusted" fn foo() {
12 | | //~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable
13 | | }
| |_^
|
= help: add #![feature(abi_unadjusted)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-asm
fn main() {
unsafe {
asm!(""); //~ ERROR inline assembly is not stable enough

View File

@ -0,0 +1,10 @@
error: inline assembly is not stable enough for use and is subject to change (see issue #29722)
--> $DIR/feature-gate-asm.rs:13:9
|
13 | asm!(""); //~ ERROR inline assembly is not stable enough
| ^^^^^^^^^
|
= help: add #![feature(asm)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -0,0 +1,10 @@
error: inline assembly is not stable enough for use and is subject to change (see issue #29722)
--> $DIR/feature-gate-asm2.rs:15:24
|
15 | println!("{}", asm!("")); //~ ERROR inline assembly is not stable
| ^^^^^^^^
|
= help: add #![feature(asm)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-box_patterns
fn main() {
let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
println!("x: {}", x);

View File

@ -1,7 +1,7 @@
error: box pattern syntax is experimental (see issue #29641)
--> $DIR/feature-gate-box-pat.rs:14:9
--> $DIR/feature-gate-box_patterns.rs:12:9
|
14 | let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
12 | let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
| ^^^^^
|
= help: add #![feature(box_patterns)] to the crate attributes to enable

View File

@ -10,8 +10,6 @@
// Test that the use of the box syntax is gated by `box_syntax` feature gate.
// gate-test-box_syntax
fn main() {
let x = box 3;
//~^ ERROR box expression syntax is experimental; you can call `Box::new` instead.

View File

@ -0,0 +1,10 @@
error: box expression syntax is experimental; you can call `Box::new` instead. (see issue #27779)
--> $DIR/feature-gate-box_syntax.rs:14:13
|
14 | let x = box 3;
| ^^^^^
|
= help: add #![feature(box_syntax)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-concat_idents
const XY_1: i32 = 10;
fn main() {

View File

@ -0,0 +1,18 @@
error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599)
--> $DIR/feature-gate-concat_idents.rs:15:13
|
15 | let a = concat_idents!(X, Y_1); //~ ERROR `concat_idents` is not stable
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(concat_idents)] to the crate attributes to enable
error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599)
--> $DIR/feature-gate-concat_idents.rs:16:13
|
16 | let b = concat_idents!(X, Y_2); //~ ERROR `concat_idents` is not stable
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(concat_idents)] to the crate attributes to enable
error: aborting due to 2 previous errors

View File

@ -0,0 +1,10 @@
error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599)
--> $DIR/feature-gate-concat_idents2.rs:14:5
|
14 | concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(concat_idents)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -0,0 +1,18 @@
error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599)
--> $DIR/feature-gate-concat_idents3.rs:17:20
|
17 | assert_eq!(10, concat_idents!(X, Y_1)); //~ ERROR `concat_idents` is not stable
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(concat_idents)] to the crate attributes to enable
error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599)
--> $DIR/feature-gate-concat_idents3.rs:18:20
|
18 | assert_eq!(20, concat_idents!(X, Y_2)); //~ ERROR `concat_idents` is not stable
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(concat_idents)] to the crate attributes to enable
error: aborting due to 2 previous errors

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-conservative_impl_trait
fn foo() -> impl Fn() { || {} }
//~^ ERROR `impl Trait` in return position is experimental

View File

@ -0,0 +1,10 @@
error: `impl Trait` in return position is experimental (see issue #34511)
--> $DIR/feature-gate-conservative_impl_trait.rs:11:13
|
11 | fn foo() -> impl Fn() { || {} }
| ^^^^^^^^^
|
= help: add #![feature(conservative_impl_trait)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-const_fn
// Test use of const fn without feature gate.
const fn foo() -> usize { 0 } //~ ERROR const fn is unstable

View File

@ -0,0 +1,60 @@
error[E0379]: trait fns cannot be declared const
--> $DIR/feature-gate-const_fn.rs:16:5
|
16 | const fn foo() -> u32; //~ ERROR const fn is unstable
| ^^^^^ trait fns cannot be const
error[E0379]: trait fns cannot be declared const
--> $DIR/feature-gate-const_fn.rs:18:5
|
18 | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable
| ^^^^^ trait fns cannot be const
error[E0379]: trait fns cannot be declared const
--> $DIR/feature-gate-const_fn.rs:27:5
|
27 | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable
| ^^^^^ trait fns cannot be const
error: const fn is unstable (see issue #24111)
--> $DIR/feature-gate-const_fn.rs:13:1
|
13 | const fn foo() -> usize { 0 } //~ ERROR const fn is unstable
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(const_fn)] to the crate attributes to enable
error: const fn is unstable (see issue #24111)
--> $DIR/feature-gate-const_fn.rs:16:5
|
16 | const fn foo() -> u32; //~ ERROR const fn is unstable
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(const_fn)] to the crate attributes to enable
error: const fn is unstable (see issue #24111)
--> $DIR/feature-gate-const_fn.rs:18:5
|
18 | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(const_fn)] to the crate attributes to enable
error: const fn is unstable (see issue #24111)
--> $DIR/feature-gate-const_fn.rs:23:5
|
23 | const fn baz() -> u32 { 0 } //~ ERROR const fn is unstable
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(const_fn)] to the crate attributes to enable
error: const fn is unstable (see issue #24111)
--> $DIR/feature-gate-const_fn.rs:27:5
|
27 | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(const_fn)] to the crate attributes to enable
error: aborting due to 8 previous errors

View File

@ -10,8 +10,6 @@
// Check that literals in attributes parse just fine.
// gate-test-custom_attribute
#![feature(rustc_attrs, attr_literals)]
#![allow(dead_code)]
#![allow(unused_variables)]

View File

@ -0,0 +1,106 @@
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute.rs:17:1
|
17 | #[fake_attr] //~ ERROR attribute `fake_attr` is currently unknown
| ^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute.rs:18:1
|
18 | #[fake_attr(100)] //~ ERROR attribute `fake_attr` is currently unknown
| ^^^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute.rs:19:1
|
19 | #[fake_attr(1, 2, 3)] //~ ERROR attribute `fake_attr` is currently unknown
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute.rs:20:1
|
20 | #[fake_attr("hello")] //~ ERROR attribute `fake_attr` is currently unknown
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute.rs:21:1
|
21 | #[fake_attr(name = "hello")] //~ ERROR attribute `fake_attr` is currently unknown
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute.rs:22:1
|
22 | #[fake_attr(1, "hi", key = 12, true, false)] //~ ERROR attribute `fake_attr` is currently unknown
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute.rs:23:1
|
23 | #[fake_attr(key = "hello", val = 10)] //~ ERROR attribute `fake_attr` is currently unknown
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute.rs:24:1
|
24 | #[fake_attr(key("hello"), val(10))] //~ ERROR attribute `fake_attr` is currently unknown
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute.rs:25:1
|
25 | #[fake_attr(enabled = true, disabled = false)] //~ ERROR attribute `fake_attr` is currently unknown
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute.rs:26:1
|
26 | #[fake_attr(true)] //~ ERROR attribute `fake_attr` is currently unknown
| ^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute.rs:27:1
|
27 | #[fake_attr(pi = 3.14159)] //~ ERROR attribute `fake_attr` is currently unknown
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute.rs:28:1
|
28 | #[fake_attr(b"hi")] //~ ERROR attribute `fake_attr` is currently unknown
| ^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute.rs:29:1
|
29 | #[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown
| ^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: aborting due to 13 previous errors

View File

@ -0,0 +1,138 @@
error: The attribute `lt_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:23:13
|
23 | struct StLt<#[lt_struct] 'a>(&'a u32);
| ^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `ty_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:25:13
|
25 | struct StTy<#[ty_struct] I>(I);
| ^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `lt_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:28:11
|
28 | enum EnLt<#[lt_enum] 'b> { A(&'b u32), B }
| ^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `ty_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:30:11
|
30 | enum EnTy<#[ty_enum] J> { A(J), B }
| ^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `lt_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:33:12
|
33 | trait TrLt<#[lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; }
| ^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `ty_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:35:12
|
35 | trait TrTy<#[ty_trait] K> { fn foo(&self, _: K); }
| ^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `lt_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:38:11
|
38 | type TyLt<#[lt_type] 'd> = &'d u32;
| ^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `ty_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:40:11
|
40 | type TyTy<#[ty_type] L> = (L, );
| ^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `lt_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:43:6
|
43 | impl<#[lt_inherent] 'e> StLt<'e> { }
| ^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `ty_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:45:6
|
45 | impl<#[ty_inherent] M> StTy<M> { }
| ^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `lt_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:48:6
|
48 | impl<#[lt_impl_for] 'f> TrLt<'f> for StLt<'f> {
| ^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `ty_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:52:6
|
52 | impl<#[ty_impl_for] N> TrTy<N> for StTy<N> {
| ^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `lt_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:57:9
|
57 | fn f_lt<#[lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } }
| ^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `ty_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:59:9
|
59 | fn f_ty<#[ty_fn] O>(_: O) { }
| ^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `lt_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:63:13
|
63 | fn m_lt<#[lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } }
| ^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `ty_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:65:13
|
65 | fn m_ty<#[ty_meth] P>(_: P) { }
| ^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: The attribute `lt_hof` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/feature-gate-custom_attribute2.rs:70:19
|
70 | where Q: for <#[lt_hof] 'i> Fn(&'i [u32]) -> &'i u32
| ^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: aborting due to 17 previous errors

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-custom_derive
#[derive_Clone]
//~^ ERROR attributes of the form `#[derive_*]` are reserved
struct Test;

View File

@ -0,0 +1,10 @@
error: attributes of the form `#[derive_*]` are reserved for the compiler (see issue #29644)
--> $DIR/feature-gate-custom_derive.rs:11:1
|
11 | #[derive_Clone]
| ^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_derive)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-default_type_parameter_fallback
#![allow(unused)]
fn avg<T=i32>(_: T) {}

View File

@ -0,0 +1,21 @@
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions.
--> $DIR/feature-gate-default_type_parameter_fallback.rs:13:8
|
13 | fn avg<T=i32>(_: T) {}
| ^
|
= note: #[deny(invalid_type_param_default)] on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions.
--> $DIR/feature-gate-default_type_parameter_fallback.rs:18:6
|
18 | impl<T=i32> S<T> {}
| ^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
error: aborting due to 2 previous errors

View File

@ -16,8 +16,6 @@
// using `rustc_attrs` feature. There is a separate compile-fail/ test
// ensuring that the attribute feature-gating works in this context.)
// gate-test-generic_param_attrs
#![feature(rustc_attrs)]
#![allow(dead_code)]

View File

@ -0,0 +1,138 @@
error: attributes on lifetime bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:22:13
|
22 | struct StLt<#[rustc_lt_struct] 'a>(&'a u32);
| ^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on type parameter bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:24:13
|
24 | struct StTy<#[rustc_ty_struct] I>(I);
| ^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on lifetime bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:27:11
|
27 | enum EnLt<#[rustc_lt_enum] 'b> { A(&'b u32), B }
| ^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on type parameter bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:29:11
|
29 | enum EnTy<#[rustc_ty_enum] J> { A(J), B }
| ^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on lifetime bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:32:12
|
32 | trait TrLt<#[rustc_lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; }
| ^^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on type parameter bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:34:12
|
34 | trait TrTy<#[rustc_ty_trait] K> { fn foo(&self, _: K); }
| ^^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on lifetime bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:37:11
|
37 | type TyLt<#[rustc_lt_type] 'd> = &'d u32;
| ^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on type parameter bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:39:11
|
39 | type TyTy<#[rustc_ty_type] L> = (L, );
| ^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on lifetime bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:42:6
|
42 | impl<#[rustc_lt_inherent] 'e> StLt<'e> { }
| ^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on type parameter bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:44:6
|
44 | impl<#[rustc_ty_inherent] M> StTy<M> { }
| ^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on lifetime bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:47:6
|
47 | impl<#[rustc_lt_impl_for] 'f> TrLt<'f> for StLt<'f> {
| ^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on type parameter bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:51:6
|
51 | impl<#[rustc_ty_impl_for] N> TrTy<N> for StTy<N> {
| ^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on lifetime bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:56:9
|
56 | fn f_lt<#[rustc_lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } }
| ^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on type parameter bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:58:9
|
58 | fn f_ty<#[rustc_ty_fn] O>(_: O) { }
| ^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on lifetime bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:62:13
|
62 | fn m_lt<#[rustc_lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } }
| ^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on type parameter bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:64:13
|
64 | fn m_ty<#[rustc_ty_meth] P>(_: P) { }
| ^^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: attributes on lifetime bindings are experimental (see issue #34761)
--> $DIR/feature-gate-generic_param_attrs.rs:69:19
|
69 | where Q: for <#[rustc_lt_hof] 'i> Fn(&'i [u32]) -> &'i u32
| ^^^^^^^^^^^^^^^
|
= help: add #![feature(generic_param_attrs)] to the crate attributes to enable
error: aborting due to 17 previous errors

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-i128_type
fn test2() {
0i128; //~ ERROR 128-bit integers are not stable
}

View File

@ -0,0 +1,18 @@
error: 128-bit integers are not stable (see issue #35118)
--> $DIR/feature-gate-i128_type.rs:12:5
|
12 | 0i128; //~ ERROR 128-bit integers are not stable
| ^^^^^
|
= help: add #![feature(i128_type)] to the crate attributes to enable
error: 128-bit integers are not stable (see issue #35118)
--> $DIR/feature-gate-i128_type.rs:16:5
|
16 | 0u128; //~ ERROR 128-bit integers are not stable
| ^^^^^
|
= help: add #![feature(i128_type)] to the crate attributes to enable
error: aborting due to 2 previous errors

View File

@ -0,0 +1,46 @@
error: 128-bit type is unstable (see issue #35118)
--> $DIR/feature-gate-i128_type2.rs:13:15
|
13 | fn test1() -> i128 { //~ ERROR 128-bit type is unstable
| ^^^^
|
= help: add #![feature(i128_type)] to the crate attributes to enable
error: 128-bit type is unstable (see issue #35118)
--> $DIR/feature-gate-i128_type2.rs:17:17
|
17 | fn test1_2() -> u128 { //~ ERROR 128-bit type is unstable
| ^^^^
|
= help: add #![feature(i128_type)] to the crate attributes to enable
error: 128-bit type is unstable (see issue #35118)
--> $DIR/feature-gate-i128_type2.rs:22:12
|
22 | let x: i128 = 0; //~ ERROR 128-bit type is unstable
| ^^^^
|
= help: add #![feature(i128_type)] to the crate attributes to enable
error: 128-bit type is unstable (see issue #35118)
--> $DIR/feature-gate-i128_type2.rs:26:12
|
26 | let x: u128 = 0; //~ ERROR 128-bit type is unstable
| ^^^^
|
= help: add #![feature(i128_type)] to the crate attributes to enable
error[E0601]: main function not found
error: repr with 128-bit type is unstable (see issue #35118)
--> $DIR/feature-gate-i128_type2.rs:30:1
|
30 | / enum A { //~ ERROR 128-bit type is unstable
31 | | A(u64)
32 | | }
| |_^
|
= help: add #![feature(repr128)] to the crate attributes to enable
error: aborting due to 6 previous errors

View File

@ -12,8 +12,6 @@
// feature gate, both when it occurs where expected (atop
// `extern { }` blocks) and where unexpected.
// gate-test-link_args
// sidestep warning (which is correct, but misleading for
// purposes of this test)
#![allow(unused_attributes)]

View File

@ -0,0 +1,26 @@
error: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596)
--> $DIR/feature-gate-link_args.rs:22:1
|
22 | #[link_args = "-l expected_use_case"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(link_args)] to the crate attributes to enable
error: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596)
--> $DIR/feature-gate-link_args.rs:26:1
|
26 | #[link_args = "-l unexected_use_on_non_extern_item"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(link_args)] to the crate attributes to enable
error: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596)
--> $DIR/feature-gate-link_args.rs:19:1
|
19 | #![link_args = "-l unexpected_use_as_inner_attr_on_mod"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(link_args)] to the crate attributes to enable
error: aborting due to 3 previous errors

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-link_cfg
#[link(name = "foo", cfg(foo))]
//~^ ERROR: is feature gated
extern {}

View File

@ -0,0 +1,10 @@
error: is feature gated (see issue #37406)
--> $DIR/feature-gate-link_cfg.rs:11:1
|
11 | #[link(name = "foo", cfg(foo))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(link_cfg)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-link_llvm_intrinsics
extern {
#[link_name = "llvm.sqrt.f32"]
fn sqrt(x: f32) -> f32;

View File

@ -0,0 +1,10 @@
error: linking to LLVM intrinsics is experimental (see issue #29602)
--> $DIR/feature-gate-link_llvm_intrinsics.rs:13:5
|
13 | fn sqrt(x: f32) -> f32;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(link_llvm_intrinsics)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-linkage
extern {
#[linkage = "extern_weak"] static foo: isize;
//~^ ERROR: the `linkage` attribute is experimental and not portable

View File

@ -0,0 +1,10 @@
error: the `linkage` attribute is experimental and not portable across platforms (see issue #29603)
--> $DIR/feature-gate-linkage.rs:12:5
|
12 | #[linkage = "extern_weak"] static foo: isize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(linkage)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-log_syntax
fn main() {
log_syntax!() //~ ERROR `log_syntax!` is not stable enough
}

View File

@ -0,0 +1,10 @@
error: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598)
--> $DIR/feature-gate-log_syntax.rs:12:5
|
12 | log_syntax!() //~ ERROR `log_syntax!` is not stable enough
| ^^^^^^^^^^^^^
|
= help: add #![feature(log_syntax)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -0,0 +1,10 @@
error: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598)
--> $DIR/feature-gate-log_syntax2.rs:14:20
|
14 | println!("{}", log_syntax!()); //~ ERROR `log_syntax!` is not stable
| ^^^^^^^^^^^^^
|
= help: add #![feature(log_syntax)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-naked_functions
#[naked]
//~^ the `#[naked]` attribute is an experimental feature
fn naked() {}

View File

@ -0,0 +1,18 @@
error: the `#[naked]` attribute is an experimental feature (see issue #32408)
--> $DIR/feature-gate-naked_functions.rs:11:1
|
11 | #[naked]
| ^^^^^^^^
|
= help: add #![feature(naked_functions)] to the crate attributes to enable
error: the `#[naked]` attribute is an experimental feature (see issue #32408)
--> $DIR/feature-gate-naked_functions.rs:15:1
|
15 | #[naked]
| ^^^^^^^^
|
= help: add #![feature(naked_functions)] to the crate attributes to enable
error: aborting due to 2 previous errors

View File

@ -10,8 +10,6 @@
// Test that ! errors when used in illegal positions with feature(never_type) disabled
// gate-test-never_type
trait Foo {
type Wub;
}

View File

@ -0,0 +1,42 @@
error: The `!` type is experimental (see issue #35121)
--> $DIR/feature-gate-never_type.rs:17:17
|
17 | type Ma = (u32, !, i32); //~ ERROR type is experimental
| ^
|
= help: add #![feature(never_type)] to the crate attributes to enable
error: The `!` type is experimental (see issue #35121)
--> $DIR/feature-gate-never_type.rs:18:20
|
18 | type Meeshka = Vec<!>; //~ ERROR type is experimental
| ^
|
= help: add #![feature(never_type)] to the crate attributes to enable
error: The `!` type is experimental (see issue #35121)
--> $DIR/feature-gate-never_type.rs:19:16
|
19 | type Mow = &fn(!) -> !; //~ ERROR type is experimental
| ^
|
= help: add #![feature(never_type)] to the crate attributes to enable
error: The `!` type is experimental (see issue #35121)
--> $DIR/feature-gate-never_type.rs:20:19
|
20 | type Skwoz = &mut !; //~ ERROR type is experimental
| ^
|
= help: add #![feature(never_type)] to the crate attributes to enable
error: The `!` type is experimental (see issue #35121)
--> $DIR/feature-gate-never_type.rs:23:16
|
23 | type Wub = !; //~ ERROR type is experimental
| ^
|
= help: add #![feature(never_type)] to the crate attributes to enable
error: aborting due to 5 previous errors

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-no_core
#![no_core] //~ ERROR no_core is experimental
fn main() {}

View File

@ -0,0 +1,10 @@
error: no_core is experimental (see issue #29639)
--> $DIR/feature-gate-no_core.rs:11:1
|
11 | #![no_core] //~ ERROR no_core is experimental
| ^^^^^^^^^^^
|
= help: add #![feature(no_core)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-non_ascii_idents
extern crate core as bäz; //~ ERROR non-ascii idents
use föö::bar; //~ ERROR non-ascii idents

View File

@ -0,0 +1,122 @@
error: non-ascii idents are not fully supported. (see issue #28979)
--> $DIR/feature-gate-non_ascii_idents.rs:11:1
|
11 | extern crate core as bäz; //~ ERROR non-ascii idents
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
error: non-ascii idents are not fully supported. (see issue #28979)
--> $DIR/feature-gate-non_ascii_idents.rs:13:5
|
13 | use föö::bar; //~ ERROR non-ascii idents
| ^^^^^^^^
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
error: non-ascii idents are not fully supported. (see issue #28979)
--> $DIR/feature-gate-non_ascii_idents.rs:15:1
|
15 | / mod föö { //~ ERROR non-ascii idents
16 | | pub fn bar() {}
17 | | }
| |_^
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
error: non-ascii idents are not fully supported. (see issue #28979)
--> $DIR/feature-gate-non_ascii_idents.rs:19:1
|
19 | / fn bär( //~ ERROR non-ascii idents
20 | | bäz: isize //~ ERROR non-ascii idents
21 | | ) {
22 | | let _ö: isize; //~ ERROR non-ascii idents
... |
26 | | }
27 | | }
| |_^
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
error: non-ascii idents are not fully supported. (see issue #28979)
--> $DIR/feature-gate-non_ascii_idents.rs:20:5
|
20 | bäz: isize //~ ERROR non-ascii idents
| ^^^
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
error: non-ascii idents are not fully supported. (see issue #28979)
--> $DIR/feature-gate-non_ascii_idents.rs:22:9
|
22 | let _ö: isize; //~ ERROR non-ascii idents
| ^^
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
error: non-ascii idents are not fully supported. (see issue #28979)
--> $DIR/feature-gate-non_ascii_idents.rs:25:10
|
25 | (_ä, _) => {} //~ ERROR non-ascii idents
| ^^
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
error: non-ascii idents are not fully supported. (see issue #28979)
--> $DIR/feature-gate-non_ascii_idents.rs:29:1
|
29 | / struct Föö { //~ ERROR non-ascii idents
30 | | föö: isize //~ ERROR non-ascii idents
31 | | }
| |_^
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
error: non-ascii idents are not fully supported. (see issue #28979)
--> $DIR/feature-gate-non_ascii_idents.rs:30:5
|
30 | föö: isize //~ ERROR non-ascii idents
| ^^^^^^^^^^
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
error: non-ascii idents are not fully supported. (see issue #28979)
--> $DIR/feature-gate-non_ascii_idents.rs:33:1
|
33 | / enum Bär { //~ ERROR non-ascii idents
34 | | Bäz { //~ ERROR non-ascii idents
35 | | qüx: isize //~ ERROR non-ascii idents
36 | | }
37 | | }
| |_^
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
error: non-ascii idents are not fully supported. (see issue #28979)
--> $DIR/feature-gate-non_ascii_idents.rs:34:5
|
34 | / Bäz { //~ ERROR non-ascii idents
35 | | qüx: isize //~ ERROR non-ascii idents
36 | | }
| |_____^
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
error: non-ascii idents are not fully supported. (see issue #28979)
--> $DIR/feature-gate-non_ascii_idents.rs:35:9
|
35 | qüx: isize //~ ERROR non-ascii idents
| ^^^^^^^^^^
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
error: non-ascii idents are not fully supported. (see issue #28979)
--> $DIR/feature-gate-non_ascii_idents.rs:40:5
|
40 | fn qüx(); //~ ERROR non-ascii idents
| ^^^^^^^^^
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
error: aborting due to 13 previous errors

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-plugin_registrar
// Test that `#[plugin_registrar]` attribute is gated by `plugin_registrar`
// feature gate.

View File

@ -0,0 +1,10 @@
error: compiler plugins are experimental and possibly buggy (see issue #29597)
--> $DIR/feature-gate-plugin_registrar.rs:16:1
|
16 | pub fn registrar() {}
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(plugin_registrar)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-target_feature
#[target_feature = "+sse2"]
//~^ the `#[target_feature]` attribute is an experimental feature
fn foo() {}

View File

@ -0,0 +1,10 @@
error: the `#[target_feature]` attribute is an experimental feature
--> $DIR/feature-gate-target_feature.rs:11:1
|
11 | #[target_feature = "+sse2"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(target_feature)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-thread_local
// Test that `#[thread_local]` attribute is gated by `thread_local`
// feature gate.
//

View File

@ -0,0 +1,10 @@
error: `#[thread_local]` is an experimental feature, and does not currently handle destructors. There is no corresponding `#[task_local]` mapping to the task model (see issue #29594)
--> $DIR/feature-gate-thread_local.rs:18:1
|
18 | #[thread_local] //~ ERROR `#[thread_local]` is an experimental feature
| ^^^^^^^^^^^^^^^
|
= help: add #![feature(thread_local)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-trace_macros
fn main() {
trace_macros!(true); //~ ERROR: `trace_macros` is not stable
}

View File

@ -0,0 +1,10 @@
error: `trace_macros` is not stable enough for use and is subject to change (see issue #29598)
--> $DIR/feature-gate-trace_macros.rs:12:5
|
12 | trace_macros!(true); //~ ERROR: `trace_macros` is not stable
| ^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(trace_macros)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-type_ascription
// Type ascription is feature gated
fn main() {

View File

@ -0,0 +1,10 @@
error: type ascription is experimental (see issue #23416)
--> $DIR/feature-gate-type_ascription.rs:14:13
|
14 | let a = 10: u8; //~ ERROR type ascription is experimental
| ^^^^^^
|
= help: add #![feature(type_ascription)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-untagged_unions
union U1 { // OK
a: u8,
}

View File

@ -0,0 +1,32 @@
error: unions with non-`Copy` fields are unstable (see issue #32836)
--> $DIR/feature-gate-untagged_unions.rs:19:1
|
19 | / union U3 { //~ ERROR unions with non-`Copy` fields are unstable
20 | | a: String,
21 | | }
| |_^
|
= help: add #![feature(untagged_unions)] to the crate attributes to enable
error: unions with non-`Copy` fields are unstable (see issue #32836)
--> $DIR/feature-gate-untagged_unions.rs:23:1
|
23 | / union U4<T> { //~ ERROR unions with non-`Copy` fields are unstable
24 | | a: T,
25 | | }
| |_^
|
= help: add #![feature(untagged_unions)] to the crate attributes to enable
error: unions with `Drop` implementations are unstable (see issue #32836)
--> $DIR/feature-gate-untagged_unions.rs:27:1
|
27 | / union U5 { //~ ERROR unions with `Drop` implementations are unstable
28 | | a: u8,
29 | | }
| |_^
|
= help: add #![feature(untagged_unions)] to the crate attributes to enable
error: aborting due to 3 previous errors

View File

@ -0,0 +1,10 @@
error: specialization is unstable (see issue #31844)
--> $DIR/specialization-feature-gate-default.rs:20:5
|
20 | default fn foo(&self) {} //~ ERROR specialization is unstable
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(specialization)] to the crate attributes to enable
error: aborting due to previous error

View File

@ -0,0 +1,15 @@
error[E0119]: conflicting implementations of trait `Foo` for type `u8`:
--> $DIR/specialization-feature-gate-overlap.rs:23:1
|
19 | / impl<T> Foo for T {
20 | | fn foo(&self) {}
21 | | }
| |_- first implementation here
22 |
23 | / impl Foo for u8 { //~ ERROR E0119
24 | | fn foo(&self) {}
25 | | }
| |_^ conflicting implementation for `u8`
error: aborting due to previous error