mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Add missing dyn keyword to trait_alias page of the Unstable Book
This commit is contained in:
@@ -26,7 +26,7 @@ pub fn main() {
|
||||
foo(&1);
|
||||
|
||||
// Use trait alias for trait objects.
|
||||
let a: &Bar = &123;
|
||||
let a: &dyn Bar = &123;
|
||||
println!("{:?}", a);
|
||||
let b = Box::new(456) as Box<dyn Foo>;
|
||||
println!("{:?}", b);
|
||||
|
||||
Reference in New Issue
Block a user