fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.4 KiB44 linesraw
1error[E0308]: mismatched types
2  --> $DIR/alloc-error-handler-bad-signature-1.rs:10:1
3   |
4LL |    #[alloc_error_handler]
5   |    ---------------------- in this procedural macro expansion
6LL | // fn oom(
7LL | ||     info: &Layout,
8LL | || ) -> ()
9   | ||_______- arguments to this function are incorrect
10LL | |  {
11LL | |      loop {}
12LL | |  }
13   | |__^ expected `&Layout`, found `Layout`
14   |
15note: function defined here
16  --> $DIR/alloc-error-handler-bad-signature-1.rs:10:4
17   |
18LL | fn oom(
19   |    ^^^
20LL |     info: &Layout,
21   |     -------------
22   = note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
23
24error[E0308]: mismatched types
25  --> $DIR/alloc-error-handler-bad-signature-1.rs:10:1
26   |
27LL |    #[alloc_error_handler]
28   |    ---------------------- in this procedural macro expansion
29LL | // fn oom(
30LL | ||     info: &Layout,
31LL | || ) -> ()
32   | ||_______^ expected `!`, found `()`
33LL | |  {
34LL | |      loop {}
35LL | |  }
36   | |__- expected `!` because of return type
37   |
38   = note:   expected type `!`
39           found unit type `()`
40   = note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
41
42error: aborting due to 2 previous errors
43
44For more information about this error, try `rustc --explain E0308`.