File tree Expand file tree Collapse file tree 7 files changed +29
-7
lines changed Expand file tree Collapse file tree 7 files changed +29
-7
lines changed Original file line number Diff line number Diff line change @@ -563,6 +563,7 @@ declare_features! (
563563// unanticipated results, such as compiler crashes. We warn the user about these
564564// to alert them.
565565const INCOMPLETE_FEATURES : & [ Symbol ] = & [
566+ sym:: impl_trait_in_bindings,
566567 sym:: generic_associated_types,
567568 sym:: const_generics
568569] ;
Original file line number Diff line number Diff line change 11#![ feature( impl_trait_in_bindings) ]
2+ //~^ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
23
34use std:: fmt:: Debug ;
45
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 11#![ feature( impl_trait_in_bindings) ]
2+ //~^ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
23
34const FOO : impl Copy = 42 ;
45
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+
17error[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
39 |
410LL | let _ = FOO.count_ones();
511 | ^^^^^^^^^^
612
713error[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
915 |
1016LL | let _ = BAR.count_ones();
1117 | ^^^^^^^^^^
1218
1319error[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
1521 |
1622LL | let _ = foo.count_ones();
1723 | ^^^^^^^^^^
Original file line number Diff line number Diff line change 11#![ feature( impl_trait_in_bindings) ]
2+ //~^ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
23
34fn a < T : Clone > ( x : T ) {
45 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+
17error[E0435]: attempt to use a non-constant value in a constant
2- --> $DIR/bindings.rs:4 :29
8+ --> $DIR/bindings.rs:5 :29
39 |
410LL | const foo: impl Clone = x;
511 | ^ non-constant value
612
713error[E0435]: attempt to use a non-constant value in a constant
8- --> $DIR/bindings.rs:10 :33
14+ --> $DIR/bindings.rs:11 :33
915 |
1016LL | const foo: impl Clone = x;
1117 | ^ non-constant value
1218
1319error[E0435]: attempt to use a non-constant value in a constant
14- --> $DIR/bindings.rs:17 :33
20+ --> $DIR/bindings.rs:18 :33
1521 |
1622LL | const foo: impl Clone = x;
1723 | ^ non-constant value
1824
1925error[E0435]: attempt to use a non-constant value in a constant
20- --> $DIR/bindings.rs:24 :33
26+ --> $DIR/bindings.rs:25 :33
2127 |
2228LL | const foo: impl Clone = x;
2329 | ^ non-constant value
You can’t perform that action at this time.
0 commit comments