+
+ #[test]
+ fn area_for_rect_of_multipliable_type() {
+ let r: Rect<_> = (30, 20).into(); // the Into trait uses the From trait
+ assert_eq!(r.area(), 30 * 20);
+ // let a = Rect::from(("a".to_string(), "b".to_string())).area(); // this doesn't work, because area() is not implemented for String
+ }