address review feedback

This commit is contained in:
Matthias Krüger 2024-03-23 16:14:42 +01:00
parent 368bfb2c10
commit 9aea37d3c1
2 changed files with 11 additions and 11 deletions

View File

@ -7,15 +7,15 @@ use std::rc::Rc;
pub fn func<V, F: Fn(&mut V)>(f: F) -> A<impl X> {
A(B(C::new(D::new(move |st| f(st)))))
//~^ ERROR implementation of `FnOnce` is not general enough
//~^^ ERROR implementation of `Fn` is not general enough
//~^^^ ERROR implementation of `FnOnce` is not general enough
//~^^^^ ERROR implementation of `FnOnce` is not general enough
//~^^^^^ ERROR implementation of `Fn` is not general enough
//~^^^^^^ ERROR implementation of `FnOnce` is not general enough
//~^^^^^^^ ERROR implementation of `Fn` is not general enough
//~^^^^^^^^ ERROR implementation of `FnOnce` is not general enough
//~^^^^^^^^^ ERROR higher-ranked subtype error
//~^^^^^^^^^^ ERROR higher-ranked subtype error
//~| ERROR implementation of `Fn` is not general enough
//~| ERROR implementation of `FnOnce` is not general enough
//~| ERROR implementation of `FnOnce` is not general enough
//~| ERROR implementation of `Fn` is not general enough
//~| ERROR implementation of `FnOnce` is not general enough
//~| ERROR implementation of `Fn` is not general enough
//~| ERROR implementation of `FnOnce` is not general enough
//~| ERROR higher-ranked subtype error
//~| ERROR higher-ranked subtype error
}
trait X {}

View File

@ -8,8 +8,8 @@ const RCZ: *const i32 = &raw const *&0;
const fn f() {
if let RCZ = &raw const *&0 { }
//~^ WARN function pointers and raw pointers not derived from integers in patterns
//~^^ ERROR pointers cannot be reliably compared during const eval
//~^^^ WARN this was previously accepted by the compiler but is being phased out
//~| ERROR pointers cannot be reliably compared during const eval
//~| WARN this was previously accepted by the compiler but is being phased out
}
fn main() {}