mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
21 lines
319 B
Rust
21 lines
319 B
Rust
// Avoid panicking if the Clone trait is not found while building error suggestions
|
|
// See #104870
|
|
|
|
#![feature(no_core, lang_items)]
|
|
#![no_core]
|
|
|
|
#[lang = "sized"]
|
|
trait Sized {}
|
|
|
|
#[lang = "copy"]
|
|
trait Copy {}
|
|
|
|
fn g<T>(x: T) {}
|
|
|
|
fn f(x: *mut u8) {
|
|
g(x);
|
|
g(x); //~ ERROR use of moved value: `x`
|
|
}
|
|
|
|
fn main() {}
|