summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-trait/universal_multiple_bounds.rs
blob: 40c1405c39be1dbf85d1fbac0ca928c1f48422fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass

use std::fmt::Display;

fn foo(f: impl Display + Clone) -> String {
    let g = f.clone();
    format!("{} + {}", f, g)
}

fn main() {
    let sum = foo(format!("22"));
    assert_eq!(sum, r"22 + 22");
}