]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/issue-97193.stderr
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[rust.git] / src / test / ui / lifetimes / issue-97193.stderr
1 error: incorrect function inside `extern` block
2   --> $DIR/issue-97193.rs:2:8
3    |
4 LL |   extern "C" {
5    |   ---------- `extern` blocks define existing foreign functions and functions inside of them cannot have a body
6 LL |       fn a(&mut self) {
7    |  ________^____________-
8    | |        |
9    | |        cannot have a body
10 LL | |
11 LL | |
12 LL | |         fn b(buf: &Self) {}
13 LL | |     }
14    | |_____- help: remove the invalid body: `;`
15    |
16    = help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
17    = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
18
19 error: `self` parameter is only allowed in associated functions
20   --> $DIR/issue-97193.rs:2:10
21    |
22 LL |     fn a(&mut self) {
23    |          ^^^^^^^^^ not semantically valid as function parameter
24    |
25    = note: associated functions are those in `impl` or `trait` definitions
26
27 error: aborting due to 2 previous errors
28