about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/errors.rs
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2023-05-05 10:52:02 +0000
committerDeadbeef <ent3rm4n@gmail.com>2023-05-26 06:23:03 +0000
commitbe44860ab94f9e469d6f02232d3064a1049c47ba (patch)
treeaf94c730192dacfe97f9ae1c396d4252e53185a3 /compiler/rustc_mir_transform/src/errors.rs
parentc86212f9bccb4d5ec625b0607053b067732724ab (diff)
downloadrust-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_mir_transform/src/errors.rs')
0 files changed, 0 insertions, 0 deletions