diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2023-05-05 10:52:02 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2023-05-26 06:23:03 +0000 |
| commit | be44860ab94f9e469d6f02232d3064a1049c47ba (patch) | |
| tree | af94c730192dacfe97f9ae1c396d4252e53185a3 /compiler/rustc_errors/src/snippet.rs | |
| parent | c86212f9bccb4d5ec625b0607053b067732724ab (diff) | |
| download | rust-be44860ab94f9e469d6f02232d3064a1049c47ba.tar.gz rust-be44860ab94f9e469d6f02232d3064a1049c47ba.zip | |
fix for `Self` not respecting tuple Ctor privacy
This fixes #111220 by checking the privacy of tuple constructors using `Self`, so the following code now errors
```rust
mod my {
pub struct Foo(&'static str);
}
impl AsRef<str> for my::Foo {
fn as_ref(&self) -> &str {
let Self(s) = self; // previously compiled, now errors correctly
s
}
}
```
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
0 files changed, 0 insertions, 0 deletions
