about summary refs log tree commit diff
path: root/tests/ui/transmutability/references/unsafecell.stderr
blob: 02a0935e84eae7c8e41609abcd23397fcc47d240 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
error[E0277]: `&u8` cannot be safely transmuted into `&UnsafeCell<u8>`
  --> $DIR/unsafecell.rs:27:50
   |
LL |     assert::is_maybe_transmutable::<&'static u8, &'static UnsafeCell<u8>>();
   |                                                  ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Freeze` is not implemented for `UnsafeCell<u8>`
   |
note: required by a bound in `is_maybe_transmutable`
  --> $DIR/unsafecell.rs:12:14
   |
LL |     pub fn is_maybe_transmutable<Src, Dst>()
   |            --------------------- required by a bound in this function
LL |     where
LL |         Dst: TransmuteFrom<Src, { Assume::SAFETY }>
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`

error[E0277]: `&UnsafeCell<u8>` cannot be safely transmuted into `&UnsafeCell<u8>`
  --> $DIR/unsafecell.rs:29:62
   |
LL |     assert::is_maybe_transmutable::<&'static UnsafeCell<u8>, &'static UnsafeCell<u8>>();
   |                                                              ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Freeze` is not implemented for `UnsafeCell<u8>`
   |
note: required by a bound in `is_maybe_transmutable`
  --> $DIR/unsafecell.rs:12:14
   |
LL |     pub fn is_maybe_transmutable<Src, Dst>()
   |            --------------------- required by a bound in this function
LL |     where
LL |         Dst: TransmuteFrom<Src, { Assume::SAFETY }>
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`

error[E0277]: `&mut bool` cannot be safely transmuted into `&UnsafeCell<u8>`
  --> $DIR/unsafecell.rs:45:56
   |
LL |     assert::is_maybe_transmutable::<&'static mut bool, &'static UnsafeCell<u8>>();
   |                                                        ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Freeze` is not implemented for `UnsafeCell<u8>`
   |
note: required by a bound in `is_maybe_transmutable`
  --> $DIR/unsafecell.rs:12:14
   |
LL |     pub fn is_maybe_transmutable<Src, Dst>()
   |            --------------------- required by a bound in this function
LL |     where
LL |         Dst: TransmuteFrom<Src, { Assume::SAFETY }>
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`

error[E0277]: `&mut UnsafeCell<bool>` cannot be safely transmuted into `&UnsafeCell<u8>`
  --> $DIR/unsafecell.rs:46:68
   |
LL |     assert::is_maybe_transmutable::<&'static mut UnsafeCell<bool>, &'static UnsafeCell<u8>>();
   |                                                                    ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Freeze` is not implemented for `UnsafeCell<u8>`
   |
note: required by a bound in `is_maybe_transmutable`
  --> $DIR/unsafecell.rs:12:14
   |
LL |     pub fn is_maybe_transmutable<Src, Dst>()
   |            --------------------- required by a bound in this function
LL |     where
LL |         Dst: TransmuteFrom<Src, { Assume::SAFETY }>
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0277`.