Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point to type argument span when used as trait #37428

Merged
merged 1 commit into from
Nov 9, 2016

Commits on Nov 8, 2016

  1. 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
    ```
    estebank committed Nov 8, 2016
    Configuration menu
    Copy the full SHA
    3edb4fc View commit details
    Browse the repository at this point in the history