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

InferCtxt::tainted_by_errors_flag should be Option<ErrorGuaranteed> #100321

Closed
lcnr opened this issue Aug 9, 2022 · 2 comments · Fixed by #100368
Closed

InferCtxt::tainted_by_errors_flag should be Option<ErrorGuaranteed> #100321

lcnr opened this issue Aug 9, 2022 · 2 comments · Fixed by #100368
Assignees
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

Comments

@lcnr
Copy link
Contributor

lcnr commented Aug 9, 2022

tainted_by_errors_flag: Cell<bool>,

should be Cell<Option<ErrorGuaranteed>> to guarantee that we emit an error when that flag is set. This is already done for tainted_by_errors of other types in rustc.

pub tainted_by_errors: Option<ErrorGuaranteed>,

@lcnr lcnr added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Aug 9, 2022
@chenyukang
Copy link
Member

@rustbot claim

@chenyukang
Copy link
Member

tainted_by_errors_flag renamed to tainted_by_errors to keep consistent.

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Aug 23, 2022
InferCtxt tainted_by_errors_flag should be Option<ErrorGuaranteed>

Fixes rust-lang#100321.
Use Cell<Option<ErrorGuaranteed>> to guarantee that we emit an error when that flag is set.
@bors bors closed this as completed in f42cdf7 Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants