diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-98299.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-98299.rs b/src/test/ui/issues/issue-98299.rs new file mode 100644 index 000000000..63c058f91 --- /dev/null +++ b/src/test/ui/issues/issue-98299.rs @@ -0,0 +1,18 @@ +use std::convert::TryFrom; + +pub fn test_usage(p: ()) { + SmallCString::try_from(p).map(|cstr| cstr); + //~^ 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() {} |