rust-learning icon indicating copy to clipboard operation
rust-learning copied to clipboard

Look forward a section that tell the variance and borrowing checker

Open xmh0511 opened this issue 2 years ago • 0 comments

Hi, appreciate you have written this wonderful book, which will help many people comprehend the obscure knowledge in Rust. Another part I think is difficult in Rust is Variance and subtype. Regarding Variance, you have given many wonderful answers in the rust user community. For example, What is the relationship if the covariance is nested in an invariant?, determine the variance if a type has multiple nested types with different variances?, which basically covers the difficult part about variance.

Regarding the Borrowing checker, Why does a longer lifetime in a reference that refers to a reference with shorter lifetime is permitted in item?, Why does the mutability of the field impact the borrow check result?, What is the reason why move and assignment have different treatments for a (possible) borrowed value?, you answered these question from the essential perspective, which interprets how borrowing checker work.

Look forward to the sections in your book that would cover these pieces of knowledge.

xmh0511 avatar Jul 18 '23 09:07 xmh0511