// check-pass // run-rustfix // edition 2018 #![warn(rust_2021_prelude_collisions)] trait MyTrait { fn from_iter(x: Option); } impl MyTrait<()> for Vec { fn from_iter(_: Option<()>) {} } fn main() { >::from_iter(None); //~^ WARNING trait-associated function `from_iter` will become ambiguous in Rust 2021 //~^^ WARNING this is accepted in the current edition }