fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
831 B23 linesraw
1error[E0308]: mismatched types
2  --> $DIR/fn-ptr.rs:11:21
3   |
4LL | #[target_feature(enable = "sse2")]
5   | ---------------------------------- `#[target_feature]` added here
6...
7LL |     let foo: fn() = foo;
8   |              ----   ^^^ cannot coerce functions with `#[target_feature]` to safe function pointers
9   |              |
10   |              expected due to this
11   |
12   = note: expected fn pointer `fn()`
13                 found fn item `fn() {foo}`
14   = note: fn items are distinct from fn pointers
15   = note: functions with `#[target_feature]` can only be coerced to `unsafe` function pointers
16help: consider casting to a fn pointer
17   |
18LL |     let foo: fn() = foo as fn();
19   |                     ~~~~~~~~~~~
20
21error: aborting due to previous error
22
23For more information about this error, try `rustc --explain E0308`.