]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/lint-missing-copy-implementations-allow.rs
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / lint-missing-copy-implementations-allow.rs
1 // check-pass
2 #![deny(missing_copy_implementations)]
3
4 // Don't recommend implementing Copy on something stateful like an iterator.
5 pub struct MyIterator {
6     num: u8,
7 }
8
9 impl Iterator for MyIterator {
10     type Item = u8;
11
12     fn next(&mut self) -> Option<Self::Item> {
13         todo!()
14     }
15 }
16
17 pub struct Handle {
18     inner: *mut (),
19 }
20
21 pub struct Handle2 {
22     inner: *const (),
23 }
24
25 pub enum MaybeHandle {
26     Ptr(*mut ()),
27 }
28
29 pub union UnionHandle {
30     ptr: *mut (),
31 }
32
33 pub struct Array([u8; 2048]);
34
35 fn main() {}