]> git.proxmox.com Git - rustc.git/blame - tests/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / alloc-error / alloc-error-handler-bad-signature-2.stderr
CommitLineData
487cf647
FG
1error[E0308]: mismatched types
2 --> $DIR/alloc-error-handler-bad-signature-2.rs:10:1
b7449926 3 |
487cf647
FG
4LL | #[alloc_error_handler]
5 | ---------------------- in this procedural macro expansion
9c376795 6LL | // fn oom(
487cf647
FG
7LL | || info: Layout,
8LL | || ) {
9 | ||_- arguments to this function are incorrect
10LL | | loop {}
11LL | | }
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
15note: `core::alloc::Layout` is defined in crate `core`
487cf647 16 --> $SRC_DIR/core/src/alloc/layout.rs:LL:COL
9ffffee4 17note: `Layout` is defined in the current crate
487cf647
FG
18 --> $DIR/alloc-error-handler-bad-signature-2.rs:7:1
19 |
20LL | struct Layout;
21 | ^^^^^^^^^^^^^
22note: function defined here
23 --> $DIR/alloc-error-handler-bad-signature-2.rs:10:4
b7449926 24 |
487cf647
FG
25LL | fn oom(
26 | ^^^
532ac7d7 27LL | 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
31error[E0308]: mismatched types
32 --> $DIR/alloc-error-handler-bad-signature-2.rs:10:1
33 |
34LL | #[alloc_error_handler]
35 | ---------------------- in this procedural macro expansion
9c376795 36LL | // fn oom(
487cf647
FG
37LL | || info: Layout,
38LL | || ) {
39 | ||_^ expected `!`, found `()`
40LL | | loop {}
41LL | | }
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
48error: aborting due to 2 previous errors
49
487cf647 50For more information about this error, try `rustc --explain E0308`.