diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/double-ref.rs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/test/ui/double-ref.rs b/src/test/ui/double-ref.rs new file mode 100644 index 000000000..e68b86833 --- /dev/null +++ b/src/test/ui/double-ref.rs @@ -0,0 +1,36 @@ +// run-pass + +#![allow(dead_code)] +// pretty-expanded FIXME #23616 + +fn check_expr() { + let _: & usize = &1; + let _: & & usize = &&1; + let _: & & & usize = &&&1; + let _: & & & usize = & &&1; + let _: & & & & usize = &&&&1; + let _: & & & & usize = & &&&1; + let _: & & & & & usize = &&&&&1; +} + +fn check_ty() { + let _: &usize = & 1; + let _: &&usize = & & 1; + let _: &&&usize = & & & 1; + let _: & &&usize = & & & 1; + let _: &&&&usize = & & & & 1; + let _: & &&&usize = & & & & 1; + let _: &&&&&usize = & & & & & 1; +} + +fn check_pat() { + let &_ = & 1_usize; + let &&_ = & & 1_usize; + let &&&_ = & & & 1_usize; + let & &&_ = & & & 1_usize; + let &&&&_ = & & & & 1_usize; + let & &&&_ = & & & & 1_usize; + let &&&&&_ = & & & & & 1_usize; +} + +pub fn main() {} |