]> git.lizzy.rs Git - rust.git/blob - tests/ui/lang-items/missing-clone-for-suggestion.rs
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / ui / lang-items / missing-clone-for-suggestion.rs
1 // Avoid panicking if the Clone trait is not found while building error suggestions
2 // See #104870
3
4 #![feature(no_core, lang_items)]
5 #![no_core]
6
7 #[lang = "sized"]
8 trait Sized {}
9
10 #[lang = "copy"]
11 trait Copy {}
12
13 fn g<T>(x: T) {}
14
15 fn f(x: *mut u8) {
16     g(x);
17     g(x); //~ ERROR use of moved value: `x`
18 }
19
20 fn main() {}