// revisions: current next //[next] compile-flags: -Znext-solver #![feature(rustc_attrs)] #[rustc_deny_explicit_impl(implement_via_object = true)] trait YesObject {} #[rustc_deny_explicit_impl(implement_via_object = false)] trait NotObject {} fn test_yes_object() {} fn test_not_object() {} fn main() { test_yes_object::(); test_not_object::(); //~^ ERROR the trait bound `dyn NotObject: NotObject` is not satisfied }