abi_stable/docs/troubleshooting.rs
1/*!
2
3Here are some problems and their solutions
4
5# Opaque compiletime errors
6
7As of writing this section,having `extern fn` in a type definition causes
8compile-time errors for `#[derive(StableAbi)]` to look like this
9
10```text
11error: unknown lifetime
12```
13ẁhere it doesn't point at what the cause of the error is.
14
15To fix this,replace `extern fn` with `extern "C" fn`
16and the error message will look like this:
17
18```text
19error: unknown lifetime
20 --> abi_stable/src/lib.rs:313:6
21 |
22313 | a:&'b (),
23 | ^^
24```
25
26
27
28*/