rust_book_feedback icon indicating copy to clipboard operation
rust_book_feedback copied to clipboard

Results 44 rust_book_feedback issues
Sort by recently updated
recently updated
newest added

纸质书P155页第一行: “但是实现方法不能是简单地在AST上找以下某个引用最后一次在哪里使用。。。” 应该为 “但是实现方法不能是简单地在AST上找一下某个引用最后一次在哪里使用。。。”

三路运算符 https://en.cppreference.com/w/cpp/language/operator_comparison#Three-way_comparison PartialOrd https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html 从返回值的角度应该是Ord更类似 而且Rust写明了需要传递性…… 再者 std::strong_ordering 和 std::weak_ordering 要求 a < b, a > b, a = b 恰有一个为true,而他们是 返回值

应该改成 ```rust struct Closure { fn call(&self, a: i32) -> i32 { self.inner1 + a } } fn main() { let x = 1_i32; let add_x = Closure { inner1:...

如果用/test 10 应更正为./test 10

第二段模式结构应为模式解构

```rust fn main() { let mut i = 0; let p1 = &mut i; *p1 = 1; let x = i; } ``` ```rust fn main() { let mut i...

书中为 `pointer: NonZero`, 然而现有(Nightly 2020/1/9)实现已更改为: ```rust #[rustc_layout_scalar_valid_range_start(1)] pub struct Unique { pointer: *const T, _marker: PhantomData, } ``` 注意上文出现的 rustc_attr, 现在应该是靠这个保证非0从而进行优化。 类似的,现在 rust 提供了 core::ptr::NonNull: ```rust #[rustc_layout_scalar_valid_range_start(1)] #[rustc_nonnull_optimization_guaranteed] pub struct...

匹配时所用的 C、D 是否应当修改为 E::C 和 E::D?(以及A和B)