2019-11-03 18:00:00 -06:00
|
|
|
// check-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2013-09-16 08:05:47 -05:00
|
|
|
/*
|
|
|
|
|
|
|
|
#7673 Polymorphically creating traits barely works
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2015-01-07 19:25:56 -06:00
|
|
|
#![feature(box_syntax)]
|
2014-05-05 20:56:44 -05:00
|
|
|
|
2013-09-25 02:43:37 -05:00
|
|
|
pub fn main() {}
|
2013-09-16 08:05:47 -05:00
|
|
|
|
2015-02-12 09:29:52 -06:00
|
|
|
trait A {
|
|
|
|
fn dummy(&self) { }
|
|
|
|
}
|
|
|
|
|
2013-09-16 08:05:47 -05:00
|
|
|
impl<T: 'static> A for T {}
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
fn owned2<T: 'static>(a: Box<T>) { a as Box<dyn A>; }
|
|
|
|
fn owned3<T: 'static>(a: Box<T>) { box a as Box<dyn A>; }
|