|
1 | | -error[E0277]: expected a `Fn()` closure, found `unsafe fn() {foo}` |
| 1 | +error[E0277]: expected a `Fn()` closure, found `#[target_features] fn() {foo}` |
2 | 2 | --> $DIR/fn-traits.rs:24:10 |
3 | 3 | | |
4 | 4 | LL | call(foo); |
5 | 5 | | ---- ^^^ call the function in a closure: `|| unsafe { /* code */ }` |
6 | 6 | | | |
7 | 7 | | required by a bound introduced by this call |
8 | 8 | | |
9 | | - = help: the trait `Fn()` is not implemented for fn item `unsafe fn() {foo}` |
| 9 | + = help: the trait `Fn()` is not implemented for fn item `#[target_features] fn() {foo}` |
10 | 10 | = note: unsafe function cannot be called generically without an unsafe block |
11 | | - = note: wrap the `unsafe fn() {foo}` in a closure with no arguments: `|| { /* code */ }` |
| 11 | + = note: wrap the `#[target_features] fn() {foo}` in a closure with no arguments: `|| { /* code */ }` |
12 | 12 | = note: `#[target_feature]` functions do not implement the `Fn` traits |
13 | 13 | note: required by a bound in `call` |
14 | 14 | --> $DIR/fn-traits.rs:11:17 |
15 | 15 | | |
16 | 16 | LL | fn call(f: impl Fn()) { |
17 | 17 | | ^^^^ required by this bound in `call` |
18 | 18 |
|
19 | | -error[E0277]: expected a `FnMut()` closure, found `unsafe fn() {foo}` |
| 19 | +error[E0277]: expected a `FnMut()` closure, found `#[target_features] fn() {foo}` |
20 | 20 | --> $DIR/fn-traits.rs:25:14 |
21 | 21 | | |
22 | 22 | LL | call_mut(foo); |
23 | 23 | | -------- ^^^ call the function in a closure: `|| unsafe { /* code */ }` |
24 | 24 | | | |
25 | 25 | | required by a bound introduced by this call |
26 | 26 | | |
27 | | - = help: the trait `FnMut()` is not implemented for fn item `unsafe fn() {foo}` |
| 27 | + = help: the trait `FnMut()` is not implemented for fn item `#[target_features] fn() {foo}` |
28 | 28 | = note: unsafe function cannot be called generically without an unsafe block |
29 | | - = note: wrap the `unsafe fn() {foo}` in a closure with no arguments: `|| { /* code */ }` |
| 29 | + = note: wrap the `#[target_features] fn() {foo}` in a closure with no arguments: `|| { /* code */ }` |
30 | 30 | = note: `#[target_feature]` functions do not implement the `Fn` traits |
31 | 31 | note: required by a bound in `call_mut` |
32 | 32 | --> $DIR/fn-traits.rs:15:25 |
33 | 33 | | |
34 | 34 | LL | fn call_mut(mut f: impl FnMut()) { |
35 | 35 | | ^^^^^^^ required by this bound in `call_mut` |
36 | 36 |
|
37 | | -error[E0277]: expected a `FnOnce()` closure, found `unsafe fn() {foo}` |
| 37 | +error[E0277]: expected a `FnOnce()` closure, found `#[target_features] fn() {foo}` |
38 | 38 | --> $DIR/fn-traits.rs:26:15 |
39 | 39 | | |
40 | 40 | LL | call_once(foo); |
41 | 41 | | --------- ^^^ call the function in a closure: `|| unsafe { /* code */ }` |
42 | 42 | | | |
43 | 43 | | required by a bound introduced by this call |
44 | 44 | | |
45 | | - = help: the trait `FnOnce()` is not implemented for fn item `unsafe fn() {foo}` |
| 45 | + = help: the trait `FnOnce()` is not implemented for fn item `#[target_features] fn() {foo}` |
46 | 46 | = note: unsafe function cannot be called generically without an unsafe block |
47 | | - = note: wrap the `unsafe fn() {foo}` in a closure with no arguments: `|| { /* code */ }` |
| 47 | + = note: wrap the `#[target_features] fn() {foo}` in a closure with no arguments: `|| { /* code */ }` |
48 | 48 | = note: `#[target_feature]` functions do not implement the `Fn` traits |
49 | 49 | note: required by a bound in `call_once` |
50 | 50 | --> $DIR/fn-traits.rs:19:22 |
|
0 commit comments