rust/tests/ui/crate_level_checks/no_std_swap.fixed
2025-01-21 06:59:15 -07:00

12 lines
183 B
Rust

#![no_std]
#![crate_type = "lib"]
use core::panic::PanicInfo;
#[warn(clippy::all)]
pub fn main() {
let mut a = 42;
let mut b = 1337;
core::mem::swap(&mut a, &mut b);
}