yeet AliasConstKind::opt_def_id - #162797
Conversation
|
|
| // we are not instantiating the result, so it's OK here. | ||
| def_id | ||
| } | ||
| ty::AliasConstKind::InherentImpl { def_id } => def_id, |
There was a problem hiding this comment.
is inherent impl reachable here? the type from const_param_default ought to be unnormalized and so in InherentSelf form
There was a problem hiding this comment.
it is unreachable. it is from const_param_default->lower_const_arg->lower_type_relative_const_path->blah blah unnormalized. the rest are reachable though (at first I was like "can't it only be anons?" but no it can be directly represented paths too)
| } | ||
| Res::Def(DefKind::Const, did) => { | ||
| if let Err(guar) = self.check_const_item_in_type_system(did, span) { | ||
| let alias_const_kind = ty::AliasConstKind::new_from_def_id( |
There was a problem hiding this comment.
given that this is never an inherent const it would be nice to use a different constructor here that doesnt take AliasConstInherentArgsKind
There was a problem hiding this comment.
exactly:
This PR conflicts with #162760 - please merge that one first! the code in this PR is a bit kludgey until that PR is merged.
(this is one of the kludgey spots)
This comment has been minimized.
This comment has been minimized.
08ce7fd to
653076c
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors r=BoxyUwU,bit-aloo rollup |
…U,bit-aloo yeet AliasConstKind::opt_def_id A while back, I made three PRs removing def_id from AliasConst/AliasTerm/AliasTy: - rust-lang#157374 - rust-lang#157653 - rust-lang#158013 I did AliasConst first, and due to my inexperience with this refactor, I had this `opt_def_id` kludge. I didn't do the same thing in the AliasTy or AliasTerm PRs. It ought to be removed and replaced with explicit matches. related tracking-ish issues: - rust-lang#152245 - rust-lang#156181 - rust-lang/project-const-generics#98 - goodness we have a lot of issues on this general area of work r? @BoxyUwU
…uwer Rollup of 8 pull requests Successful merges: - #160859 (`core::num::f16b` Rust's 16bit Brain Float) - #162177 (Properly implement the gpu-kernel ABI for amdgpu) - #162591 (Move parse error recovery for expression operators "out of line" & refactor in the area) - #162733 (Add useful APIs to `Unique(Arc|Rc)`) - #162950 (More AST lowering cleanups) - #162964 (Update `browser-ui-test` version to `0.25.2`) - #162797 (yeet AliasConstKind::opt_def_id) - #162836 (Ping T-libs-ping instead of T-libs-fcp for backports)
…U,bit-aloo yeet AliasConstKind::opt_def_id A while back, I made three PRs removing def_id from AliasConst/AliasTerm/AliasTy: - rust-lang#157374 - rust-lang#157653 - rust-lang#158013 I did AliasConst first, and due to my inexperience with this refactor, I had this `opt_def_id` kludge. I didn't do the same thing in the AliasTy or AliasTerm PRs. It ought to be removed and replaced with explicit matches. related tracking-ish issues: - rust-lang#152245 - rust-lang#156181 - rust-lang/project-const-generics#98 - goodness we have a lot of issues on this general area of work r? @BoxyUwU
Rollup of 18 pull requests Successful merges: - #162499 (`rustc_codegen_gcc` subtree update) - #161424 (implement `VaArgSafe` for `f128`) - #161777 (Add Natvis visualiser and debuginfo tests for `f128`) - #162506 (Avoid suggesting imports of traits declared inside fn bodies) - #162591 (Move parse error recovery for expression operators "out of line" & refactor in the area) - #162669 ([rustdoc] Correctly handle intra-doc links on inlined same item with different names) - #162733 (Add useful APIs to `Unique(Arc|Rc)`) - #162913 (Refactor LivenessResults into LivenessComputation, without typeck) - #162950 (More AST lowering cleanups) - #162964 (Update `browser-ui-test` version to `0.25.2`) - #162979 (mark `f128` as reliable on `powerpc64` with `+vsx`) - #161743 (Add performance notes for the floating-point round method) - #162797 (yeet AliasConstKind::opt_def_id) - #162836 (Ping T-libs-ping instead of T-libs-fcp for backports) - #162873 (Adjust `bug!`/`span_bug!` emission) - #162875 (Add .seek_read_exact(), .seek_write_all() to std::os::windows::fs::FileExt) - #162956 (Add missing `#[repr(C)]` in UI, codegen and assembly tests) - #162981 (rustc-dev-guide subtree update) Failed merges: - #162177 (Properly implement the gpu-kernel ABI for amdgpu)
Rollup of 18 pull requests Successful merges: - #162499 (`rustc_codegen_gcc` subtree update) - #161424 (implement `VaArgSafe` for `f128`) - #161777 (Add Natvis visualiser and debuginfo tests for `f128`) - #162506 (Avoid suggesting imports of traits declared inside fn bodies) - #162591 (Move parse error recovery for expression operators "out of line" & refactor in the area) - #162669 ([rustdoc] Correctly handle intra-doc links on inlined same item with different names) - #162733 (Add useful APIs to `Unique(Arc|Rc)`) - #162913 (Refactor LivenessResults into LivenessComputation, without typeck) - #162950 (More AST lowering cleanups) - #162964 (Update `browser-ui-test` version to `0.25.2`) - #162979 (mark `f128` as reliable on `powerpc64` with `+vsx`) - #161743 (Add performance notes for the floating-point round method) - #162797 (yeet AliasConstKind::opt_def_id) - #162836 (Ping T-libs-ping instead of T-libs-fcp for backports) - #162873 (Adjust `bug!`/`span_bug!` emission) - #162875 (Add .seek_read_exact(), .seek_write_all() to std::os::windows::fs::FileExt) - #162956 (Add missing `#[repr(C)]` in UI, codegen and assembly tests) - #162981 (rustc-dev-guide subtree update) Failed merges: - #162177 (Properly implement the gpu-kernel ABI for amdgpu)
…U,bit-aloo yeet AliasConstKind::opt_def_id A while back, I made three PRs removing def_id from AliasConst/AliasTerm/AliasTy: - rust-lang#157374 - rust-lang#157653 - rust-lang#158013 I did AliasConst first, and due to my inexperience with this refactor, I had this `opt_def_id` kludge. I didn't do the same thing in the AliasTy or AliasTerm PRs. It ought to be removed and replaced with explicit matches. related tracking-ish issues: - rust-lang#152245 - rust-lang#156181 - rust-lang/project-const-generics#98 - goodness we have a lot of issues on this general area of work r? @BoxyUwU
…uwer Rollup of 22 pull requests Successful merges: - #163001 (Temporarily disable `test-x86_64-fuchsia`) - #162880 (Mini optimization in `rustc_hir_typeck::upvar::restrict_precision_for_drop_types`) - #161424 (implement `VaArgSafe` for `f128`) - #161777 (Add Natvis visualiser and debuginfo tests for `f128`) - #162506 (Avoid suggesting imports of traits declared inside fn bodies) - #162591 (Move parse error recovery for expression operators "out of line" & refactor in the area) - #162669 ([rustdoc] Correctly handle intra-doc links on inlined same item with different names) - #162733 (Add useful APIs to `Unique(Arc|Rc)`) - #162913 (Refactor LivenessResults into LivenessComputation, without typeck) - #162924 (Remove applying inline attributes at the callsite) - #162940 (Use spawned `SBDebugger` instance) - #162950 (More AST lowering cleanups) - #162964 (Update `browser-ui-test` version to `0.25.2`) - #162979 (mark `f128` as reliable on `powerpc64` with `+vsx`) - #161743 (Add performance notes for the floating-point round method) - #162797 (yeet AliasConstKind::opt_def_id) - #162836 (Ping T-libs-ping instead of T-libs-fcp for backports) - #162873 (Adjust `bug!`/`span_bug!` emission) - #162956 (Add missing `#[repr(C)]` in UI, codegen and assembly tests) - #162971 (libtest harness: avoid 'extern crate test' with custom runner) - #162981 (rustc-dev-guide subtree update) - #162985 (Error on invalid placements for unstable attributes)
Rollup merge of #162797 - khyperia:yeet-opt_def_id, r=BoxyUwU,bit-aloo yeet AliasConstKind::opt_def_id A while back, I made three PRs removing def_id from AliasConst/AliasTerm/AliasTy: - #157374 - #157653 - #158013 I did AliasConst first, and due to my inexperience with this refactor, I had this `opt_def_id` kludge. I didn't do the same thing in the AliasTy or AliasTerm PRs. It ought to be removed and replaced with explicit matches. related tracking-ish issues: - #152245 - #156181 - rust-lang/project-const-generics#98 - goodness we have a lot of issues on this general area of work r? @BoxyUwU
A while back, I made three PRs removing def_id from AliasConst/AliasTerm/AliasTy:
I did AliasConst first, and due to my inexperience with this refactor, I had this
opt_def_idkludge. I didn't do the same thing in the AliasTy or AliasTerm PRs. It ought to be removed and replaced with explicit matches.related tracking-ish issues:
Alias[Ty|Const|Term]KindintoAlias[Ty|Const|Term], generalize to not require just aDefId#152245AliasTermrefactor #156181ConstKind::UnevaluatedandTyKind::Aliasand allow non defid/subst pairs project-const-generics#98r? @BoxyUwU