rust/tests/ui/traits/next-solver/unsize-although-ambiguous.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
378 B
Rust
Raw Normal View History

// check-pass
2023-12-14 06:11:28 -06:00
// 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));
}