Skip to content

Commit a0c614d

Browse files
committed
fix tests for diag change
1 parent 66b0c23 commit a0c614d

10 files changed

+18
-18
lines changed

tests/ui/borrowck/issue-64453.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LL | static settings_dir: String = format!("");
1414
| ^^^^^^^^^^^
1515
|
1616
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
17-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
17+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
1818
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
1919

2020
error[E0507]: cannot move out of static item `settings_dir`

tests/ui/check-static-values-constraints.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
2626
| ^^^^^^^^^^^^^
2727
|
2828
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
29-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
29+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
3030
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
3131

3232
error[E0015]: cannot call non-const fn `<str as ToString>::to_string` in statics
@@ -37,7 +37,7 @@ LL | field2: SafeEnum::Variant4("str".to_string()),
3737
|
3838
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
3939
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
40-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
40+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
4141

4242
error[E0010]: allocations are not allowed in statics
4343
--> $DIR/check-static-values-constraints.rs:96:5
@@ -54,7 +54,7 @@ LL | vec![MyOwned],
5454
| ^^^^^^^^^^^^^
5555
|
5656
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
57-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
57+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
5858
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
5959

6060
error[E0010]: allocations are not allowed in statics
@@ -72,7 +72,7 @@ LL | vec![MyOwned],
7272
| ^^^^^^^^^^^^^
7373
|
7474
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
75-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
75+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
7676
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
7777

7878
error[E0010]: allocations are not allowed in statics
@@ -90,7 +90,7 @@ LL | &vec![MyOwned],
9090
| ^^^^^^^^^^^^^
9191
|
9292
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
93-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
93+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
9494
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
9595

9696
error[E0010]: allocations are not allowed in statics
@@ -108,7 +108,7 @@ LL | &vec![MyOwned],
108108
| ^^^^^^^^^^^^^
109109
|
110110
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
111-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
111+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
112112
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
113113

114114
error[E0010]: allocations are not allowed in statics
@@ -126,7 +126,7 @@ LL | static STATIC19: Vec<isize> = vec![3];
126126
| ^^^^^^^
127127
|
128128
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
129-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
129+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
130130
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
131131

132132
error[E0010]: allocations are not allowed in statics
@@ -144,7 +144,7 @@ LL | static x: Vec<isize> = vec![3];
144144
| ^^^^^^^
145145
|
146146
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
147-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
147+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
148148
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
149149

150150
error[E0507]: cannot move out of static item `x`

tests/ui/consts/issue-16538.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
8-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
8+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
99

1010
error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
1111
--> $DIR/issue-16538.rs:11:22

tests/ui/consts/issue-32829-2.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LL | invalid();
1313
| ^^^^^^^^^
1414
|
1515
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
16-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
16+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
1717

1818
error[E0015]: cannot call non-const fn `invalid` in statics
1919
--> $DIR/issue-32829-2.rs:54:9
@@ -22,7 +22,7 @@ LL | invalid();
2222
| ^^^^^^^^^
2323
|
2424
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
25-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
25+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
2626

2727
error: aborting due to 3 previous errors
2828

tests/ui/consts/mir_check_nonconst.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | static foo: Foo = bar();
55
| ^^^^^
66
|
77
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
8-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
8+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
99

1010
error: aborting due to 1 previous error
1111

tests/ui/issues/issue-25901.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ LL | impl Deref for A {
1717
| ^^^^^^^^^^^^^^^^
1818
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
1919
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
20-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
20+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
2121

2222
error: aborting due to 1 previous error
2323

tests/ui/issues/issue-7364.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ LL | static boxed: Box<RefCell<isize>> = Box::new(RefCell::new(0));
1818
| ^^^^^^^^^^^^^^^^^^^^^^^^^
1919
|
2020
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
21-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
21+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
2222

2323
error: aborting due to 2 previous errors
2424

tests/ui/parser/issues/issue-35813-postfix-after-cast.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ LL | static bar: &[i32] = &(&[1,2,3] as &[i32][0..1]);
353353
|
354354
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
355355
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
356-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
356+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
357357

358358
error: aborting due to 40 previous errors
359359

tests/ui/static/static-mut-not-constant.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | static mut a: Box<isize> = Box::new(3);
55
| ^^^^^^^^^^^
66
|
77
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
8-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
8+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
99

1010
error: aborting due to 1 previous error
1111

tests/ui/static/static-vec-repeat-not-constant.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | static a: [isize; 2] = [foo(); 2];
55
| ^^^^^
66
|
77
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
8-
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
8+
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
99

1010
error: aborting due to 1 previous error
1111

0 commit comments

Comments
 (0)