]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrow_box.rs
Merge pull request #1919 from rust-lang-nursery/ui
[rust.git] / tests / ui / borrow_box.rs
1 #![feature(plugin)]
2 #![plugin(clippy)]
3
4 #![deny(borrowed_box)]
5 #![allow(blacklisted_name)]
6 #![allow(unused_variables)]
7 #![allow(dead_code)]
8
9 pub fn test1(foo: &mut Box<bool>) {
10     println!("{:?}", foo)
11 }
12
13 pub fn test2() {
14     let foo: &Box<bool>;
15 }
16
17 struct Test3<'a> {
18     foo: &'a Box<bool>
19 }
20
21 trait Test4 {
22     fn test4(a: &Box<bool>);
23 }
24
25 impl<'a> Test4 for Test3<'a> {
26     fn test4(a: &Box<bool>) {
27         unimplemented!();
28     }
29 }
30
31 fn main(){
32     test1(&mut Box::new(false));
33     test2();
34 }