QuineDot
QuineDot
[I tried this code:](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f31733ae963310bcb1a6e5871d2a03b5) ```rust use core::fmt::Debug; fn foo(_: &Box) {} fn main() { foo(&{ Box::new(()) }); foo(&( Box::new(()) )); foo(& Box::new(()) ); } ``` I expected to see this...
This might well be a duplicate, but I couldn't find an existing bug. I ran into this with `c_int`. [Given the following program:](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=ceccee586bd86293bf6fee500ebdc17d) ```rust fn main() { let _: c_int;...
- [ ] [I think you should show the `Option` and `Result` definitions here.](https://google.github.io/comprehensive-rust/std/option-result.html) They'll see the variants everywhere in Rust. --- - [ ] [Clarify that a `HashMap` doesn't...
[You only cover `Result`,](https://google.github.io/comprehensive-rust/error-handling/try-operator.html) but [it works with other types too.](https://doc.rust-lang.org/std/ops/trait.Try.html#implementors) At least mention `Option`, which is commonly used. [The desugaring example](https://google.github.io/comprehensive-rust/error-handling/converting-error-types.html) is out of date; [the actual desugaring](https://rust-lang.github.io/rfcs/3058-try-trait-v2.html#desugaring-) is...
[You say:](https://google.github.io/comprehensive-rust/basic-syntax/static-and-const.html) > Global state is managed with static and constant variables. But `const`s can't manage a state. Statics can... but preferably only with interior mutability of some sort. Your...
All the exercises start with something like ``` // TODO: remove this when you're done with your implementation. #![allow(unused_variables, dead_code)] ``` You're training people that it's normal and a good...
[This slide](https://google.github.io/comprehensive-rust/concurrency/threads.html) says that threads are all daemon threads, but this is untrue: * For one, you're only talking about `thread::spawn` created threads, as per the very next slide *...
[You make a direct comparison between Rust and C++ references,](https://google.github.io/comprehensive-rust/basic-syntax/references.html) but [Rust references are more similar to pointers in many ways.](https://stackoverflow.com/questions/64167637/is-the-concept-of-reference-different-in-c-and-rust) I see people coming from C++ and being confused...
I found it sort of odd that `Arc` and friends weren't mentioned until the last day, while for example you have [a slide on `Rc` (also mentioning `RefCell` and `Cell`...
I don't think you ever cover what a non-`Sized` type, aka dynamically sized type (DST), is. [Here](https://google.github.io/comprehensive-rust/basic-syntax/scalar-types.html) you call `&str` and `&[u8]` "scalar types", and... while the *reference* is, I...