]> git.proxmox.com Git - rustc.git/blob - src/test/ui/transmutability/arrays/should_require_well_defined_layout.stderr
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / transmutability / arrays / should_require_well_defined_layout.stderr
1 error[E0277]: `[String; 0]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`.
2 --> $DIR/should_require_well_defined_layout.rs:26:52
3 |
4 LL | assert::is_maybe_transmutable::<repr_rust, ()>();
5 | ^^ `[String; 0]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`.
6 |
7 = help: the trait `BikeshedIntrinsicFrom<[String; 0], assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()`
8 note: required by a bound in `is_maybe_transmutable`
9 --> $DIR/should_require_well_defined_layout.rs:13:14
10 |
11 LL | pub fn is_maybe_transmutable<Src, Dst>()
12 | --------------------- required by a bound in this
13 LL | where
14 LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
15 | ______________^
16 LL | | Assume::ALIGNMENT
17 LL | | .and(Assume::LIFETIMES)
18 LL | | .and(Assume::SAFETY)
19 LL | | .and(Assume::VALIDITY)
20 LL | | }>
21 | |__________^ required by this bound in `is_maybe_transmutable`
22
23 error[E0277]: `u128` cannot be safely transmuted into `[String; 0]` in the defining scope of `assert::Context`.
24 --> $DIR/should_require_well_defined_layout.rs:27:47
25 |
26 LL | assert::is_maybe_transmutable::<u128, repr_rust>();
27 | ^^^^^^^^^ `u128` cannot be safely transmuted into `[String; 0]` in the defining scope of `assert::Context`.
28 |
29 = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `[String; 0]`
30 note: required by a bound in `is_maybe_transmutable`
31 --> $DIR/should_require_well_defined_layout.rs:13:14
32 |
33 LL | pub fn is_maybe_transmutable<Src, Dst>()
34 | --------------------- required by a bound in this
35 LL | where
36 LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
37 | ______________^
38 LL | | Assume::ALIGNMENT
39 LL | | .and(Assume::LIFETIMES)
40 LL | | .and(Assume::SAFETY)
41 LL | | .and(Assume::VALIDITY)
42 LL | | }>
43 | |__________^ required by this bound in `is_maybe_transmutable`
44
45 error[E0277]: `[String; 1]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`.
46 --> $DIR/should_require_well_defined_layout.rs:32:52
47 |
48 LL | assert::is_maybe_transmutable::<repr_rust, ()>();
49 | ^^ `[String; 1]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`.
50 |
51 = help: the trait `BikeshedIntrinsicFrom<[String; 1], assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()`
52 note: required by a bound in `is_maybe_transmutable`
53 --> $DIR/should_require_well_defined_layout.rs:13:14
54 |
55 LL | pub fn is_maybe_transmutable<Src, Dst>()
56 | --------------------- required by a bound in this
57 LL | where
58 LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
59 | ______________^
60 LL | | Assume::ALIGNMENT
61 LL | | .and(Assume::LIFETIMES)
62 LL | | .and(Assume::SAFETY)
63 LL | | .and(Assume::VALIDITY)
64 LL | | }>
65 | |__________^ required by this bound in `is_maybe_transmutable`
66
67 error[E0277]: `u128` cannot be safely transmuted into `[String; 1]` in the defining scope of `assert::Context`.
68 --> $DIR/should_require_well_defined_layout.rs:33:47
69 |
70 LL | assert::is_maybe_transmutable::<u128, repr_rust>();
71 | ^^^^^^^^^ `u128` cannot be safely transmuted into `[String; 1]` in the defining scope of `assert::Context`.
72 |
73 = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `[String; 1]`
74 note: required by a bound in `is_maybe_transmutable`
75 --> $DIR/should_require_well_defined_layout.rs:13:14
76 |
77 LL | pub fn is_maybe_transmutable<Src, Dst>()
78 | --------------------- required by a bound in this
79 LL | where
80 LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
81 | ______________^
82 LL | | Assume::ALIGNMENT
83 LL | | .and(Assume::LIFETIMES)
84 LL | | .and(Assume::SAFETY)
85 LL | | .and(Assume::VALIDITY)
86 LL | | }>
87 | |__________^ required by this bound in `is_maybe_transmutable`
88
89 error[E0277]: `[String; 2]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`.
90 --> $DIR/should_require_well_defined_layout.rs:38:52
91 |
92 LL | assert::is_maybe_transmutable::<repr_rust, ()>();
93 | ^^ `[String; 2]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`.
94 |
95 = help: the trait `BikeshedIntrinsicFrom<[String; 2], assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()`
96 note: required by a bound in `is_maybe_transmutable`
97 --> $DIR/should_require_well_defined_layout.rs:13:14
98 |
99 LL | pub fn is_maybe_transmutable<Src, Dst>()
100 | --------------------- required by a bound in this
101 LL | where
102 LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
103 | ______________^
104 LL | | Assume::ALIGNMENT
105 LL | | .and(Assume::LIFETIMES)
106 LL | | .and(Assume::SAFETY)
107 LL | | .and(Assume::VALIDITY)
108 LL | | }>
109 | |__________^ required by this bound in `is_maybe_transmutable`
110
111 error[E0277]: `u128` cannot be safely transmuted into `[String; 2]` in the defining scope of `assert::Context`.
112 --> $DIR/should_require_well_defined_layout.rs:39:47
113 |
114 LL | assert::is_maybe_transmutable::<u128, repr_rust>();
115 | ^^^^^^^^^ `u128` cannot be safely transmuted into `[String; 2]` in the defining scope of `assert::Context`.
116 |
117 = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `[String; 2]`
118 note: required by a bound in `is_maybe_transmutable`
119 --> $DIR/should_require_well_defined_layout.rs:13:14
120 |
121 LL | pub fn is_maybe_transmutable<Src, Dst>()
122 | --------------------- required by a bound in this
123 LL | where
124 LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
125 | ______________^
126 LL | | Assume::ALIGNMENT
127 LL | | .and(Assume::LIFETIMES)
128 LL | | .and(Assume::SAFETY)
129 LL | | .and(Assume::VALIDITY)
130 LL | | }>
131 | |__________^ required by this bound in `is_maybe_transmutable`
132
133 error: aborting due to 6 previous errors
134
135 For more information about this error, try `rustc --explain E0277`.