2024-02-16 20:02:50 +00:00
|
|
|
//@ check-pass
|
|
|
|
|
//@ compile-flags: -Znext-solver
|
2023-07-04 21:43:21 +00:00
|
|
|
|
|
|
|
|
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));
|
|
|
|
|
}
|