• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0308]: mismatched types
2  --> tests/ui-stable/transmute-ref-dst-mutable.rs:18:22
3   |
418 |     let _: &mut u8 = transmute_ref!(&0u8);
5   |                      ^^^^^^^^^^^^^^^^^^^^ types differ in mutability
6   |
7   = note: expected mutable reference `&mut u8`
8                      found reference `&_`
9   = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
10
11error[E0308]: mismatched types
12  --> tests/ui-stable/transmute-ref-dst-mutable.rs:18:22
13   |
1418 |     let _: &mut u8 = transmute_ref!(&0u8);
15   |                      ^^^^^^^^^^^^^^^^^^^^ types differ in mutability
16   |
17   = note: expected mutable reference `&mut u8`
18                      found reference `&_`
19   = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
20
21error[E0308]: mismatched types
22  --> tests/ui-stable/transmute-ref-dst-mutable.rs:18:22
23   |
2418 |     let _: &mut u8 = transmute_ref!(&0u8);
25   |                      ^^^^^^^^^^^^^^^^^^^^ types differ in mutability
26   |
27   = note: expected mutable reference `&mut u8`
28                      found reference `&_`
29   = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
30
31error[E0308]: mismatched types
32  --> tests/ui-stable/transmute-ref-dst-mutable.rs:18:22
33   |
3418 |     let _: &mut u8 = transmute_ref!(&0u8);
35   |                      ^^^^^^^^^^^^^^^^^^^^ types differ in mutability
36   |
37   = note: expected mutable reference `&mut u8`
38                      found reference `&_`
39   = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
40
41error[E0308]: mismatched types
42  --> tests/ui-stable/transmute-ref-dst-mutable.rs:18:22
43   |
4418 |     let _: &mut u8 = transmute_ref!(&0u8);
45   |                      ^^^^^^^^^^^^^^^^^^^^
46   |                      |
47   |                      types differ in mutability
48   |                      arguments to this function are incorrect
49   |
50   = note: expected mutable reference `&mut u8`
51                      found reference `&_`
52help: the return type of this call is `&_` due to the type of the argument passed
53  --> tests/ui-stable/transmute-ref-dst-mutable.rs:18:22
54   |
5518 |     let _: &mut u8 = transmute_ref!(&0u8);
56   |                      ^^^^^^^^^^^^^^^^^^^^ this argument influences the return type of `$crate`
57note: function defined here
58  --> src/util/macro_util.rs
59   |
60   | pub const fn must_use<T>(t: T) -> T {
61   |              ^^^^^^^^
62   = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
63