Missing privacy check
Open
Nobody has claimed this yet.
bug
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 231
- Avg merge
- 19h 55m
- Merged PRs (30d)
- 67
Description
I tried this code: https://github.com/rust-lang/rust/blob/aa3ca1994904f2e056679fce1f185db8c7ed2703/src/test/ui/issue-10545.rs
mod a {
struct S;
impl S { }
}
fn foo(_: a::S) { //~ ERROR: struct `S` is private
}
fn main() {}
I expected to see this happen: //~ ERROR: struct S is private
Instead, this happened: compile without error
Meta
- What version of Rust GCC were you using, git sha if possible. be27571c110d99fe55324a9c2b6622787b08fb52
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/test/ui/issue-10545.rs and run the provided Rust reproducer against gccrs. Trace the privacy checking for the private a::S used in foo; done means compilation reports the expected “struct S is private” error instead of succeeding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100