summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/crate_level_checks/no_std_swap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/crate_level_checks/no_std_swap.rs')
-rw-r--r--src/tools/clippy/tests/ui/crate_level_checks/no_std_swap.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/crate_level_checks/no_std_swap.rs b/src/tools/clippy/tests/ui/crate_level_checks/no_std_swap.rs
new file mode 100644
index 000000000..d3571eaf0
--- /dev/null
+++ b/src/tools/clippy/tests/ui/crate_level_checks/no_std_swap.rs
@@ -0,0 +1,14 @@
+#![no_std]
+#![feature(lang_items, start, libc)]
+#![crate_type = "lib"]
+
+use core::panic::PanicInfo;
+
+#[warn(clippy::all)]
+fn main() {
+ let mut a = 42;
+ let mut b = 1337;
+
+ a = b;
+ b = a;
+}