]> git.proxmox.com Git - rustc.git/blame - tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_ty.stderr
New upstream version 1.70.0+dfsg1
[rustc.git] / tests / ui / transmutability / visibility / should_reject_if_dst_has_unreachable_ty.stderr
CommitLineData
064997fb 1error[E0603]: struct `Dst` is private
f2b60f7d 2 --> $DIR/should_reject_if_dst_has_unreachable_ty.rs:38:46
064997fb
FG
3 |
4LL | assert::is_transmutable::<src::Src, dst::Dst, Context>();
5 | ^^^ private struct
6 |
7note: the struct `Dst` is defined here
f2b60f7d 8 --> $DIR/should_reject_if_dst_has_unreachable_ty.rs:31:16
064997fb
FG
9 |
10LL | #[repr(C)] pub(self) struct Dst {
11 | ^^^^^^^^^^^^^^^^^^^^
12
353b0b11 13error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`
f2b60f7d 14 --> $DIR/should_reject_if_dst_has_unreachable_ty.rs:38:41
064997fb
FG
15 |
16LL | assert::is_transmutable::<src::Src, dst::Dst, Context>();
353b0b11 17 | ^^^^^^^^ `Dst` is or contains a type or field that is not visible in that scope
064997fb 18 |
064997fb
FG
19note: required by a bound in `is_transmutable`
20 --> $DIR/should_reject_if_dst_has_unreachable_ty.rs:15:14
21 |
22LL | pub fn is_transmutable<Src, Dst, Context>()
9ffffee4 23 | --------------- required by a bound in this function
064997fb 24LL | where
f2b60f7d
FG
25LL | Dst: BikeshedIntrinsicFrom<Src, Context> // safety is NOT assumed
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
064997fb
FG
27
28error: aborting due to 2 previous errors
29
30Some errors have detailed explanations: E0277, E0603.
31For more information about an error, try `rustc --explain E0277`.