File tree 2 files changed +2
-11
lines changed
2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ struct Value;
3
3
4
4
static settings_dir: String = format ! ( "" ) ;
5
5
//~^ ERROR calls in statics are limited to constant functions
6
- //~| ERROR calls in statics are limited to constant functions
7
6
8
7
fn from_string ( _: String ) -> Value {
9
8
Value
Original file line number Diff line number Diff line change 1
1
error[E0507]: cannot move out of static item `settings_dir`
2
- --> $DIR/issue-64453.rs:14 :37
2
+ --> $DIR/issue-64453.rs:13 :37
3
3
|
4
4
LL | let settings_data = from_string(settings_dir);
5
5
| ^^^^^^^^^^^^ move occurs because `settings_dir` has type `String`, which does not implement the `Copy` trait
6
6
7
- error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
8
- --> $DIR/issue-64453.rs:4:31
9
- |
10
- LL | static settings_dir: String = format!("");
11
- | ^^^^^^^^^^^
12
- |
13
- = note: this error originates in the macro `$crate::__export::format_args` (in Nightly builds, run with -Z macro-backtrace for more info)
14
-
15
7
error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
16
8
--> $DIR/issue-64453.rs:4:31
17
9
|
@@ -20,7 +12,7 @@ LL | static settings_dir: String = format!("");
20
12
|
21
13
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
22
14
23
- error: aborting due to 3 previous errors
15
+ error: aborting due to 2 previous errors
24
16
25
17
Some errors have detailed explanations: E0015, E0507.
26
18
For more information about an error, try `rustc --explain E0015`.
You can’t perform that action at this time.
0 commit comments