2024-05-04 16:37:14 +00: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 12:12:30 +00:00
|
|
|
#[diagnostic::do_not_recommend]
|
2024-05-04 16:37:14 +00: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 12:26:24 +00:00
|
|
|
//~| NOTE the trait `Foo` is not implemented for `*mut ()`
|
2024-05-04 16:37:14 +00:00
|
|
|
}
|