diff options
| author | bors <bors@rust-lang.org> | 2023-05-27 01:27:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-27 01:27:01 +0000 |
| commit | 23040c4a5fa74f569f9f46f82f070554899db97f (patch) | |
| tree | 8859a8c5f8b5ec7d2645994fc8c28aa09222ca36 /compiler/rustc_mir_transform/src/errors.rs | |
| parent | 19ed0aade60e1c1038fe40554bcd9d01b717effa (diff) | |
| parent | be44860ab94f9e469d6f02232d3064a1049c47ba (diff) | |
| download | rust-23040c4a5fa74f569f9f46f82f070554899db97f.tar.gz rust-23040c4a5fa74f569f9f46f82f070554899db97f.zip | |
Auto merge of #111245 - fee1-dead-contrib:temp-fix-tuple-struct-field, r=lcnr
fix for `Self` not respecting tuple Ctor privacy
This PR 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_mir_transform/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
