2024-01-03 15:00:04 -06:00
|
|
|
// run-rustfix
|
|
|
|
#![deny(bare_trait_objects)]
|
|
|
|
fn ord_prefer_dot(s: String) -> impl Ord {
|
2024-01-03 17:40:49 -06:00
|
|
|
//~^ ERROR the trait `Ord` cannot be made into an object
|
2024-01-03 15:00:04 -06:00
|
|
|
(s.starts_with("."), s)
|
|
|
|
}
|
|
|
|
fn main() {
|
|
|
|
let _ = ord_prefer_dot(String::new());
|
|
|
|
}
|