You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0015]: cannot perform deref coercion on `A` in statics
1
+
error[E0658]: cannot call conditionally-const method `<A as Deref>::deref` in statics
2
2
--> $DIR/issue-25901.rs:4:24
3
3
|
4
4
LL | static S: &'static B = &A;
5
5
| ^^
6
6
|
7
-
= note: attempting to deref into `B`
8
-
note: deref defined here
9
-
--> $DIR/issue-25901.rs:10:5
10
-
|
11
-
LL | type Target = B;
12
-
| ^^^^^^^^^^^
13
-
note: impl defined here, but it is not `const`
14
-
--> $DIR/issue-25901.rs:9:1
15
-
|
16
-
LL | impl Deref for A {
17
-
| ^^^^^^^^^^^^^^^^
18
-
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
19
-
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
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
20
10
21
11
error: aborting due to 1 previous error
22
12
23
-
For more information about this error, try `rustc --explain E0015`.
13
+
For more information about this error, try `rustc --explain E0658`.
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
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
8
10
9
11
error[E0493]: destructor of `R` cannot be evaluated at compile-time
0 commit comments