From 6b8dacee9e3a284bc9040c080666b04b21c7b7a8 Mon Sep 17 00:00:00 2001 From: Andrew Cann Date: Fri, 12 Aug 2016 02:59:19 +0800 Subject: [PATCH] Improve comments on ! tests --- src/test/compile-fail/never-fallback.rs | 1 + src/test/run-pass/unit-fallback.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/test/compile-fail/never-fallback.rs b/src/test/compile-fail/never-fallback.rs index ca7b715547d..a43b1a45fe9 100644 --- a/src/test/compile-fail/never-fallback.rs +++ b/src/test/compile-fail/never-fallback.rs @@ -30,6 +30,7 @@ impl Flah { } fn doit() -> Result<(), ()> { + // The type of _ is unconstrained here and should default to ! let _ = try!(Flah.flah()); //~ ERROR the trait bound Ok(()) } diff --git a/src/test/run-pass/unit-fallback.rs b/src/test/run-pass/unit-fallback.rs index c5c337dc082..2babc6348e1 100644 --- a/src/test/run-pass/unit-fallback.rs +++ b/src/test/run-pass/unit-fallback.rs @@ -27,6 +27,7 @@ impl Flah { } fn doit() -> Result<(), ()> { + // The type of _ is unconstrained here and should default to () let _ = try!(Flah.flah()); Ok(()) }