diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2016-10-26 20:51:49 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2016-11-08 14:17:18 -0800 |
| commit | 3edb4fc56345ba2d33a04e952e1d402b08bc676c (patch) | |
| tree | 417fc24e1e68f842d207b3738890876466cb6652 /src/test/ui/codemap_tests | |
| parent | b5f6d7ec2d4e231b9ef0c8a9e8e7ec8a7f67d2ae (diff) | |
| download | rust-3edb4fc56345ba2d33a04e952e1d402b08bc676c.tar.gz rust-3edb4fc56345ba2d33a04e952e1d402b08bc676c.zip | |
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
```
Diffstat (limited to 'src/test/ui/codemap_tests')
| -rw-r--r-- | src/test/ui/codemap_tests/two_files.stderr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/ui/codemap_tests/two_files.stderr b/src/test/ui/codemap_tests/two_files.stderr index d58e7148f61..d05e6eb2bbe 100644 --- a/src/test/ui/codemap_tests/two_files.stderr +++ b/src/test/ui/codemap_tests/two_files.stderr @@ -2,7 +2,7 @@ error[E0404]: `Bar` is not a trait --> $DIR/two_files.rs:15:6 | 15 | impl Bar for Baz { } - | ^^^ not a trait + | ^^^ expected trait, found type alias | = note: type aliases cannot be used for traits |
