result test cases
@@ -8,3 +8,18 @@ pub fn foo(x: Result<Result<U32, usize>, usize>) -> U32 {
Result::<Result<U32, usize>, usize>::Err(x) => U32(x as u32),
}
}
+
+bytes!(SimpleOutput, 3);
+type SimpleOutputResult = Result::<SimpleOutput, u8>;
+
+fn other() -> Result<SimpleOutput, u8> {
+ Result::<SimpleOutput, u8>::Err(1u8)
+}
+
+pub fn type_confusion() -> Result<SimpleOutput, u8> {
+ other()
+}
+
+pub fn return_type_alias() -> Result<SimpleOutput, u8> {
+ SimpleOutputResult::Err(1u8)
+}
