1
Fork 0

Change leak check lint message to behavior is likely to change in the future

This commit is contained in:
Santiago Pastorino 2024-02-06 15:22:13 -03:00
parent 8a497723e3
commit eee9d2a773
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
13 changed files with 18 additions and 20 deletions

View file

@ -12,18 +12,16 @@ impl SadBee for for<'a> fn(&'a ()) {
const ASSOC: usize = 0;
}
impl SadBee for fn(&'static ()) {
//~^ WARNING conflicting implementations of trait
//~| WARNING this was previously accepted
//~^ WARN conflicting implementations of trait
//~| WARN the behavior may change in a future release
const ASSOC: usize = 100;
}
struct Foo<T: SadBee>([u8; <T as SadBee>::ASSOC], PhantomData<T>)
where
[(); <T as SadBee>::ASSOC]: ;
[(); <T as SadBee>::ASSOC]:;
fn covariant(
v: &'static Foo<for<'a> fn(&'a ())>
) -> &'static Foo<fn(&'static ())> {
fn covariant(v: &'static Foo<for<'a> fn(&'a ())>) -> &'static Foo<fn(&'static ())> {
v
//~^ ERROR mismatched types
}