1
1
error[E0033]: type `&dyn T` cannot be dereferenced
2
- --> $DIR/destructure- trait-ref .rs:28 :9
2
+ --> $DIR/trait-object-destructure .rs:21 :9
3
3
|
4
4
LL | let &x = &1isize as &dyn T;
5
5
| ^^ type `&dyn T` cannot be dereferenced
6
6
7
7
error[E0033]: type `&dyn T` cannot be dereferenced
8
- --> $DIR/destructure- trait-ref .rs:29 :10
8
+ --> $DIR/trait-object-destructure .rs:22 :10
9
9
|
10
10
LL | let &&x = &(&1isize as &dyn T);
11
11
| ^^ type `&dyn T` cannot be dereferenced
12
12
13
13
error[E0033]: type `Box<dyn T>` cannot be dereferenced
14
- --> $DIR/destructure- trait-ref .rs:30 :9
14
+ --> $DIR/trait-object-destructure .rs:23 :9
15
15
|
16
16
LL | let box x = Box::new(1isize) as Box<dyn T>;
17
17
| ^^^^^ type `Box<dyn T>` cannot be dereferenced
18
18
19
19
error[E0308]: mismatched types
20
- --> $DIR/destructure- trait-ref .rs:34 :10
20
+ --> $DIR/trait-object-destructure .rs:26 :10
21
21
|
22
22
LL | let &&x = &1isize as &dyn T;
23
23
| ^^ ----------------- this expression has type `&dyn T`
@@ -33,7 +33,7 @@ LL + let &x = &1isize as &dyn T;
33
33
|
34
34
35
35
error[E0308]: mismatched types
36
- --> $DIR/destructure- trait-ref .rs:38 :11
36
+ --> $DIR/trait-object-destructure .rs:27 :11
37
37
|
38
38
LL | let &&&x = &(&1isize as &dyn T);
39
39
| ^^ -------------------- this expression has type `&&dyn T`
@@ -49,7 +49,7 @@ LL + let &&x = &(&1isize as &dyn T);
49
49
|
50
50
51
51
error[E0308]: mismatched types
52
- --> $DIR/destructure- trait-ref .rs:42 :13
52
+ --> $DIR/trait-object-destructure .rs:28 :13
53
53
|
54
54
LL | let box box x = Box::new(1isize) as Box<dyn T>;
55
55
| ^^^^^ ------------------------------ this expression has type `Box<dyn T>`
0 commit comments