]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-25901.stderr
Rollup merge of #93613 - crlf0710:rename_to_async_iter, r=yaahc
[rust.git] / src / test / ui / issues / issue-25901.stderr
1 error[E0015]: cannot perform deref coercion on `A` in statics
2   --> $DIR/issue-25901.rs:4:24
3    |
4 LL | static S: &'static B = &A;
5    |                        ^^
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
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0015`.