Constants

// Note the underscore to make numbers more readable
const MAX_POINTS: u32 = 100_000;

fn main() {

    println!("x is {}.", MAX_POINTS);

    // Cannot be shadowed: uncomment to see
    // let MAX_POINTS = 10;
}
  • Annotation type required