File tree 7 files changed +29
-7
lines changed
7 files changed +29
-7
lines changed Original file line number Diff line number Diff line change @@ -563,6 +563,7 @@ declare_features! (
563
563
// unanticipated results, such as compiler crashes. We warn the user about these
564
564
// to alert them.
565
565
const INCOMPLETE_FEATURES : & [ Symbol ] = & [
566
+ sym:: impl_trait_in_bindings,
566
567
sym:: generic_associated_types,
567
568
sym:: const_generics
568
569
] ;
Original file line number Diff line number Diff line change 1
1
#![ feature( impl_trait_in_bindings) ]
2
+ //~^ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
2
3
3
4
use std:: fmt:: Debug ;
4
5
Original file line number Diff line number Diff line change
1
+ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
2
+ --> $DIR/impl-trait-in-bindings.rs:1:12
3
+ |
4
+ LL | #![feature(impl_trait_in_bindings)]
5
+ | ^^^^^^^^^^^^^^^^^^^^^^
6
+
Original file line number Diff line number Diff line change 1
1
#![ feature( impl_trait_in_bindings) ]
2
+ //~^ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
2
3
3
4
const FOO : impl Copy = 42 ;
4
5
Original file line number Diff line number Diff line change
1
+ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
2
+ --> $DIR/bindings-opaque.rs:1:12
3
+ |
4
+ LL | #![feature(impl_trait_in_bindings)]
5
+ | ^^^^^^^^^^^^^^^^^^^^^^
6
+
1
7
error[E0599]: no method named `count_ones` found for type `impl std::marker::Copy` in the current scope
2
- --> $DIR/bindings-opaque.rs:10 :17
8
+ --> $DIR/bindings-opaque.rs:11 :17
3
9
|
4
10
LL | let _ = FOO.count_ones();
5
11
| ^^^^^^^^^^
6
12
7
13
error[E0599]: no method named `count_ones` found for type `impl std::marker::Copy` in the current scope
8
- --> $DIR/bindings-opaque.rs:12 :17
14
+ --> $DIR/bindings-opaque.rs:13 :17
9
15
|
10
16
LL | let _ = BAR.count_ones();
11
17
| ^^^^^^^^^^
12
18
13
19
error[E0599]: no method named `count_ones` found for type `impl std::marker::Copy` in the current scope
14
- --> $DIR/bindings-opaque.rs:14 :17
20
+ --> $DIR/bindings-opaque.rs:15 :17
15
21
|
16
22
LL | let _ = foo.count_ones();
17
23
| ^^^^^^^^^^
Original file line number Diff line number Diff line change 1
1
#![ feature( impl_trait_in_bindings) ]
2
+ //~^ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
2
3
3
4
fn a < T : Clone > ( x : T ) {
4
5
const foo: impl Clone = x;
Original file line number Diff line number Diff line change
1
+ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
2
+ --> $DIR/bindings.rs:1:12
3
+ |
4
+ LL | #![feature(impl_trait_in_bindings)]
5
+ | ^^^^^^^^^^^^^^^^^^^^^^
6
+
1
7
error[E0435]: attempt to use a non-constant value in a constant
2
- --> $DIR/bindings.rs:4 :29
8
+ --> $DIR/bindings.rs:5 :29
3
9
|
4
10
LL | const foo: impl Clone = x;
5
11
| ^ non-constant value
6
12
7
13
error[E0435]: attempt to use a non-constant value in a constant
8
- --> $DIR/bindings.rs:10 :33
14
+ --> $DIR/bindings.rs:11 :33
9
15
|
10
16
LL | const foo: impl Clone = x;
11
17
| ^ non-constant value
12
18
13
19
error[E0435]: attempt to use a non-constant value in a constant
14
- --> $DIR/bindings.rs:17 :33
20
+ --> $DIR/bindings.rs:18 :33
15
21
|
16
22
LL | const foo: impl Clone = x;
17
23
| ^ non-constant value
18
24
19
25
error[E0435]: attempt to use a non-constant value in a constant
20
- --> $DIR/bindings.rs:24 :33
26
+ --> $DIR/bindings.rs:25 :33
21
27
|
22
28
LL | const foo: impl Clone = x;
23
29
| ^ non-constant value
You can’t perform that action at this time.
0 commit comments