1 // Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
10 #![deny(clippy::borrowed_box)]
11 #![allow(clippy::blacklisted_name)]
12 #![allow(unused_variables)]
15 pub fn test1(foo: &mut Box<bool>) {
28 fn test4(a: &Box<bool>);
31 impl<'a> Test4 for Test3<'a> {
32 fn test4(a: &Box<bool>) {
39 pub fn test5(foo: &mut Box<Any>) {
52 fn test8(a: &Box<Any>);
55 impl<'a> Test8 for Test7<'a> {
56 fn test8(a: &Box<Any>) {
61 pub fn test9(foo: &mut Box<Any + Send + Sync>) {
66 let foo: &Box<Any + Send + 'static>;
70 foo: &'a Box<Any + Send>,
74 fn test4(a: &Box<Any + 'static>);
77 impl<'a> Test12 for Test11<'a> {
78 fn test4(a: &Box<Any + 'static>) {
84 test1(&mut Box::new(false));
86 test5(&mut (Box::new(false) as Box<Any>));
88 test9(&mut (Box::new(false) as Box<Any + Send + Sync>));