• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0308]: mismatched types
2  --> tests/ui-nightly/transmute-ref-src-dst-not-references.rs:17:54
3   |
417 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize);
5   |                                       ---------------^^^^^^-
6   |                                       |              |
7   |                                       |              expected `&_`, found `usize`
8   |                                       expected due to this
9   |
10   = note: expected reference `&_`
11                   found type `usize`
12help: consider borrowing here
13   |
1417 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(&0usize);
15   |                                                      +
16
17error[E0308]: mismatched types
18  --> tests/ui-nightly/transmute-ref-src-dst-not-references.rs:17:39
19   |
2017 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize);
21   |                                       ^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&_`
22   |
23   = note:   expected type `usize`
24           found reference `&_`
25   = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
26
27error[E0308]: mismatched types
28  --> tests/ui-nightly/transmute-ref-src-dst-not-references.rs:17:39
29   |
3017 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize);
31   |                                       ^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&_`
32   |
33   = note:   expected type `usize`
34           found reference `&_`
35   = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
36
37error[E0308]: mismatched types
38  --> tests/ui-nightly/transmute-ref-src-dst-not-references.rs:17:39
39   |
4017 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize);
41   |                                       ^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&_`
42   |
43   = note:   expected type `usize`
44           found reference `&_`
45   = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
46
47warning: this function depends on never type fallback being `()`
48  --> tests/ui-nightly/transmute-ref-src-dst-not-references.rs:17:1
49   |
5017 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize);
51   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52   |
53   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
54   = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
55   = help: specify the types explicitly
56note: in edition 2024, the requirement `!: AsBytes` will fail
57  --> tests/ui-nightly/transmute-ref-src-dst-not-references.rs:17:39
58   |
5917 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize);
60   |                                       ^^^^^^^^^^^^^^^^^^^^^^
61   = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
62   = note: this warning originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
63
64warning: never type fallback affects this call to an `unsafe` function
65  --> tests/ui-nightly/transmute-ref-src-dst-not-references.rs:17:39
66   |
6717 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize);
68   |                                       ^^^^^^^^^^^^^^^^^^^^^^
69   |
70   = warning: this will change its meaning in a future release!
71   = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
72   = help: specify the type explicitly
73   = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default
74   = note: this warning originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
75
76warning: never type fallback affects this call to an `unsafe` function
77  --> tests/ui-nightly/transmute-ref-src-dst-not-references.rs:17:39
78   |
7917 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize);
80   |                                       ^^^^^^^^^^^^^^^^^^^^^^
81   |
82   = warning: this will change its meaning in a future release!
83   = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
84   = help: specify the type explicitly
85   = note: this warning originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
86