rust/tests/ui/consts/issue-17718-references.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
897 B
Plaintext
Raw Normal View History

2020-01-10 13:31:36 +00:00
error[E0013]: constants cannot refer to statics
2019-11-19 23:16:58 +00:00
--> $DIR/issue-17718-references.rs:9:29
2018-07-15 21:11:54 +00:00
|
2019-03-09 12:03:44 +00:00
LL | const T2: &'static usize = &S;
2019-11-19 23:16:58 +00:00
| ^
2020-01-10 13:31:36 +00:00
|
= help: consider extracting the value of the `static` to a `const`, and referring to that
2018-07-15 21:11:54 +00:00
2020-01-10 13:31:36 +00:00
error[E0013]: constants cannot refer to statics
2018-12-25 15:56:47 +00:00
--> $DIR/issue-17718-references.rs:14:19
2018-07-15 21:11:54 +00:00
|
2019-03-09 12:03:44 +00:00
LL | const T6: usize = S;
2018-07-15 21:11:54 +00:00
| ^
2020-01-10 13:31:36 +00:00
|
= help: consider extracting the value of the `static` to a `const`, and referring to that
2018-07-15 21:11:54 +00:00
2020-01-10 13:31:36 +00:00
error[E0013]: constants cannot refer to statics
2018-12-25 15:56:47 +00:00
--> $DIR/issue-17718-references.rs:19:33
2018-07-15 21:11:54 +00:00
|
LL | const T10: Struct = Struct { a: S };
| ^
2020-01-10 13:31:36 +00:00
|
= help: consider extracting the value of the `static` to a `const`, and referring to that
2018-07-15 21:11:54 +00:00
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0013`.