]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/object/lifetime-first.rs
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=petrochenkov
[rust.git] / tests / 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 }