]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-16538.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-16538.stderr
1 error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
2   --> $DIR/issue-16538.rs:23:27
3    |
4 LL | static foo: *const Y::X = Y::foo(Y::x as *const Y::X);
5    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
7 error[E0277]: `*const usize` cannot be shared between threads safely
8   --> $DIR/issue-16538.rs:23:1
9    |
10 LL | static foo: *const Y::X = Y::foo(Y::x as *const Y::X);
11    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const usize` cannot be shared between threads safely
12    |
13    = help: the trait `std::marker::Sync` is not implemented for `*const usize`
14    = note: shared static variables must have a type that implements `Sync`
15
16 error: aborting due to 2 previous errors
17
18 Some errors occurred: E0015, E0277.
19 For more information about an error, try `rustc --explain E0015`.