Rollup merge of #37428 - estebank:generic-type-error-span, r=sanxiyn
Point to type argument span when used as trait Given the following code: ``` rust struct Foo<T: Clone>(T); use std::ops::Add; impl<T: Clone, Add> Add for Foo<T> { type Output = usize; fn add(self, rhs: Self) -> Self::Output { unimplemented!(); } } ``` present the following output: ``` nocode error[E0404]: `Add` is not a trait --> file3.rs:5:21 | 5 | impl<T: Clone, Add> Add for Okok<T> { | --- ^^^ expected trait, found type parameter | | | type parameter defined here ``` Fixes #35987.
Showing
src/test/ui/span/issue-35987.rs
0 → 100644
想要评论请 注册 或 登录