Use // for single-line comments ignored by the compiler and /// for documentation comments that generate API docs. Place // anywhere to explain code logic, and place /// immediately before items like functions or structs to create public documentation.
// This is a regular comment ignored by the compiler
fn add(a: i32, b: i32) -> i32 {
a + b
}
/// Adds two numbers and returns the result.
///
/// # Examples
///
/// ```
/// let result = add(2, 2);
/// assert_eq!(result, 4);
/// ```
fn multiply(a: i32, b: i32) -> i32 {
a * b
}