about summary refs log tree commit diff
path: root/tests/ui/layout/transmute-to-tail-with-err.stderr
blob: cff408127179f28a38cc68ad9dd6882bcb406ccc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
error[E0412]: cannot find type `T` in this scope
  --> $DIR/transmute-to-tail-with-err.rs:3:26
   |
LL | struct Bar(Box<dyn Trait<T>>);
   |                          ^ not found in this scope
   |
help: you might be missing a type parameter
   |
LL | struct Bar<T>(Box<dyn Trait<T>>);
   |           +++

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-to-tail-with-err.rs:7:27
   |
LL |     let x: Bar = unsafe { std::mem::transmute(()) };
   |                           ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `()` (0 bits)
   = note: target type: `Bar` (the type has an unknown layout)

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0412, E0512.
For more information about an error, try `rustc --explain E0412`.