Files
rust/tests/ui
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-08-28 17:47:37 -03:00
2023-08-15 03:44:21 +00:00
2023-05-30 13:03:40 +02:00
2023-08-06 15:06:40 +02:00
2023-08-25 19:05:38 +00:00
2023-07-17 22:06:32 +00:00
2023-08-03 15:12:44 +02:00
2023-05-08 17:58:01 -03:00
2023-08-07 19:06:18 +00:00
2023-08-28 17:47:37 -03:00
2023-08-28 17:47:37 -03: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-08-28 17:47:37 -03:00
2023-08-18 15:08:07 +01:00
2023-04-29 13:01:46 +01:00
2023-07-29 11:47:26 +02:00
2023-06-29 16:24:07 +03:00
2023-08-20 13:22:39 +00:00
2023-08-28 17:47:37 -03:00
2023-04-03 09:24:11 +02:00
2023-08-10 11:00:06 +02:00
2023-08-04 16:19:55 +00:00
2023-08-18 15:08:07 +01:00
2023-08-06 13:34:53 +00:00
2023-04-19 19:13:45 +00:00
2023-08-14 16:57:51 -07:00
2023-05-08 03:36:30 +00:00
2023-03-29 18:04:44 -04:00
2023-08-15 00:57:18 +08:00
2023-08-28 17:47:37 -03:00
2023-06-12 20:24:48 +08:00
2023-08-26 19:25:46 +00:00
2023-04-29 13:01:46 +01:00
2023-05-12 00:10:52 +00:00
2023-03-08 00:00:18 +00:00
2023-04-13 22:10:26 -05:00
2023-04-13 22:10:26 -05:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00