]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/issue-97194.stderr
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[rust.git] / src / test / ui / lifetimes / issue-97194.stderr
1 error: incorrect function inside `extern` block
2   --> $DIR/issue-97194.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 bget(&self, index: [usize; Self::DIM]) -> bool {
7    |  ________^^^^___________________________________________-
8    | |        |
9    | |        cannot have a body
10 LL | |
11 LL | |
12 LL | |
13 LL | |         type T<'a> = &'a str;
14 LL | |     }
15    | |_____- help: remove the invalid body: `;`
16    |
17    = 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
18    = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
19
20 error: `self` parameter is only allowed in associated functions
21   --> $DIR/issue-97194.rs:2:13
22    |
23 LL |     fn bget(&self, index: [usize; Self::DIM]) -> bool {
24    |             ^^^^^ not semantically valid as function parameter
25    |
26    = note: associated functions are those in `impl` or `trait` definitions
27
28 error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
29   --> $DIR/issue-97194.rs:2:35
30    |
31 LL |     fn bget(&self, index: [usize; Self::DIM]) -> bool {
32    |                                   ^^^^ `Self` is only available in impls, traits, and type definitions
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0433`.