What is the output?
@AstraKernel
I think it is B because v1 borrows v but the lifetime directly ends and v is free for v2 again.
#rustquiz #rustlang #rust #borrowchecker
@chrisg
That's possibly the side effects of my #RustChallenge series 😂. i set traps in that.
But in #RustQuiz, I don't do. It will be simple 😉
#RustQuiz explained
Ans: D
👉 We have declared tuples called `langs`
👉 In next line, we are doing destructuring the tuple
👉 ".." referred as partial destructuring helps to ignore some fields when destructuring
👉 Here `Rust` assigned to `l` and rest of the fields ignored
🦀 #RustQuiz
What is the output of this?
A. Error
B. RustJsPython
C. (Rust, Js, Python)
D. Rust
(Not hard/tricky or unique as #RustChallenge, just simple quizzes)
#rustquiz #RustChallenge #rustlang #rust #rusttips #learnrust
🦀 #RustChallenge
What will be the outcome?
1. Both runs and gives the output
2. B gives output and A gives overflow error
3. A gives output and B gives error
4. Both gives error
#RustChallenge #rust #rustlang #rustquiz
What is the result?
A. Prints 1 (explain how)
B. Prints 2 (explain how)
C. Error (explain why)
Credits to @wcrichton(twitter)
#RustChallenge #rustlang #rustquiz #rust
10. #RustChallenge :
Can you answer what will be the output of this rust program without running it?
#rust #rustaceans #rustprogramming #rustlangtips #RustQuestions #RustQuiz #rustlanguage
#RustChallenge #rust #rustaceans #rustprogramming #rustlangtips #RustQuestions #rustquiz #rustlanguage
9. #RustChallenge :
Can you answer what will be the output of this rust program without running it?
#rust #rustaceans #rustprogramming #rustlangtips #RustQuestions #RustQuiz #rustlanguage
#RustChallenge #rust #rustaceans #rustprogramming #rustlangtips #RustQuestions #rustquiz #rustlanguage
9. #RustChallenge :
Can you answer what will be the output of this rust program without running it?
#rust #rustaceans #rustprogramming #rustlangtips #RustQuestions #RustQuiz #rustlanguage
#RustChallenge #rust #rustaceans #rustprogramming #rustlangtips #RustQuestions #rustquiz #rustlanguage