mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +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() {}
|