mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 11:34:11 +00:00
14 lines
378 B
Rust
14 lines
378 B
Rust
// check-pass
|
|
// compile-flags: -Znext-solver
|
|
|
|
use std::fmt::Display;
|
|
|
|
fn box_dyn_display(_: Box<dyn Display>) {}
|
|
|
|
fn main() {
|
|
// During coercion, we don't necessarily know whether `{integer}` implements
|
|
// `Display`. Before, that would cause us to bail out in the coercion loop when
|
|
// checking `{integer}: Unsize<dyn Display>`.
|
|
box_dyn_display(Box::new(1));
|
|
}
|