summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/next-solver/unsize-although-ambiguous.rs
blob: 8217701b9f8e00964b03aea1c7be08d7725b94e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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));
}