rust/tests/ui/privacy/issue-75907.stderr
Esteban Küber f0845adb0c Show diff suggestion format on verbose replacement
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
  --> $DIR/attempted-access-non-fatal.rs:7:15
   |
LL |     let _ = 2.l;
   |               ^
   |
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
   |
LL -     let _ = 2.l;
LL +     let _ = 2.0f64;
   |
```
2025-02-10 20:21:39 +00:00

39 lines
1.2 KiB
Plaintext

error[E0532]: cannot match against a tuple struct which contains private fields
--> $DIR/issue-75907.rs:15:9
|
LL | let Bar(x, y, Foo(z)) = make_bar();
| ^^^
|
note: constructor is not visible here due to private fields
--> $DIR/issue-75907.rs:15:16
|
LL | let Bar(x, y, Foo(z)) = make_bar();
| ^ ^^^^^^ private field
| |
| private field
help: consider making the fields publicly accessible
|
LL - pub(crate) struct Bar(pub u8, pub(in crate::foo) u8, Foo);
LL + pub(crate) struct Bar(pub u8, pub u8, pub Foo);
|
error[E0532]: cannot match against a tuple struct which contains private fields
--> $DIR/issue-75907.rs:15:19
|
LL | let Bar(x, y, Foo(z)) = make_bar();
| ^^^
|
note: constructor is not visible here due to private fields
--> $DIR/issue-75907.rs:15:23
|
LL | let Bar(x, y, Foo(z)) = make_bar();
| ^ private field
help: consider making the field publicly accessible
|
LL | pub(crate) struct Foo(pub u8);
| +++
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0532`.