Skip to content

Commit 91d0823

Browse files
committed
Update test output for const fmt::Arguments constructor.
1 parent f827d3e commit 91d0823

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/test/ui/borrowck/issue-64453.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ struct Value;
33

44
static settings_dir: String = format!("");
55
//~^ ERROR calls in statics are limited to constant functions
6-
//~| ERROR calls in statics are limited to constant functions
76

87
fn from_string(_: String) -> Value {
98
Value
+2-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
error[E0507]: cannot move out of static item `settings_dir`
2-
--> $DIR/issue-64453.rs:14:37
2+
--> $DIR/issue-64453.rs:13:37
33
|
44
LL | let settings_data = from_string(settings_dir);
55
| ^^^^^^^^^^^^ move occurs because `settings_dir` has type `String`, which does not implement the `Copy` trait
66

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-
157
error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
168
--> $DIR/issue-64453.rs:4:31
179
|
@@ -20,7 +12,7 @@ LL | static settings_dir: String = format!("");
2012
|
2113
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
2214

23-
error: aborting due to 3 previous errors
15+
error: aborting due to 2 previous errors
2416

2517
Some errors have detailed explanations: E0015, E0507.
2618
For more information about an error, try `rustc --explain E0015`.

0 commit comments

Comments
 (0)