Debian Codegraph @

gcc/testsuite/rust/compile/issue-1786.rs

raw
1 #[lang = "sized"]
2 pub trait Sized {}
3
4 #[lang = "clone"]
5 trait Clone {
6 fn clone(&self) -> Self;
7
8 fn clone_from(&mut self, source: &Self) {
9 *self = source.clone()
10 }
11 }
12
13 #[lang = "copy"]
14 pub trait Copy: Clone {
15 // Empty.
16 }
17
18 mod impls {
19 use super::Clone;
20
21 impl Clone for char {
22 fn clone(&self) -> Self {
23 *self
24 }
25 }
26 }