1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
// This is a test file for syntax highlighting fn main() { let mut x = 42; let name = "Hello, World!"; if x > 10 { println!("{}", name); } for i in 0..10 { x += i; } struct Point { x: i32, y: i32, } impl Point { pub fn new(x: i32, y: i32) -> Self { Self { x, y } } } }