]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/object/lifetime-first.rs
Merge commit 'c4416f20dcaec5d93077f72470e83e150fb923b1' into sync-rustfmt
[rust.git] / src / test / ui / traits / object / lifetime-first.rs
1 // run-pass
2 use std::fmt::Display;
3
4 static BYTE: u8 = 33;
5
6 fn main() {
7     let x: &(dyn 'static + Display) = &BYTE;
8     let y: Box<dyn 'static + Display> = Box::new(BYTE);
9     let xstr = format!("{}", x);
10     let ystr = format!("{}", y);
11     assert_eq!(xstr, "33");
12     assert_eq!(ystr, "33");
13 }