]> git.proxmox.com Git - rustc.git/blame - src/test/ui/trait-impl-bound-suggestions.fixed
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / trait-impl-bound-suggestions.fixed
CommitLineData
1b1a35ee
XL
1// run-rustfix
2
3#[allow(unused)]
4use std::fmt::Debug;
5// Rustfix should add this, or use `std::fmt::Debug` instead.
6
7#[allow(dead_code)]
8struct ConstrainedStruct<X: Copy> {
9 x: X
10}
11
12#[allow(dead_code)]
cdc7bbd5 13trait InsufficientlyConstrainedGeneric<X=()> where X: std::marker::Copy {
1b1a35ee
XL
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
20pub fn main() { }