Validate that we're only matching on unit struct for path pattern#122910
Merged
bors merged 1 commit intorust-lang:masterfrom Mar 25, 2024
Merged
Validate that we're only matching on unit struct for path pattern#122910bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
1526393 to
08235b1
Compare
Contributor
|
@bors r+ |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 25, 2024
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#122842 (Don't emit an error about failing to produce a file with a specific name if user never gave an explicit name) - rust-lang#122881 (Delegation: fix ICE on `bound_vars` divergence) - rust-lang#122910 (Validate that we're only matching on unit struct for path pattern) - rust-lang#122970 (Use `chunk_by` when building `ReverseSccGraph`) - rust-lang#122988 (add even more tests! ) - rust-lang#122999 (Fix unpretty UI test when /tmp does not exist) - rust-lang#123001 (Rename `{enter,exit}_lint_attrs` to `check_attributes{,_post}`) - rust-lang#123022 (Add `async-closures/once.rs` back to cranelift tests) - rust-lang#123034 (Add a bunch of needs-unwind annotations to tests) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 25, 2024
Rollup merge of rust-lang#122910 - compiler-errors:unit-struct-in-path-pat-only, r=petrochenkov Validate that we're only matching on unit struct for path pattern Resolution doesn't validate that we only really take `CtorKind::Unit` in path patterns, since all it sees is `Res::SelfCtor(def_id)`. Check this instead during pattern typeck. r? petrochenkov Fixes rust-lang#122809
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolution doesn't validate that we only really take
CtorKind::Unitin path patterns, since all it sees isRes::SelfCtor(def_id). Check this instead during pattern typeck.r? petrochenkov
Fixes #122809