]>
Commit | Line | Data |
---|---|---|
487cf647 FG |
1 | error[E0308]: mismatched types |
2 | --> $DIR/alloc-error-handler-bad-signature-2.rs:10:1 | |
b7449926 | 3 | | |
487cf647 FG |
4 | LL | #[alloc_error_handler] |
5 | | ---------------------- in this procedural macro expansion | |
9c376795 | 6 | LL | // fn oom( |
487cf647 FG |
7 | LL | || info: Layout, |
8 | LL | || ) { | |
9 | | ||_- arguments to this function are incorrect | |
10 | LL | | loop {} | |
11 | LL | | } | |
9ffffee4 | 12 | | |__^ expected `Layout`, found `core::alloc::Layout` |
487cf647 | 13 | | |
9ffffee4 FG |
14 | = note: `core::alloc::Layout` and `Layout` have similar names, but are actually distinct types |
15 | note: `core::alloc::Layout` is defined in crate `core` | |
487cf647 | 16 | --> $SRC_DIR/core/src/alloc/layout.rs:LL:COL |
9ffffee4 | 17 | note: `Layout` is defined in the current crate |
487cf647 FG |
18 | --> $DIR/alloc-error-handler-bad-signature-2.rs:7:1 |
19 | | | |
20 | LL | struct Layout; | |
21 | | ^^^^^^^^^^^^^ | |
22 | note: function defined here | |
23 | --> $DIR/alloc-error-handler-bad-signature-2.rs:10:4 | |
b7449926 | 24 | | |
487cf647 FG |
25 | LL | fn oom( |
26 | | ^^^ | |
532ac7d7 | 27 | LL | info: Layout, |
487cf647 FG |
28 | | ------------ |
29 | = note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info) | |
30 | ||
31 | error[E0308]: mismatched types | |
32 | --> $DIR/alloc-error-handler-bad-signature-2.rs:10:1 | |
33 | | | |
34 | LL | #[alloc_error_handler] | |
35 | | ---------------------- in this procedural macro expansion | |
9c376795 | 36 | LL | // fn oom( |
487cf647 FG |
37 | LL | || info: Layout, |
38 | LL | || ) { | |
39 | | ||_^ expected `!`, found `()` | |
40 | LL | | loop {} | |
41 | LL | | } | |
42 | | |__- expected `!` because of return type | |
43 | | | |
44 | = note: expected type `!` | |
45 | found unit type `()` | |
46 | = note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info) | |
b7449926 XL |
47 | |
48 | error: aborting due to 2 previous errors | |
49 | ||
487cf647 | 50 | For more information about this error, try `rustc --explain E0308`. |