ZhangHanDong / tao-of-rust-codes

《Rust编程之道》随书源码
https://ruststudy.github.io/tao_of_rust_docs/tao_of_rust/
MIT License
1.19k stars 172 forks source link

「第三章」 P70 Figure 3-5 #207

Closed LEXUGE closed 5 years ago

LEXUGE commented 5 years ago

页码与行数


文本或排版错误

impl<T: A + B> C for T

Figure 3-5 is wrong because the trait C should be implemented for All the T where T∈(A∩B)

(A∩B)⊂C should be true else the code can't compile. And (A∩B)⊂T can always be true since T had implemented A and B.