-
Rust연습]Shadowing코딩Coding/Rust연습 2021. 12. 9. 23:29728x90
// mutability // shadowing 같은 이름을 다시 쓰는 것 fn main() { let my_variable = 9; println!("{}", my_variable); { let my_variable = "Some string"; println!("{}", my_variable); } println!("{}", my_variable); }
출처 :
https://www.youtube.com/watch?v=uHuMJw73ukg&list=TLPQMDkxMjIwMjHuFJxHs478XA&index=2
반응형'코딩Coding > Rust연습' 카테고리의 다른 글
Rust연습]Easy Rust 024: Control flow 1(match+if) (0) 2021.12.12 [Rust연습]Easy Rust 024: Control flow 1(if, else if, else) (0) 2021.12.12 RUST연습]Easy Rust 022: Vecs (0) 2021.12.12 RUST연습]변수 사이즈크기 알아보기(use std::mem::size_of;) (0) 2021.12.10 RUST연습]Rust Crash Course | Rustlang -44:47부터 (0) 2021.12.07 Rust☆]Understanding ☆Ownership☆ in Rust&☆The Rules of References☆ (0) 2021.12.06 Rust연습]Control Flow_While문_3.2.1.LIFTOFF!!연습 (0) 2021.12.06 Rust연습]Common Programming Concepts in Rust (0) 2021.12.06