]> git.lizzy.rs Git - rust.git/blob - tests/ui/trait-impl-bound-suggestions.rs
Rollup merge of #107091 - clubby789:infer-ftl-missing-dollar, r=compiler-errors
[rust.git] / tests / ui / trait-impl-bound-suggestions.rs
1 // run-rustfix
2
3 #[allow(unused)]
4 use std::fmt::Debug;
5 // Rustfix should add this, or use `std::fmt::Debug` instead.
6
7 #[allow(dead_code)]
8 struct ConstrainedStruct<X: Copy> {
9     x: X
10 }
11
12 #[allow(dead_code)]
13 trait InsufficientlyConstrainedGeneric<X=()> {
14     fn return_the_constrained_type(&self, x: X) -> ConstrainedStruct<X> {
15         //~^ ERROR the trait bound `X: Copy` is not satisfied
16         ConstrainedStruct { x }
17     }
18 }
19
20 pub fn main() { }