Debian Codegraph @

.cargo/vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-mutable.stderr

raw
1 error[E0308]: mismatched types
2 --> tests/ui-stable/try_transmute_ref-dst-mutable.rs:18:33
3 |
4 18 | let _: Result<&mut u8, _> = try_transmute_ref!(&0u8);
5 | ^^^^^^^^^^^^^^^^^^^^^^^^
6 | |
7 | types differ in mutability
8 | arguments to this enum variant are incorrect
9 |
10 = note: expected mutable reference `&mut u8`
11 found reference `&_`
12 help: the type constructed contains `&_` due to the type of the argument passed
13 --> tests/ui-stable/try_transmute_ref-dst-mutable.rs:18:33
14 |
15 18 | let _: Result<&mut u8, _> = try_transmute_ref!(&0u8);
16 | ^^^^^^^^^^^^^^^^^^^^^^^^ this argument influences the type of `Ok`
17 note: tuple variant defined here
18 --> $RUST/core/src/result.rs
19 |
20 | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
21 | ^^
22 = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
23
24 error[E0308]: mismatched types
25 --> tests/ui-stable/try_transmute_ref-dst-mutable.rs:18:33
26 |
27 18 | let _: Result<&mut u8, _> = try_transmute_ref!(&0u8);
28 | ^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability
29 |
30 = note: expected enum `Result<&mut u8, _>`
31 found enum `Result<&_, ValidityError<&u8, _>>`
32 = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)