bors e255f36afe Auto merge of #4365 - lukas-code:async_new_ret_no_self, r=flip1995
new_ret_no_self: allow Self in inner type for impl Trait return types

Check the inner types of associated types of a trait when checking for Self in the return type of a `new` method. This means that the following will no longer warn:
```rust
trait Trait {
    type Inner;
}

struct S;

impl S {
    fn new() -> impl Trait<Inner = Option<Self>> {
        struct TraitImpl;

        impl Trait for TraitImpl {
            type Inner = Option<S>;
        }

        TraitImpl
    }
}
```
```rust
#![feature(async_await)]

struct Connection;

impl Connection {
    async fn new() -> Result<Self, ()> {
        Ok(S)
    }
}
```
closes #4359

changelog: fix `new_ret_no_self` lint for async `new` functions.
2019-08-12 05:15:16 +00:00
..
2019-05-28 15:34:25 +02:00
2019-08-01 07:09:57 +02:00
2019-01-21 13:59:49 +01:00
2019-01-08 21:46:39 +01:00
2019-03-07 23:26:47 +09:00
2019-03-10 22:07:10 +01:00
2019-08-09 12:39:33 +07:00
2019-01-27 13:46:22 +01:00
2019-01-08 21:46:39 +01:00
2019-07-19 07:29:25 +02:00
2019-03-10 22:07:10 +01:00
2019-02-18 19:36:58 -07:00
2019-08-01 07:09:57 +02:00
2019-05-12 13:07:58 +02:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-04-30 16:45:28 -03:00
2019-04-30 16:45:28 -03:00
2019-04-30 16:45:28 -03:00
2019-04-30 16:45:28 -03:00
2019-07-27 22:53:26 +01:00
2019-07-27 22:53:26 +01:00
2019-03-09 13:48:06 -08:00
2019-05-08 09:24:24 +02:00
2019-05-08 09:24:24 +02:00
2019-02-17 01:50:31 +01:00
2019-02-17 01:50:31 +01:00
2019-07-01 15:53:48 +02:00
2019-01-08 21:46:39 +01:00
2019-07-16 21:28:03 +02:00
2019-04-02 11:39:43 -03:00
2019-03-07 23:26:47 +09:00
2019-08-01 22:20:08 +09:00
2019-04-25 19:41:23 -07:00
2019-05-14 13:46:10 +02:00
2019-03-19 06:57:41 +01:00
2019-03-19 06:57:41 +01:00
2019-04-01 20:37:05 +02:00
2019-07-01 07:22:04 +02:00
2019-01-08 21:46:39 +01:00
2019-05-12 10:18:38 +02:00
2019-05-12 10:18:38 +02:00
2019-01-08 21:46:39 +01:00
2019-02-24 18:23:54 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-06-14 10:45:03 +02:00
2019-06-14 10:45:03 +02:00
2019-07-06 12:34:32 +07:00
2019-07-06 12:34:32 +07:00
2019-07-06 12:34:32 +07:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-04-02 11:39:43 -03:00
2019-08-08 20:22:52 +07:00
2019-01-13 19:57:19 +01:00
2019-01-13 19:57:19 +01:00
2019-03-10 18:06:28 +00:00
2019-01-29 07:22:08 +02:00
2019-01-29 07:22:08 +02:00
2019-03-10 18:13:15 +00:00
2019-08-01 07:09:57 +02:00
2019-08-01 07:09:57 +02:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-05-08 09:24:24 +02:00
2019-02-18 22:56:43 +00:00
2019-02-18 22:56:43 +00:00