Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

  • Feature Name: dyn-trait-syntax
  • Start Date: 2017-??-??
  • RFC PR: (leave this empty)
  • Rust Issue: (leave this empty)

Summary

Introduce a new dyn Trait syntax for trait objects using a contextual dyn keyword, and deprecate "bare trait" syntax for trait objects. In a future checkpoint, dyn will become a proper keyword and bare trait syntax will be removed.

C:\faster-sort>rustup run nightly cargo bench
Compiling libc v0.2.17
Compiling rand v0.3.14
Compiling faster-sort v0.1.0 (file:///C:/faster-sort)
warning: unused import: `std::cmp`, #[warn(unused_imports)] on by default
--> src\lib.rs:8:5
|
8 | use std::cmp;
| ^^^^^^^^