A quick multiple-choice check before you move on. Answer every question, then submit to see how you did.
1.Why does enum List { Cons(i32, List), Nil } fail to compile, and how does Box<List> fix it?
2.In fn run() -> Result<(), Box<dyn std::error::Error>>, what lets the ? operator return several different concrete error types (e.g. io::Error and ParseIntError) from one function?
3.Given let s: Box<String> = Box::new(String::from("Rust"));, why does s.to_uppercase() work even though String has no inherent to_uppercase method?
4.Why is shared, mutable, cross-thread state written as Arc<Mutex<T>> rather than Arc<T> alone, according to the separation of concerns described?
5.You have let cell = RefCell::new(5); and want two mutable borrows active at the same time: let a = cell.borrow_mut(); let b = cell.borrow_mut();. What happens?