]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.stderr
Tweak use of trimmed paths
[rust.git] / tests / ui / suggestions / lifetimes / missing-lifetimes-in-signature-before-const.stderr
1 error[E0106]: missing lifetime specifier
2   --> $DIR/missing-lifetimes-in-signature-before-const.rs:4:67
3    |
4 LL | fn buggy_const<const N: usize>(_a: &Option<[u8; N]>, _f: &str) -> &str {
5    |                                    ----------------      ----     ^ expected named lifetime parameter
6    |
7    = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `_a` or `_f`
8 help: consider introducing a named lifetime parameter
9    |
10 LL | fn buggy_const<'a, const N: usize>(_a: &'a Option<[u8; N]>, _f: &'a str) -> &'a str {
11    |                +++                      ++                       ++          ++
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0106`.