1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
// Regular Rust comment use std::collections::HashMap; // TODO: Implement error handling fn main() { let mut map = HashMap::new(); map.insert("key", "value"); // FIXME: This is inefficient for (k, v) in &map { println!("{}: {}", k, v); } /* NOTE: Consider using a different data structure */ // HACK: Quick workaround for now } // BUG: Function doesn't handle empty input #[allow(dead_code)] fn process_data(data: &str) -> String { data.to_uppercase() } // TODO: Test Rust comment detection