Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Added private type leak validation to structs #344

Merged
merged 1 commit into from
Aug 13, 2021

Conversation

mkhan45
Copy link
Contributor

@mkhan45 mkhan45 commented Aug 4, 2021

Also exposed struct field visibility in the HIR and created a struct validation module

@codecov
Copy link

codecov bot commented Aug 5, 2021

Codecov Report

Merging #344 (078c93a) into main (69594b0) will increase coverage by 0.01%.
The diff coverage is 91.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #344      +/-   ##
==========================================
+ Coverage   80.27%   80.29%   +0.01%     
==========================================
  Files         259      262       +3     
  Lines       15636    15671      +35     
==========================================
+ Hits        12552    12583      +31     
- Misses       3084     3088       +4     
Impacted Files Coverage Δ
crates/mun_hir/src/code_model.rs 11.11% <ø> (ø)
crates/mun_hir/src/expr/validator/tests.rs 100.00% <ø> (ø)
crates/mun_hir/src/code_model/struct/validator.rs 84.00% <84.00%> (ø)
crates/mun_hir/src/code_model/struct.rs 89.36% <100.00%> (+0.47%) ⬆️
...s/mun_hir/src/code_model/struct/validator/tests.rs 100.00% <100.00%> (ø)
crates/mun_hir/src/utils.rs 100.00% <100.00%> (ø)
crates/mun_hir/src/ty/infer.rs 70.04% <0.00%> (-0.14%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69594b0...078c93a. Read the comment docs.

@mkhan45 mkhan45 force-pushed the struct_private_leak branch from fb43551 to f8e20c1 Compare August 9, 2021 17:09
Also exposed struct field visibility in the HIR and created a struct validation module
@mkhan45 mkhan45 force-pushed the struct_private_leak branch from f8e20c1 to 078c93a Compare August 9, 2021 17:14
@mkhan45
Copy link
Contributor Author

mkhan45 commented Aug 9, 2021

Both are required to be pub(crate) since they're used by mun_hir::src::utils::tests, which I extracted out of expr::tests to make common to the struct validator and expression validator tests.

The first force-push was because I'd removed the (crate) part of pub(crate) from both of them instead of the whole pub(crate), and then the second force-push is from when I turned my brain on and realized that that's not what we want.

@Wodann Wodann merged commit da9f168 into mun-lang:main Aug 13, 2021
@Wodann Wodann added this to the Mun v0.4.0 milestone Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants