nightly-2024-10-10: fix: visibility for impl methods (#6261)
Pre-release
Pre-release
github-actions
released this
10 Oct 02:28
·
340 commits
to master
since this release
# Description ## Problem Part of #4515 Apparently in #6179 I only made it work for calls like `foo::Bar::baz()` but no checks were done for method calls (where `self` is involved). ## Summary This PR now warns when calling private or `pub(crate)` methods, either on structs or primitive types, when they are not accessible from the current module. We also now don't suggest non-accessible methods from LSP. ## Additional Context I also removed an unused global that was introduced some time ago. ## Documentation Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.