about summary refs log tree commit diff
path: root/tests/ui/issues/issue-98299.rs
blob: ba63d963475af22610c25f82e66878fe3667f7b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use std::convert::TryFrom;

pub fn test_usage(p: ()) {
    SmallCString::try_from(p).map(|cstr| cstr);
    //~^ ERROR: type annotations needed
    //~| ERROR: type annotations needed
    //~| ERROR: type annotations needed
}

pub struct SmallCString<const N: usize> {}

impl<const N: usize> TryFrom<()> for SmallCString<N> {
    type Error = ();

    fn try_from(path: ()) -> Result<Self, Self::Error> {
        unimplemented!();
    }
}

fn main() {}