rust/tests/ui/borrowck/move-error-suggest-clone-panic-issue-127915.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
377 B
Rust
Raw Permalink Normal View History

2024-07-18 20:34:32 -05:00
#![allow(dead_code)]
extern "C" {
fn rust_interesting_average(_: i64, ...) -> f64;
}
fn test<T, U>(a: i64, b: i64, c: i64, d: i64, e: i64, f: T, g: U) -> i64 {
unsafe {
rust_interesting_average(
6, a as f64, b, b as f64, f, c as f64, d, d as f64, e, e as f64, f, g, //~ ERROR use of moved value: `f` [E0382]
) as i64
}
}
fn main() {}