]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-98299.rs
Rollup merge of #106867 - sunfishcode:sunfishcode/std-os-fd-stable-version, r=m-ou-se
[rust.git] / tests / ui / issues / issue-98299.rs
1 use std::convert::TryFrom;
2
3 pub fn test_usage(p: ()) {
4     SmallCString::try_from(p).map(|cstr| cstr);
5     //~^ ERROR: type annotations needed
6 }
7
8 pub struct SmallCString<const N: usize> {}
9
10 impl<const N: usize> TryFrom<()> for SmallCString<N> {
11     type Error = ();
12
13     fn try_from(path: ()) -> Result<Self, Self::Error> {
14         unimplemented!();
15     }
16 }
17
18 fn main() {}