diff options
Diffstat (limited to 'src/test/ui/consts/const-int-sign.rs')
-rw-r--r-- | src/test/ui/consts/const-int-sign.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/consts/const-int-sign.rs b/src/test/ui/consts/const-int-sign.rs new file mode 100644 index 000000000..c3111ddf5 --- /dev/null +++ b/src/test/ui/consts/const-int-sign.rs @@ -0,0 +1,6 @@ +fn main() { + let x: &'static bool = &(5_i32.is_negative()); + //~^ ERROR temporary value dropped while borrowed + let y: &'static bool = &(5_i32.is_positive()); + //~^ ERROR temporary value dropped while borrowed +} |