error[E0284]: type annotations needed for `SmallCString<_>` --> $DIR/issue-98299.rs:4: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/issue-98299.rs:10:25 | LL | pub struct SmallCString {} | ^^^^^^^^^^^^^^ 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| cstr); | +++++++++++++++++ error[E0284]: type annotations needed for `SmallCString<_>` --> $DIR/issue-98299.rs:4:36 | LL | SmallCString::try_from(p).map(|cstr| cstr); | ------------ ^^^^ | | | type must be known at this point | note: required for `SmallCString<_>` to implement `TryFrom<()>` --> $DIR/issue-98299.rs:12:22 | LL | impl TryFrom<()> for SmallCString { | -------------- ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ | | | unsatisfied trait bound introduced here 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| cstr); | +++++++++++++++++ error[E0284]: type annotations needed for `SmallCString<_>` --> $DIR/issue-98299.rs:4:36 | LL | SmallCString::try_from(p).map(|cstr| cstr); | ------------------------- ^^^^ | | | type must be known at this point | note: required for `SmallCString<_>` to implement `TryFrom<()>` --> $DIR/issue-98299.rs:12:22 | LL | impl TryFrom<()> for SmallCString { | -------------- ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ | | | unsatisfied trait bound introduced here 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| cstr); | +++++++++++++++++ error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0284`.