// run-rustfix #[allow(unused)] use std::fmt::Debug; // Rustfix should add this, or use `std::fmt::Debug` instead. #[allow(dead_code)] struct ConstrainedStruct { x: X } #[allow(dead_code)] trait InsufficientlyConstrainedGeneric { fn return_the_constrained_type(&self, x: X) -> ConstrainedStruct { //~^ ERROR the trait bound `X: Copy` is not satisfied ConstrainedStruct { x } } } pub fn main() { }