fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0033]: type `&dyn T` cannot be dereferenced 2 --> $DIR/destructure-trait-ref.rs:26:9 3 | 4LL | let &x = &1isize as &dyn T; 5 | ^^ type `&dyn T` cannot be dereferenced 6 7error[E0033]: type `&dyn T` cannot be dereferenced 8 --> $DIR/destructure-trait-ref.rs:27:10 9 | 10LL | let &&x = &(&1isize as &dyn T); 11 | ^^ type `&dyn T` cannot be dereferenced 12 13error[E0033]: type `Box<dyn T>` cannot be dereferenced 14 --> $DIR/destructure-trait-ref.rs:28:9 15 | 16LL | let box x = Box::new(1isize) as Box<dyn T>; 17 | ^^^^^ type `Box<dyn T>` cannot be dereferenced 18 19error[E0308]: mismatched types 20 --> $DIR/destructure-trait-ref.rs:32:10 21 | 22LL | let &&x = &1isize as &dyn T; 23 | ^^ ----------------- this expression has type `&dyn T` 24 | | 25 | expected `dyn T`, found `&_` 26 | 27 = note: expected trait object `dyn T` 28 found reference `&_` 29help: consider removing `&` from the pattern 30 | 31LL - let &&x = &1isize as &dyn T; 32LL + let &x = &1isize as &dyn T; 33 | 34 35error[E0308]: mismatched types 36 --> $DIR/destructure-trait-ref.rs:36:11 37 | 38LL | let &&&x = &(&1isize as &dyn T); 39 | ^^ -------------------- this expression has type `&&dyn T` 40 | | 41 | expected `dyn T`, found `&_` 42 | 43 = note: expected trait object `dyn T` 44 found reference `&_` 45help: consider removing `&` from the pattern 46 | 47LL - let &&&x = &(&1isize as &dyn T); 48LL + let &&x = &(&1isize as &dyn T); 49 | 50 51error[E0308]: mismatched types 52 --> $DIR/destructure-trait-ref.rs:40:13 53 | 54LL | let box box x = Box::new(1isize) as Box<dyn T>; 55 | ^^^^^ ------------------------------ this expression has type `Box<dyn T>` 56 | | 57 | expected `dyn T`, found `Box<_>` 58 | 59 = note: expected trait object `dyn T` 60 found struct `Box<_>` 61 62error: aborting due to 6 previous errors 63 64Some errors have detailed explanations: E0033, E0308. 65For more information about an error, try `rustc --explain E0033`.