2024-05-04 11:37:14 -05:00
|
|
|
//@ revisions: current next
|
|
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
|
|
|
//@[next] compile-flags: -Znext-solver
|
|
|
|
|
|
|
|
#![feature(do_not_recommend)]
|
|
|
|
|
|
|
|
trait Foo {}
|
|
|
|
|
2024-05-10 07:12:30 -05:00
|
|
|
#[diagnostic::do_not_recommend]
|
2024-05-04 11:37:14 -05:00
|
|
|
impl<T> Foo for T where T: Send {}
|
|
|
|
|
|
|
|
fn needs_foo<T: Foo>() {}
|
|
|
|
//~^ NOTE required by a bound in `needs_foo`
|
|
|
|
//~| NOTE required by this bound in `needs_foo`
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
needs_foo::<*mut ()>();
|
|
|
|
//~^ ERROR the trait bound `*mut (): Foo` is not satisfied
|
2024-05-04 07:26:24 -05:00
|
|
|
//~| NOTE the trait `Foo` is not implemented for `*mut ()`
|
2024-05-04 11:37:14 -05:00
|
|
|
}
|