| error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants |
| --> $DIR/issue-16538.rs:13:27 |
| | |
| LL | static foo: *const Y::X = Y::foo(Y::x as *const Y::X); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| |
| error[E0277]: `*const usize` cannot be shared between threads safely |
| --> $DIR/issue-16538.rs:13:1 |
| | |
| LL | static foo: *const Y::X = Y::foo(Y::x as *const Y::X); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const usize` cannot be shared between threads safely |
| | |
| = help: the trait `std::marker::Sync` is not implemented for `*const usize` |
| = note: shared static variables must have a type that implements `Sync` |
| |
| error: aborting due to 2 previous errors |
| |
| Some errors occurred: E0015, E0277. |
| For more information about an error, try `rustc --explain E0015`. |