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