1
+ error[E0658]: const trait impls are experimental
2
+ --> $DIR/staged-api-user-crate.rs:24:6
3
+ |
4
+ LL | impl const MyTrait for S2 {
5
+ | ^^^^^
6
+ |
7
+ = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
8
+ = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
9
+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10
+
11
+ error[E0658]: const trait impls are experimental
12
+ --> $DIR/staged-api-user-crate.rs:31:20
13
+ |
14
+ LL | const fn bound2<T: ~const MyTrait>() {}
15
+ | ^^^^^^
16
+ |
17
+ = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
18
+ = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
19
+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
20
+
21
+ error[E0658]: const trait impls are experimental
22
+ --> $DIR/staged-api-user-crate.rs:35:14
23
+ |
24
+ LL | fn bound3<T: const MyTrait>() {}
25
+ | ^^^^^
26
+ |
27
+ = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
28
+ = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
29
+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
30
+
31
+ error: `staged_api::MyTrait` is not yet stable as a const trait
32
+ --> $DIR/staged-api-user-crate.rs:24:12
33
+ |
34
+ LL | impl const MyTrait for S2 {
35
+ | ^^^^^^^
36
+ |
37
+ = help: add `#![feature(unstable)]` to the crate attributes to enable
38
+
39
+ error: `staged_api::MyTrait` is not yet stable as a const trait
40
+ --> $DIR/staged-api-user-crate.rs:31:20
41
+ |
42
+ LL | const fn bound2<T: ~const MyTrait>() {}
43
+ | ^^^^^^
44
+ |
45
+ = help: add `#![feature(unstable)]` to the crate attributes to enable
46
+
47
+ error: `staged_api::MyTrait` is not yet stable as a const trait
48
+ --> $DIR/staged-api-user-crate.rs:31:20
49
+ |
50
+ LL | const fn bound2<T: ~const MyTrait>() {}
51
+ | ^^^^^^
52
+ |
53
+ = help: add `#![feature(unstable)]` to the crate attributes to enable
54
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
55
+
56
+ error: `staged_api::MyTrait` is not yet stable as a const trait
57
+ --> $DIR/staged-api-user-crate.rs:35:14
58
+ |
59
+ LL | fn bound3<T: const MyTrait>() {}
60
+ | ^^^^^
61
+ |
62
+ = help: add `#![feature(unstable)]` to the crate attributes to enable
63
+
1
64
error[E0658]: cannot call conditionally-const associated function `<staged_api::Unstable as staged_api::MyTrait>::func` in constant functions
2
65
--> $DIR/staged-api-user-crate.rs:12:5
3
66
|
@@ -8,6 +71,14 @@ LL | Unstable::func();
8
71
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
9
72
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10
73
11
- error: aborting due to 1 previous error
74
+ error: `staged_api::MyTrait` is not yet stable as a const trait
75
+ --> $DIR/staged-api-user-crate.rs:12:5
76
+ |
77
+ LL | Unstable::func();
78
+ | ^^^^^^^^^^^^^^^^
79
+ |
80
+ = help: add `#![feature(unstable)]` to the crate attributes to enable
81
+
82
+ error: aborting due to 9 previous errors
12
83
13
84
For more information about this error, try `rustc --explain E0658`.
0 commit comments