-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Don't (ab)use TyKind::Error
when not planning to emit error
#70866
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-type-system
Area: Type system
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
This was referenced Apr 7, 2020
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 8, 2020
Fix abuses of tykind::err r? @eddyb cc rust-lang#70866
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 9, 2020
De-abuse TyKind::Error in pattern type checking r? @eddyb cc rust-lang#70866 In particular, I would appreciate extra scrutiny over the soundness of these changes. Also, this will go a bit slowly because I'm going to use my other PR (rust-lang#70551) to check if I missed anything.
Centril
added a commit
to Centril/rust
that referenced
this issue
Apr 10, 2020
De-abuse TyKind::Error in pattern type checking r? @eddyb cc rust-lang#70866 In particular, I would appreciate extra scrutiny over the soundness of these changes. Also, this will go a bit slowly because I'm going to use my other PR (rust-lang#70551) to check if I missed anything.
This was referenced Apr 12, 2020
This was referenced May 6, 2020
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
May 7, 2020
Use trait_object_dummy_self instead of err r? @eddyb cc rust-lang#70866.
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
May 21, 2020
…, r=varkor De-abuse TyKind::Error in exhaustiveness checking Replaces rust-lang#71074. Context: rust-lang#70866. In order to remove the use of `TyKind::Error`, I had to make sure we skip over those fields whose inhabitedness should not be observed. This is potentially error-prone however, since we must be careful not to mix filtered and unfiltered lists of patterns. I managed to hide away most of the filtering behind a new `Fields` struct, that I used everywhere relevant. I quite like the result; I think the twin concepts of `Constructor` and `Fields` make a good mental model. As usual, I tried to separate commits that shuffle code around from commits that require more thought to review. cc @varkor @Centril
RalfJung
added a commit
to RalfJung/rust
that referenced
this issue
Jun 18, 2020
Make all uses of ty::Error delay a span bug r? @eddyb A second attempt at rust-lang#70245 resolves rust-lang#70866
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Jun 18, 2020
Make all uses of ty::Error delay a span bug r? @eddyb A second attempt at rust-lang#70245 resolves rust-lang#70866
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-type-system
Area: Type system
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
cc #70551 @eddyb
Currently, it appears we are misusing
TyKind::Error
(andConst::Error
) in these places, which we should refactor:fixed by Fix abuses of tykind::err #70870
rust/src/librustc_typeck/check/wfcheck.rs
Line 710 in 6dee5f1
fixed by Fix abuses of tykind::err #70870
rust/src/librustc_typeck/check/wfcheck.rs
Line 715 in 6dee5f1
fixed by Fix abuses of tykind::err #70870
rust/src/librustc_typeck/lib.rs
Line 383 in 6dee5f1
fixed by Fix abuses of tykind::err #70870
rust/src/librustc_typeck/variance/constraints.rs
Line 319 in 6dee5f1
fixed by De-abuse TyKind::Error in pattern type checking #70932
rust/src/librustc_typeck/check/pat.rs
Lines 1428 to 1435 in 42abbd8
fixed by Use trait_object_dummy_self instead of err #71938
rust/src/librustc_typeck/check/closure.rs
Line 180 in 93dc97a
fixed by ty/walk: iterate
GenericArg
s instead ofTy
s. #70164rust/src/librustc_trait_selection/traits/select.rs
Line 3079 in 6dee5f1
fixed by De-abuse TyKind::Error in exhaustiveness checking #71930
rust/src/librustc_mir_build/hair/pattern/_match.rs
Line 900 in 9fed360
The text was updated successfully, but these errors were encountered: