Skip to content

Commit 7f923f3

Browse files
committed
Fix tidy
1 parent a62bfcd commit 7f923f3

3 files changed

+10
-9
lines changed

tests/ui/consts/const_refs_to_static-ice-121413.edition2015.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0433]: failed to resolve: use of undeclared type `AtomicUsize`
2-
--> $DIR/const_refs_to_static-ice-121413.rs:11:24
2+
--> $DIR/const_refs_to_static-ice-121413.rs:12:24
33
|
44
LL | static FOO: Sync = AtomicUsize::new(0);
55
| ^^^^^^^^^^^ use of undeclared type `AtomicUsize`
@@ -10,7 +10,7 @@ LL + use std::sync::atomic::AtomicUsize;
1010
|
1111

1212
warning: trait objects without an explicit `dyn` are deprecated
13-
--> $DIR/const_refs_to_static-ice-121413.rs:11:17
13+
--> $DIR/const_refs_to_static-ice-121413.rs:12:17
1414
|
1515
LL | static FOO: Sync = AtomicUsize::new(0);
1616
| ^^^^
@@ -24,7 +24,7 @@ LL | static FOO: Box<dyn Sync> = AtomicUsize::new(0);
2424
| +++++++ +
2525

2626
warning: trait objects without an explicit `dyn` are deprecated
27-
--> $DIR/const_refs_to_static-ice-121413.rs:11:17
27+
--> $DIR/const_refs_to_static-ice-121413.rs:12:17
2828
|
2929
LL | static FOO: Sync = AtomicUsize::new(0);
3030
| ^^^^
@@ -38,15 +38,15 @@ LL | static FOO: Box<dyn Sync> = AtomicUsize::new(0);
3838
| +++++++ +
3939

4040
error[E0277]: the size for values of type `(dyn Sync + 'static)` cannot be known at compilation time
41-
--> $DIR/const_refs_to_static-ice-121413.rs:11:17
41+
--> $DIR/const_refs_to_static-ice-121413.rs:12:17
4242
|
4343
LL | static FOO: Sync = AtomicUsize::new(0);
4444
| ^^^^ doesn't have a size known at compile-time
4545
|
4646
= help: the trait `Sized` is not implemented for `(dyn Sync + 'static)`
4747

4848
error[E0277]: the size for values of type `(dyn Sync + 'static)` cannot be known at compilation time
49-
--> $DIR/const_refs_to_static-ice-121413.rs:11:24
49+
--> $DIR/const_refs_to_static-ice-121413.rs:12:24
5050
|
5151
LL | static FOO: Sync = AtomicUsize::new(0);
5252
| ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time

tests/ui/consts/const_refs_to_static-ice-121413.edition2021.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0433]: failed to resolve: use of undeclared type `AtomicUsize`
2-
--> $DIR/const_refs_to_static-ice-121413.rs:11:24
2+
--> $DIR/const_refs_to_static-ice-121413.rs:12:24
33
|
44
LL | static FOO: Sync = AtomicUsize::new(0);
55
| ^^^^^^^^^^^ use of undeclared type `AtomicUsize`
@@ -12,7 +12,7 @@ LL + use std::sync::atomic::AtomicUsize;
1212
|
1313

1414
error[E0782]: trait objects must include the `dyn` keyword
15-
--> $DIR/const_refs_to_static-ice-121413.rs:11:17
15+
--> $DIR/const_refs_to_static-ice-121413.rs:12:17
1616
|
1717
LL | static FOO: Sync = AtomicUsize::new(0);
1818
| ^^^^

tests/ui/consts/const_refs_to_static-ice-121413.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
// ICE: ImmTy { imm: Scalar(alloc1), ty: *const dyn Sync } input to a fat-to-thin cast (*const dyn Sync -> *const usize
2-
// or with -Zextra-const-ub-checks: expected wide pointer extra data (e.g. slice length or trait object vtable)
1+
// ICE: ImmTy { imm: Scalar(alloc1), ty: *const dyn Sync } input to a fat-to-thin cast (*const dyn
2+
// Sync -> *const usize or with -Zextra-const-ub-checks: expected wide pointer extra data (e.g.
3+
// slice length or trait object vtable)
34
// issue: rust-lang/rust#121413
45
//@ compile-flags: -Zextra-const-ub-checks
56
//@ revisions: edition2015 edition2021

0 commit comments

Comments
 (0)