-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove TypeVariableOriginKind
and ConstVariableOriginKind
#123016
Conversation
Some changes occurred in match lowering cc @Nadrieril Some changes occurred in need_type_info.rs cc @lcnr Some changes occurred in src/tools/clippy cc @rust-lang/clippy Type relation code was changed Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
This comment has been minimized.
This comment has been minimized.
8bb5d4d
to
c6bcf4d
Compare
☔ The latest upstream changes (presumably #123147) made this pull request unmergeable. Please resolve the merge conflicts. |
c6bcf4d
to
101195c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make sure to update all relevant comments
after that r=me, a really nice cleanup imo ❤️
4ef1df1
to
7dead92
Compare
@bors r+ |
…, r=lcnr Remove `TypeVariableOriginKind` and `ConstVariableOriginKind` It's annoying to have to import `TypeVariableOriginKind` just to fill it with `MiscVariable` for almost every use. Every other usage other than `TypeParameterDefinition` wasn't even used -- I can see how it may have been useful once for debugging, but I do quite a lot of typeck debugging and I've never really needed it. So let's just remove it, and keep around the only useful thing which is the `DefId` of the param for `var_for_def`. This is based on rust-lang#123006, which removed the special use of `TypeVariableOriginKind::OpaqueInference`, which I'm pretty sure I was the one that added. r? lcnr or re-roll to types
mh may need another rebase |
…r=lcnr Remove `TypeVariableOriginKind` and `ConstVariableOriginKind` It's annoying to have to import `TypeVariableOriginKind` just to fill it with `MiscVariable` for almost every use. Every other usage other than `TypeParameterDefinition` wasn't even used -- I can see how it may have been useful once for debugging, but I do quite a lot of typeck debugging and I've never really needed it. So let's just remove it, and keep around the only useful thing which is the `DefId` of the param for `var_for_def`. This is based on rust-lang#123006, which removed the special use of `TypeVariableOriginKind::OpaqueInference`, which I'm pretty sure I was the one that added. r? lcnr or re-roll to types
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
7dead92
to
a654c97
Compare
☔ The latest upstream changes (presumably #123762) made this pull request unmergeable. Please resolve the merge conflicts. |
a654c97
to
98890be
Compare
@bors r=lcnr |
Rollup of 7 pull requests Successful merges: - rust-lang#123016 (Remove `TypeVariableOriginKind` and `ConstVariableOriginKind`) - rust-lang#123462 (Cleanup: Rename `ModSep` to `PathSep`) - rust-lang#123603 (Don't even parse an intrinsic unless the feature gate is enabled) - rust-lang#123926 (Fix pretty HIR for anon consts in diagnostics) - rust-lang#123973 (crashes: readme: add reminder to add Fixes #abcde to prs to automatically close issues.) - rust-lang#123984 (sanitizers: Add rustc_sanitizers to triagebot.toml) - rust-lang#123989 (Just use `type_dependent_def_id` to figure out what the method is for an expr) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#123016 - compiler-errors:no-type-var-origin, r=lcnr Remove `TypeVariableOriginKind` and `ConstVariableOriginKind` It's annoying to have to import `TypeVariableOriginKind` just to fill it with `MiscVariable` for almost every use. Every other usage other than `TypeParameterDefinition` wasn't even used -- I can see how it may have been useful once for debugging, but I do quite a lot of typeck debugging and I've never really needed it. So let's just remove it, and keep around the only useful thing which is the `DefId` of the param for `var_for_def`. This is based on rust-lang#123006, which removed the special use of `TypeVariableOriginKind::OpaqueInference`, which I'm pretty sure I was the one that added. r? lcnr or re-roll to types
* Update for nix Signed-off-by: Hayashi Mikihiro <[email protected]> * Update to Rust 1.80.0 Signed-off-by: Hayashi Mikihiro <[email protected]> * Rename to BindingMode from BindingAnnotation rust-lang/rust#124047 Signed-off-by: Hayashi Mikihiro <[email protected]> * Remove TypeVariableOriginKind rust-lang/rust#123016 Signed-off-by: Hayashi Mikihiro <[email protected]> * Remove TypeVariableOrigin rust-lang/rust#124955 Signed-off-by: Hayashi Mikihiro <[email protected]> * Remove LintDiagnostic::msg rust-lang/rust#125410 Signed-off-by: Hayashi Mikihiro <[email protected]> * common.rs fmt mistake indents Signed-off-by: Hayashi Mikihiro <[email protected]> * trace_in_no_trace.rs remove mistake space Signed-off-by: Hayashi Mikihiro <[email protected]> * trace_in_no_trace.rs remove mistake head space Signed-off-by: Hayashi Mikihiro <[email protected]> --------- Signed-off-by: Hayashi Mikihiro <[email protected]>
* Update for nix Signed-off-by: Hayashi Mikihiro <[email protected]> * Update to Rust 1.80.0 Signed-off-by: Hayashi Mikihiro <[email protected]> * Rename to BindingMode from BindingAnnotation rust-lang/rust#124047 Signed-off-by: Hayashi Mikihiro <[email protected]> * Remove TypeVariableOriginKind rust-lang/rust#123016 Signed-off-by: Hayashi Mikihiro <[email protected]> * Remove TypeVariableOrigin rust-lang/rust#124955 Signed-off-by: Hayashi Mikihiro <[email protected]> * Remove LintDiagnostic::msg rust-lang/rust#125410 Signed-off-by: Hayashi Mikihiro <[email protected]> * common.rs fmt mistake indents Signed-off-by: Hayashi Mikihiro <[email protected]> * trace_in_no_trace.rs remove mistake space Signed-off-by: Hayashi Mikihiro <[email protected]> * trace_in_no_trace.rs remove mistake head space Signed-off-by: Hayashi Mikihiro <[email protected]> * Workaround for #32912 It's dirty but it worked on 2000 runs Signed-off-by: sagudev <[email protected]> --------- Signed-off-by: Hayashi Mikihiro <[email protected]> Signed-off-by: sagudev <[email protected]> Co-authored-by: Samson <[email protected]>
* Update for nix Signed-off-by: Hayashi Mikihiro <[email protected]> * Update to Rust 1.80.0 Signed-off-by: Hayashi Mikihiro <[email protected]> * Rename to BindingMode from BindingAnnotation rust-lang/rust#124047 Signed-off-by: Hayashi Mikihiro <[email protected]> * Remove TypeVariableOriginKind rust-lang/rust#123016 Signed-off-by: Hayashi Mikihiro <[email protected]> * Remove TypeVariableOrigin rust-lang/rust#124955 Signed-off-by: Hayashi Mikihiro <[email protected]> * Remove LintDiagnostic::msg rust-lang/rust#125410 Signed-off-by: Hayashi Mikihiro <[email protected]> * common.rs fmt mistake indents Signed-off-by: Hayashi Mikihiro <[email protected]> * trace_in_no_trace.rs remove mistake space Signed-off-by: Hayashi Mikihiro <[email protected]> * trace_in_no_trace.rs remove mistake head space Signed-off-by: Hayashi Mikihiro <[email protected]> * Workaround for servo#32912 It's dirty but it worked on 2000 runs Signed-off-by: sagudev <[email protected]> --------- Signed-off-by: Hayashi Mikihiro <[email protected]> Signed-off-by: sagudev <[email protected]> Co-authored-by: Samson <[email protected]>
It's annoying to have to import
TypeVariableOriginKind
just to fill it withMiscVariable
for almost every use. Every other usage other thanTypeParameterDefinition
wasn't even used -- I can see how it may have been useful once for debugging, but I do quite a lot of typeck debugging and I've never really needed it.So let's just remove it, and keep around the only useful thing which is the
DefId
of the param forvar_for_def
.This is based on #123006, which removed the special use of
TypeVariableOriginKind::OpaqueInference
, which I'm pretty sure I was the one that added.r? lcnr or re-roll to types