From 0869c0ca617f0d0c06b3f90ea39d9f00b3388421 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Fri, 7 Aug 2020 13:09:49 +0200 Subject: [PATCH 01/13] Skill tree additions and restructurings --- src/skill_tree.md | 64 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 18 deletions(-) diff --git a/src/skill_tree.md b/src/skill_tree.md index 06e35b9..9536ce0 100644 --- a/src/skill_tree.md +++ b/src/skill_tree.md @@ -75,10 +75,38 @@ items = [] name = "unconst_rules" label = "Need to come up\nwith a scheme\nfor doing unsafe\nin const fn" items = [ - { label = "transmute", href = "https://github.com/rust-lang/rust/issues/53605" } + { label = "transmute", href = "https://github.com/rust-lang/rust/issues/53605" }, + { label = "union field access", href = "https://github.com/rust-lang/rust/issues/51909", port = "union" }, + { label = "deref of raw pointers", href = "https://github.com/rust-lang/rust/issues/51911", port = "raw_ptr_deref" }, ] href = "https://github.com/rust-lang/const-eval/issues/14" +[[group]] +name = "offset_of" +label = "offset_of" +items = [ + { label = "offset_from", href = "https://github.com/rust-lang/rust/issues/41079", port = "offset_from" }, +] +href = "https://github.com/rust-lang/rust/issues/71499" +requires = [ + "unconst_rules:raw_ptr_deref", + "raw_ref_macros", + "maybe_uninit_as_ptr", +] + +[[group]] +name = "raw_ref_macros" +label = "raw_ref maros" +href = "https://github.com/rust-lang/rust/issues/73394" +items = [] + +[[group]] +name = "maybe_uninit_as_ptr" +label = "MaybeUninit::as_ptr" +href = "https://github.com/rust-lang/rust/issues/75251" +items = [] + + [[group]] name = "question_mark" label = "using ? in const" @@ -109,7 +137,7 @@ items = [ ] [[group]] -name = "const-float" +name = "float" label = "floats in const fn" href = "https://github.com/rust-lang/rust/issues/57241" items = [ @@ -118,6 +146,20 @@ items = [ { label = "general usage of float math,\narguments and return types" }, ] +[[group]] +name = "float_classify" +label = "float_classify" +href = "https://github.com/rust-lang/rust/issues/72505" +items = [] +requires = ["float_bits_conv"] + +[[group]] +name = "float_bits_conv" +label = "float_bits_conv" +href = "https://github.com/rust-lang/rust/issues/72447" +items = [] +requires = ["float"] + [[group]] name = "const-assert-eq" label = "assert_eq!" @@ -166,13 +208,6 @@ items = [ { label = "?const trait bound opt out", href = "https://github.com/rust-lang/rust/issues/67794"} ] -[[group]] -label = "feature gate\nconst_raw_ptr_deref" -name = "raw_ptr_deref" -href="https://github.com/rust-lang/rust/issues/51911" -items = [] -requires = ["unconst_rules"] - [[group]] label = "feature gate\nconst_raw_ptr_to_usize_cast" name = "raw_ptr_to_usize_cast" @@ -180,13 +215,6 @@ href="https://github.com/rust-lang/rust/issues/51910" items = [] requires = ["unconst_rules"] -[[group]] -label = "feature gate\nconst_fn_union" -name = "union" -href = "https://github.com/rust-lang/rust/issues/51909" -items = [] -requires = ["unconst_rules"] - [[group]] label = "feature gate\nconst_extern_fn" name = "extern_const_fn" @@ -222,7 +250,7 @@ requires = ["vec"] label = "Vec operations" name = "vec" items = [] -requires = ["mut_ref", "heap", "trait_impl", "drop", "raw_ptr_deref"] +requires = ["mut_ref", "heap", "trait_impl", "drop", "unconst_rules:raw_ptr_deref"] [[group]] label = "Drop" @@ -234,7 +262,7 @@ requires = ["mut_ref", "trait_impl"] label = "ptr::copy_nonoverlapping" name = "copy_nonoverlapping" items = [] -requires = ["raw_ptr_deref", "mut_ref"] +requires = ["unconst_rules:raw_ptr_deref", "mut_ref"] [[group]] label = "async functions\nand blocks" From 945d4341aab69252c247d79db7fa2d1d80ba257a Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Fri, 7 Aug 2020 13:19:40 +0200 Subject: [PATCH 02/13] `is_null` has a tracking issue --- src/skill_tree.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/skill_tree.md b/src/skill_tree.md index 9536ce0..f848d9c 100644 --- a/src/skill_tree.md +++ b/src/skill_tree.md @@ -62,6 +62,7 @@ items = [] name = "ptr-is-null" label = "<*T>::is_null" requires = ["fuzzy-ptr-comparisons"] +href = "https://github.com/rust-lang/rust/issues/74939" items = [] [[group]] From 966c4cbf70d56f34d4e99ad2daaf5cd9757e3276 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Fri, 7 Aug 2020 13:19:51 +0200 Subject: [PATCH 03/13] Mutexes don't necessarily need a heap --- src/skill_tree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/skill_tree.md b/src/skill_tree.md index f848d9c..fd2b1e1 100644 --- a/src/skill_tree.md +++ b/src/skill_tree.md @@ -119,7 +119,7 @@ name = "mutex_new" label = "Mutex::new" href = "https://github.com/rust-lang/rust/issues/66806" items = [] -requires = ["final_heap", "parking_lot", "unconst_rules"] +requires = ["parking_lot", "unconst_rules"] [[group]] name = "const_fn_in_patterns" From 3cdef2e5f1a967fb2851781676a7a951b6cb85af Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Fri, 7 Aug 2020 13:41:16 +0200 Subject: [PATCH 04/13] Apply suggestions from code review Co-authored-by: Ralf Jung --- src/skill_tree.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/skill_tree.md b/src/skill_tree.md index fd2b1e1..e458fc1 100644 --- a/src/skill_tree.md +++ b/src/skill_tree.md @@ -74,10 +74,10 @@ items = [] [[group]] name = "unconst_rules" -label = "Need to come up\nwith a scheme\nfor doing unsafe\nin const fn" +label = "Need to come up\nwith a scheme\nfor const unsafe/unconst" items = [ - { label = "transmute", href = "https://github.com/rust-lang/rust/issues/53605" }, - { label = "union field access", href = "https://github.com/rust-lang/rust/issues/51909", port = "union" }, + { label = "transmute in functions", href = "https://github.com/rust-lang/rust/issues/53605" }, + { label = "union field access in functions", href = "https://github.com/rust-lang/rust/issues/51909", port = "union" }, { label = "deref of raw pointers", href = "https://github.com/rust-lang/rust/issues/51911", port = "raw_ptr_deref" }, ] href = "https://github.com/rust-lang/const-eval/issues/14" From 3475faf0e2032ae76bad8528a0a62d7f1c45b9be Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Fri, 7 Aug 2020 13:23:56 +0200 Subject: [PATCH 05/13] Link to parking lot "tracking issue" --- src/skill_tree.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/skill_tree.md b/src/skill_tree.md index e458fc1..846d792 100644 --- a/src/skill_tree.md +++ b/src/skill_tree.md @@ -119,7 +119,12 @@ name = "mutex_new" label = "Mutex::new" href = "https://github.com/rust-lang/rust/issues/66806" items = [] -requires = ["parking_lot", "unconst_rules"] + +[[group]] +name = "parking_lot" +label = "`parking_lot` in `std`" +href = "https://github.com/rust-lang/rust/issues/73714" +items = [] [[group]] name = "const_fn_in_patterns" From 587b407750d1eb8ae6c230f2f959ce918d19c843 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Fri, 7 Aug 2020 13:43:43 +0200 Subject: [PATCH 06/13] Offset from is a prerequisite for `offset_of` --- src/skill_tree.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/skill_tree.md b/src/skill_tree.md index 846d792..14408ff 100644 --- a/src/skill_tree.md +++ b/src/skill_tree.md @@ -85,16 +85,20 @@ href = "https://github.com/rust-lang/const-eval/issues/14" [[group]] name = "offset_of" label = "offset_of" -items = [ - { label = "offset_from", href = "https://github.com/rust-lang/rust/issues/41079", port = "offset_from" }, -] href = "https://github.com/rust-lang/rust/issues/71499" requires = [ "unconst_rules:raw_ptr_deref", "raw_ref_macros", "maybe_uninit_as_ptr", + "offset_from", ] +[[group]] +name = "offset_from" +label = "offset_from" +href = "https://github.com/rust-lang/rust/issues/41079" +items = [] + [[group]] name = "raw_ref_macros" label = "raw_ref maros" From bcffb34d202c5535d02c8ab8f900a0031db9fa85 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Fri, 7 Aug 2020 13:46:39 +0200 Subject: [PATCH 07/13] Clarify where we want to use mutable references --- src/skill_tree.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/skill_tree.md b/src/skill_tree.md index 14408ff..87849e2 100644 --- a/src/skill_tree.md +++ b/src/skill_tree.md @@ -3,13 +3,13 @@ ```skill-tree [[group]] name = "mut_ref" -label = "mutable references" +label = "mutable references in\nconst fn" href = "https://github.com/rust-lang/rust/issues/57349" items = [] [[group]] name = "const_mut_ref" -label = "constants with mutable\nreferences in their final value" +label = "mutable references in\ninitializers of const items" href = "https://github.com/rust-lang/rust/issues/71212" requires = ["mut_ref"] items = [] From 368107dc0d34271f2f7c64637bacddd6fcf586ec Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Fri, 7 Aug 2020 13:57:49 +0200 Subject: [PATCH 08/13] question mark operator has a tracking issue --- src/skill_tree.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/skill_tree.md b/src/skill_tree.md index 87849e2..026e38f 100644 --- a/src/skill_tree.md +++ b/src/skill_tree.md @@ -115,6 +115,7 @@ items = [] [[group]] name = "question_mark" label = "using ? in const" +href = "https://github.com/rust-lang/rust/issues/74935" requires = ["trait_impl"] items = [] From c7a5866788cf4db390c6517314c828ae84a671f7 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Sun, 9 Aug 2020 01:37:16 +0200 Subject: [PATCH 09/13] Re-add lost requirement --- src/skill_tree.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/skill_tree.md b/src/skill_tree.md index 026e38f..8d0a84f 100644 --- a/src/skill_tree.md +++ b/src/skill_tree.md @@ -124,6 +124,7 @@ name = "mutex_new" label = "Mutex::new" href = "https://github.com/rust-lang/rust/issues/66806" items = [] +requires = ["parking_lot"] [[group]] name = "parking_lot" From fc4050dd105346508410650a72c7fa72aa086f1e Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Sun, 9 Aug 2020 01:38:40 +0200 Subject: [PATCH 10/13] Remove sub-feature that doesn't have a tracking issue --- src/skill_tree.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/skill_tree.md b/src/skill_tree.md index 8d0a84f..36d44cb 100644 --- a/src/skill_tree.md +++ b/src/skill_tree.md @@ -144,9 +144,7 @@ name = "from_str" label = "FromStr" href = "https://github.com/rust-lang/rust/issues/59133" requires = ["trait_impl"] -items = [ - { label = "<int>::from_str", port="int_parse", requires = ["iterators"] }, -] +items = [] [[group]] name = "float" From d4cc946430c36952b7046dde46cc0f0726aac456 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Sun, 9 Aug 2020 01:42:56 +0200 Subject: [PATCH 11/13] Fix up some typos --- src/skill_tree.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/skill_tree.md b/src/skill_tree.md index 36d44cb..9b47fa0 100644 --- a/src/skill_tree.md +++ b/src/skill_tree.md @@ -86,6 +86,7 @@ href = "https://github.com/rust-lang/const-eval/issues/14" name = "offset_of" label = "offset_of" href = "https://github.com/rust-lang/rust/issues/71499" +items = [] requires = [ "unconst_rules:raw_ptr_deref", "raw_ref_macros", @@ -276,7 +277,7 @@ requires = ["unconst_rules:raw_ptr_deref", "mut_ref"] [[group]] label = "async functions\nand blocks" -name = "asnyc" +name = "async" items = [] href = "https://github.com/rust-lang/rust/issues/69431" requires = ["trait_impl"] From 47873f20e091f8451bc6eb0f4626bbdef9cdcafc Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Mon, 10 Aug 2020 08:31:52 +0200 Subject: [PATCH 12/13] Mention all feature gate names --- src/skill_tree.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/skill_tree.md b/src/skill_tree.md index 9b47fa0..040200c 100644 --- a/src/skill_tree.md +++ b/src/skill_tree.md @@ -3,7 +3,7 @@ ```skill-tree [[group]] name = "mut_ref" -label = "mutable references in\nconst fn" +label = "mutable references in\nconst fn\nfg:const_mut_refs" href = "https://github.com/rust-lang/rust/issues/57349" items = [] @@ -60,14 +60,14 @@ items = [] [[group]] name = "ptr-is-null" -label = "<*T>::is_null" +label = "<*T>::is_null\nfg:const_ptr_is_null" requires = ["fuzzy-ptr-comparisons"] href = "https://github.com/rust-lang/rust/issues/74939" items = [] [[group]] name = "fuzzy-ptr-comparisons" -label = "guaranteed_eq and\nguaranteed_ne" +label = "guaranteed_eq and\nguaranteed_ne\nfg:const_compare_raw_pointers" href = "https://github.com/rust-lang/rust/issues/53020" requires = [] items = [] @@ -76,15 +76,15 @@ items = [] name = "unconst_rules" label = "Need to come up\nwith a scheme\nfor const unsafe/unconst" items = [ - { label = "transmute in functions", href = "https://github.com/rust-lang/rust/issues/53605" }, - { label = "union field access in functions", href = "https://github.com/rust-lang/rust/issues/51909", port = "union" }, - { label = "deref of raw pointers", href = "https://github.com/rust-lang/rust/issues/51911", port = "raw_ptr_deref" }, + { label = "transmute in functions\nfg:const_fn_transmute", href = "https://github.com/rust-lang/rust/issues/53605" }, + { label = "union field access in functions\nfg:const_fn_union", href = "https://github.com/rust-lang/rust/issues/51909", port = "union" }, + { label = "deref of raw pointers\nfg:const_raw_ptr_deref", href = "https://github.com/rust-lang/rust/issues/51911", port = "raw_ptr_deref" }, ] href = "https://github.com/rust-lang/const-eval/issues/14" [[group]] name = "offset_of" -label = "offset_of" +label = "offset_of\nfg:const_ptr_offset" href = "https://github.com/rust-lang/rust/issues/71499" items = [] requires = [ @@ -96,19 +96,19 @@ requires = [ [[group]] name = "offset_from" -label = "offset_from" +label = "offset_from\nfg:ptr_offset_from" href = "https://github.com/rust-lang/rust/issues/41079" items = [] [[group]] name = "raw_ref_macros" -label = "raw_ref maros" +label = "raw_ref maros\nfg:raw_ref_macros" href = "https://github.com/rust-lang/rust/issues/73394" items = [] [[group]] name = "maybe_uninit_as_ptr" -label = "MaybeUninit::as_ptr" +label = "MaybeUninit::as_ptr\nfg:const_maybe_uninit_as_ptr" href = "https://github.com/rust-lang/rust/issues/75251" items = [] @@ -159,14 +159,14 @@ items = [ [[group]] name = "float_classify" -label = "float_classify" +label = "fg:const_float_classify" href = "https://github.com/rust-lang/rust/issues/72505" items = [] requires = ["float_bits_conv"] [[group]] name = "float_bits_conv" -label = "float_bits_conv" +label = "fg:const_float_bits_conv" href = "https://github.com/rust-lang/rust/issues/72447" items = [] requires = ["float"] @@ -192,7 +192,7 @@ href = "https://github.com/rust-lang/rust/issues/51999" items = [] [[group]] -label = "feature gate\nconst_panic" +label = "fg:const_panic" name = "panic" href = "https://github.com/rust-lang/rust/issues/51999" items = [ @@ -200,19 +200,19 @@ items = [ ] [[group]] -label = "feature gate\nconst_discriminant" +label = "fg:const_discriminant" name = "discriminant" href = "https://github.com/rust-lang/rust/pull/69825" items = [] [[group]] -label = "feature gate\nconst_trait_bound_opt_out" +label = "fg:const_trait_bound_opt_out" name = "trait_bound_opt_out" href = "https://github.com/rust-lang/rust/issues/67794" items = [] [[group]] -label = "feature gate\nconst_trait_impl" +label = "fg:const_trait_impl" name = "trait_impl" href="https://github.com/rust-lang/rust/issues/67792" items = [ @@ -220,14 +220,14 @@ items = [ ] [[group]] -label = "feature gate\nconst_raw_ptr_to_usize_cast" +label = "fg:const_raw_ptr_to_usize_cast" name = "raw_ptr_to_usize_cast" href="https://github.com/rust-lang/rust/issues/51910" items = [] requires = ["unconst_rules"] [[group]] -label = "feature gate\nconst_extern_fn" +label = "fg:const_extern_fn" name = "extern_const_fn" href = "https://github.com/rust-lang/rust/issues/64926" items = [] From 13c23efef26ae68859baeae018012d6f23de4194 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Mon, 10 Aug 2020 12:12:10 +0200 Subject: [PATCH 13/13] Use `feature` instead of `fg` and adjust some item names that tried to use newlines (which isn't supported) --- src/skill_tree.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/skill_tree.md b/src/skill_tree.md index 040200c..f734df8 100644 --- a/src/skill_tree.md +++ b/src/skill_tree.md @@ -3,7 +3,7 @@ ```skill-tree [[group]] name = "mut_ref" -label = "mutable references in\nconst fn\nfg:const_mut_refs" +label = "mutable references in\nconst fn\nfeature:const_mut_refs" href = "https://github.com/rust-lang/rust/issues/57349" items = [] @@ -60,14 +60,14 @@ items = [] [[group]] name = "ptr-is-null" -label = "<*T>::is_null\nfg:const_ptr_is_null" +label = "<*T>::is_null\nfeature:const_ptr_is_null" requires = ["fuzzy-ptr-comparisons"] href = "https://github.com/rust-lang/rust/issues/74939" items = [] [[group]] name = "fuzzy-ptr-comparisons" -label = "guaranteed_eq and\nguaranteed_ne\nfg:const_compare_raw_pointers" +label = "guaranteed_eq and\nguaranteed_ne\nfeature:const_compare_raw_pointers" href = "https://github.com/rust-lang/rust/issues/53020" requires = [] items = [] @@ -76,15 +76,15 @@ items = [] name = "unconst_rules" label = "Need to come up\nwith a scheme\nfor const unsafe/unconst" items = [ - { label = "transmute in functions\nfg:const_fn_transmute", href = "https://github.com/rust-lang/rust/issues/53605" }, - { label = "union field access in functions\nfg:const_fn_union", href = "https://github.com/rust-lang/rust/issues/51909", port = "union" }, - { label = "deref of raw pointers\nfg:const_raw_ptr_deref", href = "https://github.com/rust-lang/rust/issues/51911", port = "raw_ptr_deref" }, + { label = "feature:const_fn_transmute", href = "https://github.com/rust-lang/rust/issues/53605" }, + { label = "feature:const_fn_union", href = "https://github.com/rust-lang/rust/issues/51909", port = "union" }, + { label = "feature:const_raw_ptr_deref", href = "https://github.com/rust-lang/rust/issues/51911", port = "raw_ptr_deref" }, ] href = "https://github.com/rust-lang/const-eval/issues/14" [[group]] name = "offset_of" -label = "offset_of\nfg:const_ptr_offset" +label = "offset_of\nfeature:const_ptr_offset" href = "https://github.com/rust-lang/rust/issues/71499" items = [] requires = [ @@ -96,19 +96,19 @@ requires = [ [[group]] name = "offset_from" -label = "offset_from\nfg:ptr_offset_from" +label = "offset_from\nfeature:ptr_offset_from" href = "https://github.com/rust-lang/rust/issues/41079" items = [] [[group]] name = "raw_ref_macros" -label = "raw_ref maros\nfg:raw_ref_macros" +label = "raw_ref maros\nfeature:raw_ref_macros" href = "https://github.com/rust-lang/rust/issues/73394" items = [] [[group]] name = "maybe_uninit_as_ptr" -label = "MaybeUninit::as_ptr\nfg:const_maybe_uninit_as_ptr" +label = "MaybeUninit::as_ptr\nfeature:const_maybe_uninit_as_ptr" href = "https://github.com/rust-lang/rust/issues/75251" items = [] @@ -154,19 +154,19 @@ href = "https://github.com/rust-lang/rust/issues/57241" items = [ { label = "from_bits" }, { label = "to_bits" }, - { label = "general usage of float math,\narguments and return types" }, + { label = "float math, arguments and return types" }, ] [[group]] name = "float_classify" -label = "fg:const_float_classify" +label = "feature:const_float_classify" href = "https://github.com/rust-lang/rust/issues/72505" items = [] requires = ["float_bits_conv"] [[group]] name = "float_bits_conv" -label = "fg:const_float_bits_conv" +label = "feature:const_float_bits_conv" href = "https://github.com/rust-lang/rust/issues/72447" items = [] requires = ["float"] @@ -192,7 +192,7 @@ href = "https://github.com/rust-lang/rust/issues/51999" items = [] [[group]] -label = "fg:const_panic" +label = "feature:const_panic" name = "panic" href = "https://github.com/rust-lang/rust/issues/51999" items = [ @@ -200,19 +200,19 @@ items = [ ] [[group]] -label = "fg:const_discriminant" +label = "feature:const_discriminant" name = "discriminant" href = "https://github.com/rust-lang/rust/pull/69825" items = [] [[group]] -label = "fg:const_trait_bound_opt_out" +label = "feature:const_trait_bound_opt_out" name = "trait_bound_opt_out" href = "https://github.com/rust-lang/rust/issues/67794" items = [] [[group]] -label = "fg:const_trait_impl" +label = "feature:const_trait_impl" name = "trait_impl" href="https://github.com/rust-lang/rust/issues/67792" items = [ @@ -220,14 +220,14 @@ items = [ ] [[group]] -label = "fg:const_raw_ptr_to_usize_cast" +label = "feature:const_raw_ptr_to_usize_cast" name = "raw_ptr_to_usize_cast" href="https://github.com/rust-lang/rust/issues/51910" items = [] requires = ["unconst_rules"] [[group]] -label = "fg:const_extern_fn" +label = "feature:const_extern_fn" name = "extern_const_fn" href = "https://github.com/rust-lang/rust/issues/64926" items = []