| error[E0284]: type annotations needed for `SmallCString<_>` |
| --> $DIR/try-from-with-const-genericsrs-98299.rs:5:36 |
| | |
| LL | SmallCString::try_from(p).map(|cstr| cstr); |
| | ------------ ^^^^ |
| | | |
| | type must be known at this point |
| | |
| note: required by a const generic parameter in `SmallCString` |
| --> $DIR/try-from-with-const-genericsrs-98299.rs:9:25 |
| | |
| LL | pub struct SmallCString<const N: usize> {} |
| | ^^^^^^^^^^^^^^ required by this const generic parameter in `SmallCString` |
| help: consider giving this closure parameter an explicit type, where the value of const parameter `N` is specified |
| | |
| LL | SmallCString::try_from(p).map(|cstr: SmallCString<N>| cstr); |
| | +++++++++++++++++ |
| |
| error: aborting due to 1 previous error |
| |
| For more information about this error, try `rustc --explain E0284`. |