summaryrefslogtreecommitdiffstats
path: root/tests/ui/weird-exprs.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /tests/ui/weird-exprs.rs
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/weird-exprs.rs')
-rw-r--r--tests/ui/weird-exprs.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/ui/weird-exprs.rs b/tests/ui/weird-exprs.rs
index d65703ef5..c4fa850a4 100644
--- a/tests/ui/weird-exprs.rs
+++ b/tests/ui/weird-exprs.rs
@@ -5,13 +5,16 @@
#![allow(non_camel_case_types)]
#![allow(dead_code)]
+#![allow(redundant_semicolons)]
#![allow(unreachable_code)]
#![allow(unused_braces, unused_must_use, unused_parens)]
#![allow(uncommon_codepoints, confusable_idents)]
+#![allow(unused_imports)]
#![allow(unreachable_patterns)]
#![recursion_limit = "256"]
+extern crate core;
use std::cell::Cell;
use std::mem::swap;
@@ -204,6 +207,30 @@ fn closure_matching() {
assert!(matches!(x(..), |_| Some(4)));
}
+fn semisemisemisemisemi() {
+ ;;;;;;; ;;;;;;; ;;; ;;; ;;
+ ;; ;; ;;;; ;;;; ;;
+ ;;;;;;; ;;;;; ;; ;;;; ;; ;;
+ ;; ;; ;; ;; ;; ;;
+ ;;;;;;; ;;;;;;; ;; ;; ;;
+}
+
+fn useful_syntax() {
+ use {{std::{{collections::{{HashMap}}}}}};
+ use ::{{{{core}, {std}}}};
+ use {{::{{core as core2}}}};
+}
+
+fn infcx() {
+ pub mod cx {
+ pub mod cx {
+ pub use super::cx;
+ pub struct Cx;
+ }
+ }
+ let _cx: cx::cx::Cx = cx::cx::cx::cx::cx::Cx;
+}
+
pub fn main() {
strange();
funny();
@@ -227,4 +254,7 @@ pub fn main() {
function();
bathroom_stall();
closure_matching();
+ semisemisemisemisemi();
+ useful_syntax();
+ infcx();
}