diff options
author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-03-23 00:00:31 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-23 00:00:31 +0530 |
commit | 14d06467f008df1a915b2e1ef4608326d5f69bf8 (patch) | |
tree | 3e4b1edde7d3a85e6ef054004205d28bba8deb03 /compiler/rustc_hir | |
parent | 59d9cbfa14086540419611491dae90b90daeb588 (diff) | |
parent | 27e9ee9baeb8149e3f3d56572061c008109cd134 (diff) | |
download | rust-14d06467f008df1a915b2e1ef4608326d5f69bf8.tar.gz |
Rollup merge of #109179 - llogiq:intrinsically-option-as-slice, r=eholk
move Option::as_slice to intrinsic
````@scottmcm```` suggested on #109095 I use a direct approach of unpacking the operation in MIR lowering, so here's the implementation.
cc ````@nikic```` as this should hopefully unblock #107224 (though perhaps other changes to the prior implementation, which I left for bootstrapping, are needed).
Diffstat (limited to 'compiler/rustc_hir')
-rw-r--r-- | compiler/rustc_hir/src/lang_items.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/lang_items.rs b/compiler/rustc_hir/src/lang_items.rs index 72ff317d45d..0863d65d8f9 100644 --- a/compiler/rustc_hir/src/lang_items.rs +++ b/compiler/rustc_hir/src/lang_items.rs @@ -301,6 +301,7 @@ language_item_table! { Context, sym::Context, context, Target::Struct, GenericRequirement::None; FuturePoll, sym::poll, future_poll_fn, Target::Method(MethodKind::Trait { body: false }), GenericRequirement::None; + Option, sym::Option, option_type, Target::Enum, GenericRequirement::None; OptionSome, sym::Some, option_some_variant, Target::Variant, GenericRequirement::None; OptionNone, sym::None, option_none_variant, Target::Variant, GenericRequirement::None; |