diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-08 00:07:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-08 00:07:36 +0200 |
| commit | cd3cb281da9a4387f5896db75129d7dd73cca8f4 (patch) | |
| tree | d19b29534ae871eaa6fdf621d2658dd041672075 /src/librustc | |
| parent | cab2d84f061c624a016250458f29f0297b74d0fe (diff) | |
| parent | 7b3f72906ffea5a8aec9e3d109d8e012f771a672 (diff) | |
| download | rust-cd3cb281da9a4387f5896db75129d7dd73cca8f4.tar.gz rust-cd3cb281da9a4387f5896db75129d7dd73cca8f4.zip | |
Rollup merge of #64255 - varkor:bool-to-option, r=Centril
Add methods for converting `bool` to `Option<T>` This provides a reference implementation for https://github.com/rust-lang/rfcs/pull/2757.
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/middle/lang_items.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc/middle/lang_items.rs b/src/librustc/middle/lang_items.rs index 6dfd7a7f943..c5d9a722ae1 100644 --- a/src/librustc/middle/lang_items.rs +++ b/src/librustc/middle/lang_items.rs @@ -244,6 +244,7 @@ pub fn collect<'tcx>(tcx: TyCtxt<'tcx>) -> LanguageItems { language_item_table! { // Variant name, Name, Method name, Target; + BoolImplItem, "bool", bool_impl, Target::Impl; CharImplItem, "char", char_impl, Target::Impl; StrImplItem, "str", str_impl, Target::Impl; SliceImplItem, "slice", slice_impl, Target::Impl; |
