//@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ reference: attributes.diagnostic.do_not_recommend.intro trait Root {} trait DontRecommend {} trait Other {} trait Child {} #[diagnostic::do_not_recommend] impl Root for T where T: DontRecommend {} impl DontRecommend for T where T: Other {} #[diagnostic::do_not_recommend] impl Other for T where T: Child {} fn needs_root() {} fn main() { needs_root::<()>(); //~^ ERROR the trait bound `(): Root` is not satisfied }