bors
6a6a262f7b
Auto merge of #109010 - compiler-errors:rtn, r=eholk
...
Initial support for return type notation (RTN)
See: https://smallcultfollowing.com/babysteps/blog/2023/02/13/return-type-notation-send-bounds-part-2/
1. Only supports `T: Trait<method(): Send>` style bounds, not `<T as Trait>::method(): Send`. Checking validity and injecting an implicit binder for all of the late-bound method generics is harder to do for the latter.
* I'd add this in a follow-up.
3. ~Doesn't support RTN in general type position, i.e. no `let x: <T as Trait>::method() = ...`~
* I don't think we actually want this.
5. Doesn't add syntax for "eliding" the function args -- i.e. for now, we write `method(): Send` instead of `method(..): Send`.
* May be a hazard if we try to add it in the future. I'll probably add it in a follow-up later, with a structured suggestion to change `method()` to `method(..)` once we add it.
7. ~I'm not in love with the feature gate name 😺 ~
* I renamed it to `return_type_notation` ✔️
Follow-up PRs will probably add support for `where T::method(): Send` bounds. I'm not sure if we ever want to support return-type-notation in arbitrary type positions. I may also make the bounds require `..` in the args list later.
r? `@ghost`
2023-03-31 18:04:12 +00:00
..
2022-10-06 09:44:38 +02:00
2023-03-10 10:53:50 +01:00
2023-03-24 14:26:19 +01:00
2023-03-24 14:26:19 +01:00
2023-03-24 14:26:19 +01:00
2023-03-24 14:26:19 +01:00
2022-11-16 09:41:28 +11:00
2023-03-10 10:53:50 +01:00
2023-03-11 12:55:44 +01:00
2023-03-28 01:14:28 +00:00
2023-03-24 14:26:19 +01:00
2023-03-24 14:26:19 +01:00
2023-03-24 14:26:19 +01:00
2023-03-10 10:53:50 +01:00
2022-12-01 18:29:38 +01:00
2022-07-28 19:08:22 +02:00
2022-10-06 09:44:38 +02:00
2022-10-06 09:44:38 +02:00
2022-10-06 09:44:38 +02:00
2022-09-09 13:36:26 +02:00
2023-01-12 17:14:17 +00:00
2022-11-21 20:51:52 +01:00
2022-10-06 09:44:38 +02:00
2023-02-10 14:01:19 +01:00
2022-11-21 20:51:52 +01:00
2023-03-24 14:26:19 +01:00
2022-08-31 09:24:45 -04:00
2023-02-25 19:28:50 -05:00
2022-12-01 18:29:38 +01:00
2023-03-21 15:38:51 +00:00
2022-12-01 18:29:38 +01:00
2023-03-10 10:53:50 +01:00
2022-10-23 15:18:45 +02:00
2023-03-24 14:26:19 +01:00
2023-02-16 17:05:56 -07:00
2022-11-22 09:04:15 +11:00
2022-08-11 19:42:16 +02:00
2023-01-12 19:48:13 +01:00
2023-03-24 14:26:19 +01:00
2023-03-10 10:53:50 +01:00
2023-02-16 17:05:56 -07:00
2022-10-29 20:28:38 +11:00
2023-03-24 14:26:19 +01:00
2022-06-30 10:50:09 +02:00
2023-03-10 10:53:50 +01:00
2023-03-21 15:38:51 +00:00
2023-03-24 14:26:19 +01:00
2022-12-17 14:12:54 +01:00
2022-11-21 20:51:52 +01:00
2022-08-11 19:42:16 +02:00
2022-10-06 09:44:38 +02:00
2022-12-01 18:51:05 +03:00
2023-02-25 19:28:50 -05:00
2022-11-17 13:45:59 +11:00
2023-01-12 19:48:13 +01:00
2022-08-31 09:24:45 -04:00
2022-06-04 13:34:07 +02:00
2022-07-18 09:39:37 +02:00
2023-02-16 17:05:56 -07:00
2023-01-12 19:48:13 +01:00
2023-02-25 19:28:50 -05:00
2023-02-16 17:05:56 -07:00
2023-01-27 21:09:08 +01:00
2022-11-21 20:51:52 +01:00
2023-01-28 09:51:50 +00:00
2023-02-22 17:04:58 +00:00
2023-02-10 14:01:19 +01:00
2023-01-28 09:51:50 +00:00
2023-03-10 10:53:50 +01:00
2022-10-06 09:44:38 +02:00
2023-02-25 19:28:50 -05:00
2023-01-14 00:29:56 -07:00
2022-10-06 09:44:38 +02:00
2022-12-29 14:28:34 +01:00
2023-03-10 10:53:50 +01:00
2023-02-25 19:28:50 -05:00
2022-10-06 09:44:38 +02:00
2022-11-18 06:16:20 +00:00
2023-03-10 10:53:50 +01:00
2022-10-06 09:44:38 +02:00
2023-01-14 00:29:56 -07:00
2023-01-27 21:09:08 +01:00
2022-11-18 06:16:20 +00:00
2023-03-21 09:57:20 +01:00
2022-09-05 22:25:57 +09:00
2023-03-24 14:26:19 +01:00
2022-11-21 20:51:52 +01:00
2023-01-28 09:51:50 +00:00
2023-03-10 10:53:50 +01:00
2023-02-16 17:05:56 -07:00
2023-02-25 19:28:50 -05:00
2023-01-04 00:43:13 +00:00
2023-02-14 08:51:19 +00:00
2023-03-14 17:18:26 +00:00
2023-02-16 17:05:56 -07:00
2023-01-28 09:51:50 +00:00
2022-10-06 09:44:38 +02:00
2023-03-10 10:53:50 +01:00
2022-11-21 20:51:52 +01:00
2022-11-21 20:51:52 +01:00
2022-12-02 10:38:58 +11:00
2022-06-16 17:39:06 +02:00
2023-02-10 14:01:19 +01:00
2023-02-15 08:56:18 +00:00
2023-02-16 17:05:56 -07:00
2022-12-02 10:38:58 +11:00
2023-02-15 08:56:18 +00:00
2023-03-10 10:53:50 +01:00
2022-10-27 18:41:26 +04:00
2023-03-10 10:53:50 +01:00
2023-03-24 14:26:19 +01:00
2023-03-29 18:04:44 -04:00
2023-02-25 19:28:50 -05:00
2023-02-25 19:28:50 -05:00
2022-12-01 18:51:05 +03:00
2022-05-21 13:24:00 +02:00
2023-02-10 14:01:19 +01:00
2023-03-24 14:26:19 +01:00
2023-03-10 10:53:50 +01:00
2023-03-24 14:26:19 +01:00
2023-03-10 10:53:50 +01:00
2023-02-25 19:28:50 -05:00
2023-03-24 14:26:19 +01:00
2023-03-02 23:46:44 +04:00
2023-03-10 10:53:50 +01:00
2022-12-17 14:12:54 +01:00
2022-11-18 06:16:20 +00:00
2022-12-29 14:28:34 +01:00
2023-01-26 20:28:25 -07:00
2023-03-10 10:53:50 +01:00
2022-12-01 18:29:38 +01:00
2022-10-06 09:44:38 +02:00
2023-03-24 14:26:19 +01:00
2022-10-23 15:18:45 +02:00
2023-03-10 10:53:50 +01:00
2023-01-28 09:51:50 +00:00
2023-03-10 10:53:50 +01:00
2022-12-01 18:51:05 +03:00
2023-01-14 00:29:56 -07:00
2023-01-27 21:09:08 +01:00
2023-01-04 00:43:13 +00:00
2023-02-25 19:28:50 -05:00
2022-08-31 09:24:45 -04:00
2023-03-10 10:53:50 +01:00
2023-03-24 14:26:19 +01:00
2022-12-28 18:52:36 +01:00
2023-02-16 17:05:56 -07:00
2022-10-06 09:44:38 +02:00
2023-01-12 19:48:13 +01:00
2022-12-28 18:52:36 +01:00
2023-03-24 14:26:19 +01:00
2022-11-21 20:51:52 +01:00
2022-11-21 20:51:52 +01:00
2022-10-23 15:18:45 +02:00
2022-12-29 14:28:34 +01:00
2022-06-16 17:39:06 +02:00
2023-03-26 20:33:54 +00:00
2023-03-02 23:46:44 +04:00
2022-06-16 17:39:06 +02:00
2022-11-21 20:39:29 +00:00
2023-03-10 10:53:50 +01:00
2023-02-16 17:05:56 -07:00
2023-03-14 17:18:26 +00:00
2023-03-24 14:26:19 +01:00
2023-02-16 17:05:56 -07:00
2022-10-06 09:44:38 +02:00
2023-03-10 10:53:50 +01:00
2023-01-14 00:29:56 -07:00
2022-10-23 15:18:45 +02:00
2022-12-29 14:28:34 +01:00
2023-01-27 21:09:08 +01:00
2022-11-17 13:45:59 +11:00
2023-03-24 14:26:19 +01:00
2023-01-28 09:51:50 +00:00
2022-10-23 15:18:45 +02:00
2023-03-21 15:38:51 +00:00
2022-11-21 20:51:52 +01:00
2023-01-28 09:51:50 +00:00
2023-01-28 09:51:50 +00:00
2023-03-10 10:53:50 +01:00
2022-11-17 13:45:59 +11:00
2022-11-21 20:51:52 +01:00
2023-02-16 03:39:59 +00:00
2023-02-25 19:28:50 -05:00
2022-11-21 20:51:52 +01:00
2023-01-12 19:48:13 +01:00
2022-08-31 09:24:45 -04:00
2022-10-06 09:44:38 +02:00
2023-03-27 18:56:19 +02:00
2023-01-28 09:51:50 +00:00
2022-12-01 18:29:38 +01:00
2022-12-01 18:29:38 +01:00
2022-12-17 14:12:54 +01:00
2023-02-24 07:32:24 +11:00
2022-12-28 18:52:36 +01:00
2023-03-28 01:14:28 +00:00
2022-06-16 17:39:06 +02:00
2023-02-10 14:01:19 +01:00
2023-01-12 19:48:13 +01:00
2023-02-10 14:01:19 +01:00
2023-02-25 19:28:50 -05:00
2023-02-14 19:55:44 +00:00
2023-02-16 17:05:56 -07:00
2023-02-10 14:01:19 +01:00
2023-03-24 14:26:19 +01:00
2023-03-14 17:18:26 +00:00
2023-03-24 14:26:19 +01:00
2022-06-16 17:39:06 +02:00
2022-12-01 18:51:20 +03:00
2022-09-05 22:25:57 +09:00
2023-03-10 10:53:50 +01:00
2022-11-21 20:51:52 +01:00
2023-03-02 23:46:44 +04:00
2023-02-13 19:06:22 +00:00
2022-10-06 09:44:38 +02:00
2023-03-19 19:01:31 +01:00
2022-10-29 16:04:10 -05:00
2023-01-27 21:09:08 +01:00
2022-10-06 09:44:38 +02:00
2023-03-24 14:26:19 +01:00
2022-05-21 13:24:00 +02:00
2022-10-06 09:44:38 +02:00
2023-02-14 08:51:19 +00:00
2022-10-06 09:44:38 +02:00
2023-01-27 21:09:08 +01:00
2022-08-31 09:24:45 -04:00
2022-10-06 09:44:38 +02:00
2023-01-26 20:28:25 -07:00
2023-02-26 09:15:54 +00:00
2022-12-01 18:51:20 +03:00
2023-03-24 14:26:19 +01:00
2023-01-28 09:51:50 +00:00
2023-02-25 19:28:50 -05:00
2022-12-01 18:51:20 +03:00
2023-01-28 09:51:50 +00:00
2023-02-10 14:01:19 +01:00
2022-11-21 20:51:52 +01:00
2022-12-01 18:29:38 +01:00
2023-01-12 19:48:13 +01:00
2022-11-21 20:51:52 +01:00
2023-01-28 09:51:50 +00:00
2023-01-28 09:51:50 +00:00
2022-10-29 20:28:38 +11:00
2023-03-28 01:14:28 +00:00
2023-03-24 14:26:19 +01:00
2022-09-09 13:36:26 +02:00
2022-06-16 17:39:06 +02:00
2023-03-24 14:26:19 +01:00
2023-03-10 10:53:50 +01:00
2022-10-06 09:44:38 +02:00
2023-02-22 17:04:58 +00:00