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.
11 #![feature(tool_lints)]
14 #![deny(clippy::borrowed_box)]
15 #![allow(clippy::blacklisted_name)]
16 #![allow(unused_variables)]
19 pub fn test1(foo: &mut Box<bool>) {
32 fn test4(a: &Box<bool>);
35 impl<'a> Test4 for Test3<'a> {
36 fn test4(a: &Box<bool>) {
43 pub fn test5(foo: &mut Box<Any>) {
56 fn test8(a: &Box<Any>);
59 impl<'a> Test8 for Test7<'a> {
60 fn test8(a: &Box<Any>) {
65 pub fn test9(foo: &mut Box<Any + Send + Sync>) {
70 let foo: &Box<Any + Send + 'static>;
74 foo: &'a Box<Any + Send>
78 fn test4(a: &Box<Any + 'static>);
81 impl<'a> Test12 for Test11<'a> {
82 fn test4(a: &Box<Any + 'static>) {
88 test1(&mut Box::new(false));
90 test5(&mut (Box::new(false) as Box<Any>));
92 test9(&mut (Box::new(false) as Box<Any + Send + Sync>));