diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-05-02 11:44:50 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-02 11:44:50 +0530 |
| commit | b727132e23aaa4e80eb82816d95c20023940f916 (patch) | |
| tree | 95fb9d868e6a15a303950217f2519a381bf5b805 /compiler/rustc_hir/src | |
| parent | f916c44aecfc6c610f2d23cf929644aa08123547 (diff) | |
| parent | c31754651da17b207fa7fb94c2f3ba2c188aa0b1 (diff) | |
| download | rust-b727132e23aaa4e80eb82816d95c20023940f916.tar.gz rust-b727132e23aaa4e80eb82816d95c20023940f916.zip | |
Rollup merge of #108161 - WaffleLapkin:const_param_ty, r=BoxyUwU
Add `ConstParamTy` trait This is a bit sketch, but idk. r? `@BoxyUwU` Yet to be done: - [x] ~~Figure out if it's okay to implement `StructuralEq` for primitives / possibly remove their special casing~~ (it should be okay, but maybe not in this PR...) - [ ] Maybe refactor the code a little bit - [x] Use a macro to make impls a bit nicer Future work: - [ ] Actuallyâ„¢ use the trait when checking if a `const` generic type is allowed - [ ] _Really_ refactor the surrounding code - [ ] Refactor `marker.rs` into multiple modules for each "theme" of markers
Diffstat (limited to 'compiler/rustc_hir/src')
| -rw-r--r-- | compiler/rustc_hir/src/lang_items.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/lang_items.rs b/compiler/rustc_hir/src/lang_items.rs index 8f91a96f964..e1c030d3e19 100644 --- a/compiler/rustc_hir/src/lang_items.rs +++ b/compiler/rustc_hir/src/lang_items.rs @@ -293,6 +293,8 @@ language_item_table! { PointerLike, sym::pointer_like, pointer_like, Target::Trait, GenericRequirement::Exact(0); + ConstParamTy, sym::const_param_ty, const_param_ty_trait, Target::Trait, GenericRequirement::Exact(0); + Poll, sym::Poll, poll, Target::Enum, GenericRequirement::None; PollReady, sym::Ready, poll_ready_variant, Target::Variant, GenericRequirement::None; PollPending, sym::Pending, poll_pending_variant, Target::Variant, GenericRequirement::None; |
