Skip to content

Commit 9fb09b0

Browse files
committed
tidy
1 parent 12a2489 commit 9fb09b0

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

tests/ui/consts/const-eval/generic-slice.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ impl<'a, T: 'static> Generic<'a, T> {
88
const EMPTY_SLICE: &'a [T] = {
99
let x: &'a [T] = &[];
1010
//~^ ERROR destructor of `[T; 0]` cannot be evaluated at compile-time
11-
x
11+
x
1212
};
1313

1414
const EMPTY_SLICE_REF: &'a &'static [T] = {
15-
let x: &'static [T] = &[];
15+
let x: &'static [T] = &[];
1616
//~^ ERROR destructor of `[T; 0]` cannot be evaluated at compile-time
1717
&x
1818
//~^ ERROR `x` does not live long enough
19-
2019
};
2120
}
2221

tests/ui/consts/const-eval/generic-slice.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LL | };
1010
error[E0493]: destructor of `[T; 0]` cannot be evaluated at compile-time
1111
--> $DIR/generic-slice.rs:15:32
1212
|
13-
LL | let x: &'static [T] = &[];
13+
LL | let x: &'static [T] = &[];
1414
| ^^ the destructor for this type cannot be evaluated in constants
1515
...
1616
LL | };
@@ -27,12 +27,12 @@ LL | &x
2727
| |
2828
| borrowed value does not live long enough
2929
| using this value as a constant requires that `x` is borrowed for `'a`
30-
...
30+
LL |
3131
LL | };
3232
| - `x` dropped here while still borrowed
3333

3434
error[E0493]: destructor of `[RefCell<Vec<i32>>; 0]` cannot be evaluated at compile-time
35-
--> $DIR/generic-slice.rs:24:20
35+
--> $DIR/generic-slice.rs:23:20
3636
|
3737
LL | let x: &[_] = &[];
3838
| ^^ the destructor for this type cannot be evaluated in statics
@@ -41,7 +41,7 @@ LL | };
4141
| - value is dropped here
4242

4343
error[E0493]: destructor of `[RefCell<Vec<i32>>; 0]` cannot be evaluated at compile-time
44-
--> $DIR/generic-slice.rs:30:20
44+
--> $DIR/generic-slice.rs:29:20
4545
|
4646
LL | let x: &[_] = &[];
4747
| ^^ the destructor for this type cannot be evaluated in statics
@@ -50,7 +50,7 @@ LL | };
5050
| - value is dropped here
5151

5252
error[E0597]: `x` does not live long enough
53-
--> $DIR/generic-slice.rs:32:5
53+
--> $DIR/generic-slice.rs:31:5
5454
|
5555
LL | &x
5656
| ^^

0 commit comments

Comments
 (0)