]>
Commit | Line | Data |
---|---|---|
1a4d82fc JJ |
1 | // Copyright 2013 The Rust Project Developers. See the COPYRIGHT |
2 | // file at the top-level directory of this distribution and at | |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | ||
11 | #![allow(dead_code)] | |
12 | #![deny(raw_pointer_derive)] | |
13 | ||
14 | #[derive(Clone)] | |
15 | struct Foo { | |
16 | x: *const isize //~ ERROR use of `#[derive]` with a raw pointer | |
17 | } | |
18 | ||
19 | #[derive(Clone)] | |
20 | struct Bar(*mut isize); //~ ERROR use of `#[derive]` with a raw pointer | |
21 | ||
22 | #[derive(Clone)] | |
23 | enum Baz { | |
24 | A(*const isize), //~ ERROR use of `#[derive]` with a raw pointer | |
25 | B { x: *mut isize } //~ ERROR use of `#[derive]` with a raw pointer | |
26 | } | |
27 | ||
28 | #[derive(Clone)] | |
29 | struct Buzz { | |
30 | x: (*const isize, //~ ERROR use of `#[derive]` with a raw pointer | |
31 | *const usize) //~ ERROR use of `#[derive]` with a raw pointer | |
32 | } | |
33 | ||
34 | fn main() {} |