@@ -2184,12 +2184,12 @@ any other method, using dot notation, as in `1.print()`.
21842184
21852185Sometimes, a method that a trait provides will have the same
21862186implementation for most or all of the types that implement that trait.
2187- For instance, suppose that we wanted `bool`s and `float `s to be
2187+ For instance, suppose that we wanted `bool`s and `f32 `s to be
21882188printable, and that we wanted the implementation of `print` for those
21892189types to be exactly as it is for `int`, above:
21902190
21912191~~~~
2192- impl Printable for float {
2192+ impl Printable for f32 {
21932193 fn print(&self) { println!("{:?}", *self) }
21942194}
21952195
@@ -2220,15 +2220,15 @@ impl Printable for ~str {
22202220
22212221impl Printable for bool {}
22222222
2223- impl Printable for float {}
2223+ impl Printable for f32 {}
22242224
22252225# 1.print();
22262226# (~"foo").print();
22272227# true.print();
22282228# 3.14159.print();
22292229~~~~
22302230
2231- Here, the impls of `Printable` for `int`, `bool`, and `float ` don't
2231+ Here, the impls of `Printable` for `int`, `bool`, and `f32 ` don't
22322232need to provide an implementation of `print`, because in the absence
22332233of a specific implementation, Rust just uses the _default method_
22342234provided in the trait definition. Depending on the trait, default
0 commit comments