]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_monomorphize/src/collector.rs
fix most compiler/ doctests
[rust.git] / compiler / rustc_monomorphize / src / collector.rs
index 0e0a4fbc2155641b87a080983c72fae181044db1..39040ab77bc512d9149278997c904bba4ae73929 100644 (file)
 //! another function. It suffices to just take a reference in order to introduce
 //! an edge. Consider the following example:
 //!
-//! ```rust
+//! ```
+//! # use core::fmt::Display;
 //! fn print_val<T: Display>(x: T) {
 //!     println!("{}", x);
 //! }
 //!
-//! fn call_fn(f: &Fn(i32), x: i32) {
+//! fn call_fn(f: &dyn Fn(i32), x: i32) {
 //!     f(x);
 //! }
 //!