// *** before: ***
// a bare trait name in type position meant a trait object,
// and it was indistinguishable from the trait itself
fn draw_all(shapes: &[Box<Shape>]) {
for s in shapes {
s.draw();
}
}
// *** in version Rust 2018: ***
// a trait object is marked dyn: the call clearly goes through a table
fn draw_all(shapes: &[Box<dyn Shape>]) {
for s in shapes {
s.draw();
}
}