Matthias Krüger
ea2347843c
Rollup merge of #115363 - kpreid:suggest-private, r=compiler-errors
...
Don't suggest adding parentheses to call an inaccessible method.
Previously, code of this form would emit E0615 (attempt to use a method as a field), thus emphasizing the existence of private methods that the programmer probably does not care about. Now it ignores their existence instead, producing error E0609 (no field). The motivating example is:
```rust
let x = std::rc::Rc::new(());
x.inner;
```
which would previously mention the private method `Rc::inner()`, even though `Rc<T>` intentionally has no public methods so that it can be a transparent smart pointer for any `T`.
```rust
error[E0615]: attempted to take value of method `inner` on type `Rc<()>`
--> src/main.rs:3:3
|
3 | x.inner;
| ^^^^^ method, not a field
|
help: use parentheses to call the method
|
3 | x.inner();
| ++
```
With this change, it emits E0609 and no suggestion.
2023-08-30 07:18:13 +02:00
..
2023-08-27 11:55:49 +02:00
2023-04-25 00:08:35 +02:00
2023-04-25 00:08:35 +02:00
2023-07-24 16:29:58 +02:00
2023-08-03 10:34:57 +00:00
2023-08-26 19:25:46 +00:00
2023-08-04 13:17:39 +02:00
2023-08-14 14:07:46 -04:00
2023-08-25 19:05:38 +00:00
2023-08-03 02:18:52 +02:00
2023-08-29 20:27:38 +02:00
2023-08-28 17:47:37 -03:00
2023-08-28 19:53:57 +02:00
2023-08-07 21:14:28 +02:00
2023-08-28 03:16:48 -07:00
2023-06-22 23:31:06 +00:00
2023-04-13 22:08:07 -05:00
2023-04-28 20:28:56 -05:00
2023-08-01 10:08:17 +02:00
2023-08-23 21:46:18 +00:00
2023-07-10 20:09:26 +00:00
2023-07-14 07:12:35 +08:00
2023-08-28 03:16:48 -07:00
2023-06-24 21:45:17 +08:00
2023-08-14 23:02:36 +08:00
2023-05-12 00:10:52 +00:00
2023-02-21 05:21:07 +00:00
2023-08-29 13:53:34 +00:00
2023-07-27 14:07:08 -07:00
2023-07-10 20:09:28 +00:00
2023-08-02 14:54:37 +08:00
2023-08-15 03:44:21 +00:00
2023-05-30 13:03:40 +02:00
2023-07-26 00:05:00 +08:00
2023-06-29 23:31:25 +08:00
2023-08-06 15:06:40 +02:00
2023-08-26 19:25:46 +00:00
2023-08-02 18:51:50 +02:00
2023-08-25 19:05:38 +00:00
2023-04-15 16:11:42 -07:00
2023-08-22 00:00:00 +00:00
2023-05-12 00:10:52 +00:00
2023-07-18 21:53:34 -04:00
2023-08-26 16:54:28 +00:00
2023-05-05 01:22:17 -05:00
2023-08-21 12:51:51 +03:00
2023-04-12 22:50:10 +00:00
2023-04-27 01:34:03 +00:00
2023-07-16 15:02:08 -07:00
2023-07-17 22:06:32 +00:00
2023-07-28 13:28:02 +02:00
2023-06-29 23:31:25 +08:00
2023-07-24 12:25:05 +01:00
2023-08-14 21:43:56 +00:00
2023-05-21 14:16:41 +02:00
2023-07-22 19:57:35 +02:00
2023-08-03 23:47:57 +08:00
2023-07-05 19:52:28 -04:00
2023-08-03 15:12:44 +02:00
2023-05-26 13:15:15 -04:00
2023-06-10 00:06:34 +08:00
2023-06-19 16:22:21 +01:00
2023-06-08 12:33:17 +00:00
2023-08-29 14:47:28 -07:00
2023-02-28 14:58:14 -08:00
2023-05-21 14:16:41 +02:00
2023-06-26 08:56:32 +00:00
2023-02-23 19:05:13 +09:00
2023-05-11 21:41:07 +01:00
2023-08-28 03:16:48 -07:00
2023-05-05 13:02:43 -07:00
2023-08-24 12:52:35 +00:00
2023-08-28 03:16:48 -07:00
2023-05-08 17:58:01 -03:00
2023-08-07 19:06:18 +00:00
2023-06-12 20:24:48 +08:00
2023-08-26 01:07:05 +00:00
2023-08-28 19:53:57 +02:00
2023-08-26 19:35:54 +00:00
2023-08-25 19:05:38 +00:00
2023-07-27 14:07:08 -07:00
2023-04-03 15:59:21 +00:00
2023-07-10 20:09:26 +00:00
2023-07-27 10:17:01 +02:00
2023-08-09 01:10:08 +00:00
2023-07-29 11:42:50 +02:00
2023-08-28 19:57:32 +00:00
2023-08-20 21:13:52 -04:00
2023-08-02 13:46:54 +02:00
2023-02-13 18:41:18 +00:00
2023-08-04 13:17:39 +02:00
2023-08-28 17:17:11 +00:00
2023-07-18 21:53:34 -04:00
2023-08-18 17:07:07 +01:00
2023-05-03 20:09:10 +03:00
2023-08-15 01:03:09 +00:00
2023-04-13 22:08:07 -05:00
2023-08-04 21:31:57 +02:00
2023-08-05 01:38:14 +08:00
2023-04-25 15:25:19 +00:00
2023-08-29 13:53:34 +00:00
2023-08-26 19:25:46 +00:00
2023-08-28 03:16:48 -07:00
2023-03-12 13:19:46 +00:00
2023-03-07 21:26:19 +01:00
2023-08-29 20:49:02 +02:00
2023-08-26 20:10:19 +00:00
2023-06-08 16:30:05 +00:00
2023-07-29 08:47:21 +08:00
2023-08-08 14:48:17 +08:00
2023-07-29 13:18:17 -04:00
2023-07-05 19:52:28 -04:00
2023-08-23 11:27:33 +02:00
2023-07-14 07:12:35 +08:00
2023-08-28 17:47:37 -03:00
2023-08-07 15:59:15 -07:00
2023-08-28 17:47:37 -03:00
2023-04-12 22:50:10 +00:00
2023-03-22 11:37:57 +01:00
2023-08-16 09:19:38 +00:00
2023-04-18 07:14:01 -05:00
2023-08-28 17:47:37 -03:00
2023-08-17 17:02:04 +00:00
2023-08-28 17:47:37 -03:00
2023-06-10 00:06:34 +08:00
2023-07-19 23:48:43 +00:00
2023-03-22 21:12:40 -07:00
2023-08-28 17:47:37 -03:00
2023-08-28 03:16:48 -07:00
2023-04-12 22:50:10 +00:00
2023-05-05 18:54:06 +01:00
2023-08-26 19:25:46 +00:00
2023-08-06 21:20:15 +02:00
2023-04-03 09:24:11 +02:00
2023-03-22 21:12:40 -07:00
2023-05-03 20:09:10 +03:00
2023-07-29 11:42:50 +02:00
2023-08-26 19:35:54 +00:00
2023-06-21 11:43:14 +03:00
2023-08-26 19:25:46 +00:00
2023-08-18 15:08:07 +01:00
2023-06-15 12:01:38 +02:00
2023-08-07 15:42:24 +02:00
2023-04-29 13:01:46 +01:00
2023-08-27 20:02:46 +02:00
2023-08-30 07:18:10 +02:00
2023-08-21 11:18:20 +08:00
2023-07-28 14:44:03 +00:00
2023-06-12 20:24:48 +08:00
2023-08-29 08:58:58 +02:00
2023-08-05 00:38:52 +00:00
2023-08-09 22:59:58 +02:00
2023-07-29 11:47:26 +02:00
2023-06-29 16:24:07 +03:00
2023-06-27 23:31:06 +00:00
2023-06-22 16:50:31 +00:00
2023-08-28 03:16:48 -07:00
2023-07-21 22:35:57 -07:00
2023-08-09 01:10:08 +00:00
2023-04-12 22:50:10 +00:00
2023-08-20 13:22:39 +00:00
2023-08-28 17:47:37 -03:00
2023-08-10 02:26:11 +02:00
2023-08-26 19:35:54 +00:00
2023-07-19 14:47:06 +00:00
2023-04-03 09:24:11 +02:00
2023-06-29 13:42:58 +03:00
2023-04-12 22:50:10 +00:00
2023-03-30 22:56:52 +02:00
2023-08-10 11:00:06 +02:00
2023-08-04 16:19:55 +00:00
2023-04-12 22:50:10 +00:00
2023-08-03 09:29:00 +00:00
2023-02-14 03:46:43 +00:00
2023-07-21 22:35:57 -07:00
2023-08-18 15:08:07 +01:00
2023-06-28 17:51:01 +00:00
2023-08-06 13:34:53 +00:00
2023-04-19 19:13:45 +00:00
2023-08-28 03:16:48 -07:00
2023-04-04 15:34:40 +00:00
2023-08-14 16:57:51 -07:00
2023-08-28 03:16:48 -07:00
2023-05-08 03:36:30 +00:00
2023-06-22 16:50:31 +00:00
2023-08-24 20:44:08 +03:00
2023-08-28 03:16:48 -07:00
2023-06-01 18:21:42 +00:00
2023-03-29 18:04:44 -04:00
2023-08-15 00:57:18 +08:00
2023-08-15 16:53:10 -04:00
2023-07-14 13:27:35 +01:00
2023-04-26 22:34:30 -04:00
2023-07-29 11:42:50 +02:00
2023-04-07 08:33:56 +01:00
2023-08-24 15:51:25 +02:00
2023-08-25 19:05:38 +00:00
2023-08-29 19:03:08 +00:00
2023-07-18 09:07:32 +00:00
2023-07-21 22:35:57 -07:00
2023-07-29 11:42:50 +02:00
2023-05-21 14:16:41 +02:00
2023-06-12 20:24:48 +08:00
2023-08-28 17:47:37 -03:00
2023-06-12 20:24:48 +08:00
2023-08-05 15:36:19 +02:00
2023-07-30 11:24:15 +02:00
2023-07-18 21:53:34 -04:00
2023-08-28 19:53:57 +02:00
2023-07-04 05:00:46 -04:00
2023-08-30 07:18:11 +02:00
2023-08-26 19:25:46 +00:00
2023-05-26 16:01:29 +01:00
2023-07-23 07:09:14 +00:00
2023-06-30 00:34:14 +00:00
2023-06-27 17:10:14 +00:00
2023-08-24 11:17:54 +08:00
2023-08-22 18:58:39 +08:00
2023-07-20 11:04:31 -07:00
2023-04-12 22:50:10 +00:00
2023-07-15 11:59:38 -04:00
2023-08-26 01:07:05 +00:00
2023-06-13 07:02:28 +02:00
2023-04-29 13:01:46 +01:00
2023-08-02 15:30:24 +00:00
2023-04-02 19:42:30 -04:00
2023-04-02 19:42:30 -04:00
2023-05-12 00:10:52 +00:00
2023-08-15 01:03:09 +00:00
2023-03-01 13:26:59 +01:00
2023-06-22 16:50:31 +00:00
2023-06-28 18:08:21 +00:00
2023-06-12 20:24:48 +08:00
2023-05-09 20:35:39 -04:00
2023-05-09 20:35:39 -04:00
2023-08-27 20:02:46 +02:00
2023-02-18 02:42:43 +00:00
2023-07-10 20:09:26 +00:00
2023-03-12 13:19:46 +00:00
2023-03-12 13:19:46 +00:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-05-21 13:37:32 +02:00
2023-05-09 20:35:39 -04:00
2023-06-12 20:24:48 +08:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00
2023-02-22 08:40:47 -07:00
2023-04-13 22:10:26 -05:00
2023-05-21 14:16:41 +02:00
2023-05-21 14:16:41 +02:00
2023-05-10 19:36:02 +02:00
2023-04-13 22:08:07 -05:00
2023-04-13 22:10:26 -05:00
2023-04-13 22:08:07 -05:00
2023-04-13 22:08:07 -05:00
2023-04-13 22:08:07 -05:00
2023-04-13 22:08:07 -05:00
2023-02-13 18:41:18 +00:00
2023-04-17 22:40:31 -05:00
2023-04-17 22:40:31 -05:00
2023-04-17 22:40:31 -05:00
2023-08-04 16:09:14 +00:00
2023-04-13 22:08:07 -05:00
2023-08-28 03:16:48 -07:00
2023-08-28 03:16:48 -07:00
2023-08-28 03:16:48 -07:00
2023-08-28 03:16:48 -07:00
2023-08-28 03:16:48 -07:00
2023-04-12 22:50:10 +00:00
2023-04-25 00:08:33 +02:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00
2023-05-04 15:39:21 +02:00
2023-08-28 03:16:48 -07:00
2023-06-12 20:24:48 +08:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-03-26 17:30:29 +00:00
2023-06-08 16:17:30 +00:00
2023-08-25 19:05:38 +00:00
2023-07-10 20:09:26 +00:00
2023-02-28 15:59:47 +01:00
2023-06-19 20:22:35 -07:00