Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

rust lang underscore

// Note that underscore usage depends on context, see link at bottom (not source)
Underscores are used in front of variables to tell the compiler that you don't
plan on using the variable.
Example, two cases, comment explains what compiler does
let mut my_variable:u32 = 18;		// Compiler will warn you about an unused variable
let mut _my_variable:u32 = 18;		// Compiler will say nothing

// Context link: https://runrust.miraheze.org/wiki/Underscore
Source by users.rust-lang.org #
 
PREVIOUS NEXT
Tagged: #rust #lang #underscore
ADD COMMENT
Topic
Name
8+1 =