diff --git a/src/Cargo.lock b/src/Cargo.lock
index 62b853480394f..26c7dc3ce9726 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -922,9 +922,6 @@ dependencies = [
[[package]]
name = "tidy"
version = "0.1.0"
-dependencies = [
- "regex 0.2.1 (registry+/~https://github.com/rust-lang/crates.io-index)",
-]
[[package]]
name = "toml"
diff --git a/src/doc/book b/src/doc/book
index beea82b9230cd..ad7de198561b3 160000
--- a/src/doc/book
+++ b/src/doc/book
@@ -1 +1 @@
-Subproject commit beea82b9230cd641dd1ca263cf31025ace4aebb5
+Subproject commit ad7de198561b3a12217ea2da76d796d9c7fc0ed3
diff --git a/src/doc/guide-plugins.md b/src/doc/guide-plugins.md
index 1ba28c0117db5..6c511548789b7 100644
--- a/src/doc/guide-plugins.md
+++ b/src/doc/guide-plugins.md
@@ -1,4 +1,4 @@
% The (old) Rust Compiler Plugins Guide
This content has moved into
-[the Unstable Book](unstable-book/plugin.html).
+[the Unstable Book](unstable-book/language-features/plugin.html).
diff --git a/src/doc/reference b/src/doc/reference
index b060f732145f2..6b0de90d87dda 160000
--- a/src/doc/reference
+++ b/src/doc/reference
@@ -1 +1 @@
-Subproject commit b060f732145f2fa16df84c74e511df08a3a47c5d
+Subproject commit 6b0de90d87dda15e323ef24cdf7ed873ac5cf4d3
diff --git a/src/doc/unstable-book/src/SUMMARY.md b/src/doc/unstable-book/src/SUMMARY.md
index 36999eb143ff4..3e0415439774c 100644
--- a/src/doc/unstable-book/src/SUMMARY.md
+++ b/src/doc/unstable-book/src/SUMMARY.md
@@ -1,226 +1,228 @@
[The Unstable Book](the-unstable-book.md)
-- [abi_msp430_interrupt](abi-msp430-interrupt.md)
-- [abi_ptx](abi-ptx.md)
-- [abi_sysv64](abi-sysv64.md)
-- [abi_unadjusted](abi-unadjusted.md)
-- [abi_vectorcall](abi-vectorcall.md)
-- [abi_x86_interrupt](abi-x86-interrupt.md)
-- [advanced_slice_patterns](advanced-slice-patterns.md)
-- [alloc](alloc.md)
-- [alloc_jemalloc](alloc-jemalloc.md)
-- [alloc_system](alloc-system.md)
-- [allocator](allocator.md)
-- [allow_internal_unstable](allow-internal-unstable.md)
-- [as_c_str](as-c-str.md)
-- [as_unsafe_cell](as-unsafe-cell.md)
-- [ascii_ctype](ascii-ctype.md)
-- [asm](asm.md)
-- [associated_consts](associated-consts.md)
-- [associated_type_defaults](associated-type-defaults.md)
-- [attr_literals](attr-literals.md)
-- [binary_heap_extras](binary-heap-extras.md)
-- [binary_heap_peek_mut_pop](binary-heap-peek-mut-pop.md)
-- [borrow_state](borrow-state.md)
-- [box_heap](box-heap.md)
-- [box_patterns](box-patterns.md)
-- [box_syntax](box-syntax.md)
-- [c_void_variant](c-void-variant.md)
-- [catch_expr](catch-expr.md)
-- [cfg_target_feature](cfg-target-feature.md)
-- [cfg_target_has_atomic](cfg-target-has-atomic.md)
-- [cfg_target_thread_local](cfg-target-thread-local.md)
-- [cfg_target_vendor](cfg-target-vendor.md)
-- [char_escape_debug](char-escape-debug.md)
-- [closure_to_fn_coercion](closure-to-fn-coercion.md)
-- [coerce_unsized](coerce-unsized.md)
-- [collection_placement](collection-placement.md)
-- [collections](collections.md)
-- [collections_range](collections-range.md)
-- [command_envs](command-envs.md)
-- [compiler_fences](compiler-fences.md)
-- [compiler_builtins](compiler-builtins.md)
-- [compiler_builtins_lib](compiler-builtins-lib.md)
-- [concat_idents](concat-idents.md)
-- [concat_idents_macro](concat-idents-macro.md)
-- [conservative_impl_trait](conservative-impl-trait.md)
-- [const_fn](const-fn.md)
-- [const_indexing](const-indexing.md)
-- [core_char_ext](core-char-ext.md)
-- [core_float](core-float.md)
-- [core_intrinsics](core-intrinsics.md)
-- [core_panic](core-panic.md)
-- [core_private_bignum](core-private-bignum.md)
-- [core_private_diy_float](core-private-diy-float.md)
-- [core_slice_ext](core-slice-ext.md)
-- [core_str_ext](core-str-ext.md)
-- [custom_attribute](custom-attribute.md)
-- [custom_derive](custom-derive.md)
-- [dec2flt](dec2flt.md)
-- [decode_utf8](decode-utf8.md)
-- [default_type_parameter_fallback](default-type-parameter-fallback.md)
-- [derive_clone_copy](derive-clone-copy.md)
-- [derive_eq](derive-eq.md)
-- [discriminant_value](discriminant-value.md)
-- [drop_types_in_const](drop-types-in-const.md)
-- [dropck_eyepatch](dropck-eyepatch.md)
-- [dropck_parametricity](dropck-parametricity.md)
-- [enumset](enumset.md)
-- [error_type_id](error-type-id.md)
-- [exact_size_is_empty](exact-size-is-empty.md)
-- [exclusive_range_pattern](exclusive-range-pattern.md)
-- [fd](fd.md)
-- [fd_read](fd-read.md)
-- [fixed_size_array](fixed-size-array.md)
-- [float_bits_conv](float-bits-conv.md)
-- [float_extras](float-extras.md)
-- [flt2dec](flt2dec.md)
-- [fmt_flags_align](fmt-flags-align.md)
-- [fmt_internals](fmt-internals.md)
-- [fn_traits](fn-traits.md)
-- [fnbox](fnbox.md)
-- [from_utf8_error_as_bytes](from_utf8_error_as_bytes.md)
-- [fundamental](fundamental.md)
-- [fused](fused.md)
-- [future_atomic_orderings](future-atomic-orderings.md)
-- [generic_param_attrs](generic-param-attrs.md)
-- [get_type_id](get-type-id.md)
-- [global_asm](global_asm.md)
-- [heap_api](heap-api.md)
-- [i128](i128.md)
-- [i128_type](i128-type.md)
-- [inclusive_range](inclusive-range.md)
-- [inclusive_range_syntax](inclusive-range-syntax.md)
-- [int_error_internals](int-error-internals.md)
-- [integer_atomics](integer-atomics.md)
-- [into_boxed_c_str](into-boxed-c-str.md)
-- [into_boxed_os_str](into-boxed-os-str.md)
-- [into_boxed_path](into-boxed-path.md)
-- [intrinsics](intrinsics.md)
-- [io](io.md)
-- [io_error_internals](io-error-internals.md)
-- [ip](ip.md)
-- [is_unique](is-unique.md)
-- [iter_rfind](iter-rfind.md)
-- [lang_items](lang-items.md)
-- [libstd_io_internals](libstd-io-internals.md)
-- [libstd_sys_internals](libstd-sys-internals.md)
-- [libstd_thread_internals](libstd-thread-internals.md)
-- [link_args](link-args.md)
-- [link_cfg](link-cfg.md)
-- [link_llvm_intrinsics](link-llvm-intrinsics.md)
-- [linkage](linkage.md)
-- [linked_list_extras](linked-list-extras.md)
-- [linker_flavor](linker-flavor.md)
-- [log_syntax](log-syntax.md)
-- [lookup_host](lookup-host.md)
-- [loop_break_value](loop-break-value.md)
-- [macro_reexport](macro-reexport.md)
-- [macro_vis_matcher](macro-vis-matcher.md)
-- [main](main.md)
-- [manually_drop](manually-drop.md)
-- [map_entry_recover_keys](map-entry-recover-keys.md)
-- [mpsc_select](mpsc-select.md)
-- [n16](n16.md)
-- [naked_functions](naked-functions.md)
-- [needs_allocator](needs-allocator.md)
-- [needs_panic_runtime](needs-panic-runtime.md)
-- [never_type](never-type.md)
-- [never_type_impls](never-type-impls.md)
-- [no_core](no-core.md)
-- [no_debug](no-debug.md)
-- [non_ascii_idents](non-ascii-idents.md)
-- [nonzero](nonzero.md)
-- [offset_to](offset-to.md)
-- [omit_gdb_pretty_printer_section](omit-gdb-pretty-printer-section.md)
-- [on_unimplemented](on-unimplemented.md)
-- [once_poison](once-poison.md)
-- [oom](oom.md)
-- [optin_builtin_traits](optin-builtin-traits.md)
-- [option_entry](option-entry.md)
-- [osstring_shrink_to_fit](osstring-shrink-to-fit.md)
-- [overlapping_marker_traits](overlapping-marker-traits.md)
-- [panic_abort](panic-abort.md)
-- [panic_runtime](panic-runtime.md)
-- [panic_unwind](panic-unwind.md)
-- [pattern](pattern.md)
-- [peek](peek.md)
-- [placement_in](placement-in.md)
-- [placement_in_syntax](placement-in-syntax.md)
-- [placement_new_protocol](placement-new-protocol.md)
-- [platform_intrinsics](platform-intrinsics.md)
-- [plugin](plugin.md)
-- [plugin_registrar](plugin-registrar.md)
-- [prelude_import](prelude-import.md)
-- [print](print.md)
-- [proc_macro](proc-macro.md)
-- [proc_macro_internals](proc-macro-internals.md)
-- [process_try_wait](process-try-wait.md)
-- [question_mark_carrier](question-mark-carrier.md)
-- [quote](quote.md)
-- [rand](rand.md)
-- [range_contains](range-contains.md)
-- [raw](raw.md)
-- [rc_would_unwrap](rc-would-unwrap.md)
-- [relaxed_adts](relaxed-adts.md)
-- [repr_simd](repr-simd.md)
-- [retain_hash_collection](retain-hash-collection.md)
-- [reverse_cmp_key](reverse-cmp-key.md)
-- [rt](rt.md)
-- [rustc_attrs](rustc-attrs.md)
-- [rustc_diagnostic_macros](rustc-diagnostic-macros.md)
-- [rustc_private](rustc-private.md)
-- [rvalue_static_promotion](rvalue-static-promotion.md)
-- [sanitizer_runtime](sanitizer-runtime.md)
-- [sanitizer_runtime_lib](sanitizer-runtime-lib.md)
-- [set_stdio](set-stdio.md)
-- [shared](shared.md)
-- [simd](simd.md)
-- [simd_ffi](simd-ffi.md)
-- [sip_hash_13](sip-hash-13.md)
-- [slice_concat_ext](slice-concat-ext.md)
-- [slice_get_slice](slice-get-slice.md)
-- [slice_patterns](slice-patterns.md)
-- [slice_rsplit](slice-rsplit.md)
-- [sort_internals](sort-internals.md)
-- [sort_unstable](sort-unstable.md)
-- [specialization](specialization.md)
-- [staged_api](staged-api.md)
-- [start](start.md)
-- [static_nobundle](static-nobundle.md)
-- [step_by](step-by.md)
-- [step_trait](step-trait.md)
-- [stmt_expr_attributes](stmt-expr-attributes.md)
-- [str_checked_slicing](str-checked-slicing.md)
-- [str_escape](str-escape.md)
-- [str_internals](str-internals.md)
-- [str_mut_extras](str-mut-extras.md)
-- [struct_field_attributes](struct-field-attributes.md)
-- [structural_match](structural-match.md)
-- [target_feature](target-feature.md)
-- [test](test.md)
-- [thread_id](thread-id.md)
-- [thread_local](thread-local.md)
-- [thread_local_internals](thread-local-internals.md)
-- [thread_local_state](thread-local-state.md)
-- [toowned_clone_into](toowned-clone-into.md)
-- [trace_macros](trace-macros.md)
-- [trusted_len](trusted-len.md)
-- [try_from](try-from.md)
-- [type_ascription](type-ascription.md)
-- [unboxed_closures](unboxed-closures.md)
-- [unicode](unicode.md)
-- [unique](unique.md)
-- [unsize](unsize.md)
-- [untagged_unions](untagged-unions.md)
-- [unwind_attributes](unwind-attributes.md)
-- [update_panic_count](update-panic-count.md)
-- [use_extern_macros](use-extern-macros.md)
-- [used](used.md)
-- [utf8_error_error_len](utf8-error-error-len.md)
-- [vec_remove_item](vec-remove-item.md)
-- [windows_c](windows-c.md)
-- [windows_handle](windows-handle.md)
-- [windows_net](windows-net.md)
-- [windows_stdio](windows-stdio.md)
-- [zero_one](zero-one.md)
+- [Compiler flags](compiler-flags.md)
+ - [linker_flavor](compiler-flags/linker-flavor.md)
+- [Language features](language-features.md)
+ - [abi_msp430_interrupt](language-features/abi-msp430-interrupt.md)
+ - [abi_ptx](language-features/abi-ptx.md)
+ - [abi_sysv64](language-features/abi-sysv64.md)
+ - [abi_unadjusted](language-features/abi-unadjusted.md)
+ - [abi_vectorcall](language-features/abi-vectorcall.md)
+ - [abi_x86_interrupt](language-features/abi-x86-interrupt.md)
+ - [advanced_slice_patterns](language-features/advanced-slice-patterns.md)
+ - [allocator](language-features/allocator.md)
+ - [allow_internal_unstable](language-features/allow-internal-unstable.md)
+ - [asm](language-features/asm.md)
+ - [associated_consts](language-features/associated-consts.md)
+ - [associated_type_defaults](language-features/associated-type-defaults.md)
+ - [attr_literals](language-features/attr-literals.md)
+ - [box_patterns](language-features/box-patterns.md)
+ - [box_syntax](language-features/box-syntax.md)
+ - [catch_expr](language-features/catch-expr.md)
+ - [cfg_target_feature](language-features/cfg-target-feature.md)
+ - [cfg_target_has_atomic](language-features/cfg-target-has-atomic.md)
+ - [cfg_target_thread_local](language-features/cfg-target-thread-local.md)
+ - [cfg_target_vendor](language-features/cfg-target-vendor.md)
+ - [closure_to_fn_coercion](language-features/closure-to-fn-coercion.md)
+ - [compiler_builtins](language-features/compiler-builtins.md)
+ - [concat_idents](language-features/concat-idents.md)
+ - [conservative_impl_trait](language-features/conservative-impl-trait.md)
+ - [const_fn](language-features/const-fn.md)
+ - [const_indexing](language-features/const-indexing.md)
+ - [custom_attribute](language-features/custom-attribute.md)
+ - [custom_derive](language-features/custom-derive.md)
+ - [default_type_parameter_fallback](language-features/default-type-parameter-fallback.md)
+ - [drop_types_in_const](language-features/drop-types-in-const.md)
+ - [dropck_eyepatch](language-features/dropck-eyepatch.md)
+ - [dropck_parametricity](language-features/dropck-parametricity.md)
+ - [exclusive_range_pattern](language-features/exclusive-range-pattern.md)
+ - [fundamental](language-features/fundamental.md)
+ - [generic_param_attrs](language-features/generic-param-attrs.md)
+ - [global_asm](language-features/global_asm.md)
+ - [i128_type](language-features/i128-type.md)
+ - [inclusive_range_syntax](language-features/inclusive-range-syntax.md)
+ - [intrinsics](language-features/intrinsics.md)
+ - [lang_items](language-features/lang-items.md)
+ - [link_args](language-features/link-args.md)
+ - [link_cfg](language-features/link-cfg.md)
+ - [link_llvm_intrinsics](language-features/link-llvm-intrinsics.md)
+ - [linkage](language-features/linkage.md)
+ - [log_syntax](language-features/log-syntax.md)
+ - [loop_break_value](language-features/loop-break-value.md)
+ - [macro_reexport](language-features/macro-reexport.md)
+ - [macro_vis_matcher](language-features/macro-vis-matcher.md)
+ - [main](language-features/main.md)
+ - [naked_functions](language-features/naked-functions.md)
+ - [needs_allocator](language-features/needs-allocator.md)
+ - [needs_panic_runtime](language-features/needs-panic-runtime.md)
+ - [never_type](language-features/never-type.md)
+ - [no_core](language-features/no-core.md)
+ - [no_debug](language-features/no-debug.md)
+ - [non_ascii_idents](language-features/non-ascii-idents.md)
+ - [omit_gdb_pretty_printer_section](language-features/omit-gdb-pretty-printer-section.md)
+ - [on_unimplemented](language-features/on-unimplemented.md)
+ - [optin_builtin_traits](language-features/optin-builtin-traits.md)
+ - [overlapping_marker_traits](language-features/overlapping-marker-traits.md)
+ - [panic_runtime](language-features/panic-runtime.md)
+ - [placement_in_syntax](language-features/placement-in-syntax.md)
+ - [platform_intrinsics](language-features/platform-intrinsics.md)
+ - [plugin](language-features/plugin.md)
+ - [plugin_registrar](language-features/plugin-registrar.md)
+ - [prelude_import](language-features/prelude-import.md)
+ - [proc_macro](language-features/proc-macro.md)
+ - [quote](language-features/quote.md)
+ - [relaxed_adts](language-features/relaxed-adts.md)
+ - [repr_simd](language-features/repr-simd.md)
+ - [rustc_attrs](language-features/rustc-attrs.md)
+ - [rustc_diagnostic_macros](language-features/rustc-diagnostic-macros.md)
+ - [rvalue_static_promotion](language-features/rvalue-static-promotion.md)
+ - [sanitizer_runtime](language-features/sanitizer-runtime.md)
+ - [simd](language-features/simd.md)
+ - [simd_ffi](language-features/simd-ffi.md)
+ - [slice_patterns](language-features/slice-patterns.md)
+ - [specialization](language-features/specialization.md)
+ - [staged_api](language-features/staged-api.md)
+ - [start](language-features/start.md)
+ - [static_nobundle](language-features/static-nobundle.md)
+ - [stmt_expr_attributes](language-features/stmt-expr-attributes.md)
+ - [struct_field_attributes](language-features/struct-field-attributes.md)
+ - [structural_match](language-features/structural-match.md)
+ - [target_feature](language-features/target-feature.md)
+ - [thread_local](language-features/thread-local.md)
+ - [trace_macros](language-features/trace-macros.md)
+ - [type_ascription](language-features/type-ascription.md)
+ - [unboxed_closures](language-features/unboxed-closures.md)
+ - [untagged_unions](language-features/untagged-unions.md)
+ - [unwind_attributes](language-features/unwind-attributes.md)
+ - [use_extern_macros](language-features/use-extern-macros.md)
+ - [used](language-features/used.md)
+- [Library Features](library-features.md)
+ - [alloc_jemalloc](library-features/alloc-jemalloc.md)
+ - [alloc_system](library-features/alloc-system.md)
+ - [alloc](library-features/alloc.md)
+ - [as_c_str](library-features/as-c-str.md)
+ - [as_unsafe_cell](library-features/as-unsafe-cell.md)
+ - [ascii_ctype](library-features/ascii-ctype.md)
+ - [binary_heap_extras](library-features/binary-heap-extras.md)
+ - [binary_heap_peek_mut_pop](library-features/binary-heap-peek-mut-pop.md)
+ - [borrow_state](library-features/borrow-state.md)
+ - [box_heap](library-features/box-heap.md)
+ - [c_void_variant](library-features/c-void-variant.md)
+ - [char_escape_debug](library-features/char-escape-debug.md)
+ - [coerce_unsized](library-features/coerce-unsized.md)
+ - [collection_placement](library-features/collection-placement.md)
+ - [collections_range](library-features/collections-range.md)
+ - [collections](library-features/collections.md)
+ - [command_envs](library-features/command-envs.md)
+ - [compiler_builtins_lib](library-features/compiler-builtins-lib.md)
+ - [compiler_fences](library-features/compiler-fences.md)
+ - [concat_idents_macro](library-features/concat-idents-macro.md)
+ - [core_char_ext](library-features/core-char-ext.md)
+ - [core_float](library-features/core-float.md)
+ - [core_intrinsics](library-features/core-intrinsics.md)
+ - [core_panic](library-features/core-panic.md)
+ - [core_private_bignum](library-features/core-private-bignum.md)
+ - [core_private_diy_float](library-features/core-private-diy-float.md)
+ - [core_slice_ext](library-features/core-slice-ext.md)
+ - [core_str_ext](library-features/core-str-ext.md)
+ - [dec2flt](library-features/dec2flt.md)
+ - [decode_utf8](library-features/decode-utf8.md)
+ - [derive_clone_copy](library-features/derive-clone-copy.md)
+ - [derive_eq](library-features/derive-eq.md)
+ - [discriminant_value](library-features/discriminant-value.md)
+ - [enumset](library-features/enumset.md)
+ - [error_type_id](library-features/error-type-id.md)
+ - [exact_size_is_empty](library-features/exact-size-is-empty.md)
+ - [fd](library-features/fd.md)
+ - [fd_read](library-features/fd-read.md)
+ - [fixed_size_array](library-features/fixed-size-array.md)
+ - [float_bits_conv](library-features/float-bits-conv.md)
+ - [float_extras](library-features/float-extras.md)
+ - [flt2dec](library-features/flt2dec.md)
+ - [fmt_flags_align](library-features/fmt-flags-align.md)
+ - [fmt_internals](library-features/fmt-internals.md)
+ - [fn_traits](library-features/fn-traits.md)
+ - [fnbox](library-features/fnbox.md)
+ - [from_utf8_error_as_bytes](library-features/from_utf8_error_as_bytes.md)
+ - [fused](library-features/fused.md)
+ - [future_atomic_orderings](library-features/future-atomic-orderings.md)
+ - [get_type_id](library-features/get-type-id.md)
+ - [heap_api](library-features/heap-api.md)
+ - [i128](library-features/i128.md)
+ - [inclusive_range](library-features/inclusive-range.md)
+ - [integer_atomics](library-features/integer-atomics.md)
+ - [into_boxed_c_str](library-features/into-boxed-c-str.md)
+ - [into_boxed_os_str](library-features/into-boxed-os-str.md)
+ - [into_boxed_path](library-features/into-boxed-path.md)
+ - [io_error_internals](library-features/io-error-internals.md)
+ - [io](library-features/io.md)
+ - [ip](library-features/ip.md)
+ - [is_unique](library-features/is-unique.md)
+ - [iter_rfind](library-features/iter-rfind.md)
+ - [libstd_io_internals](library-features/libstd-io-internals.md)
+ - [libstd_sys_internals](library-features/libstd-sys-internals.md)
+ - [libstd_thread_internals](library-features/libstd-thread-internals.md)
+ - [linked_list_extras](library-features/linked-list-extras.md)
+ - [lookup_host](library-features/lookup-host.md)
+ - [manually_drop](library-features/manually-drop.md)
+ - [map_entry_recover_keys](library-features/map-entry-recover-keys.md)
+ - [mpsc_select](library-features/mpsc-select.md)
+ - [n16](library-features/n16.md)
+ - [never_type_impls](library-features/never-type-impls.md)
+ - [nonzero](library-features/nonzero.md)
+ - [offset_to](library-features/offset-to.md)
+ - [once_poison](library-features/once-poison.md)
+ - [oom](library-features/oom.md)
+ - [option_entry](library-features/option-entry.md)
+ - [osstring_shrink_to_fit](library-features/osstring-shrink-to-fit.md)
+ - [panic_abort](library-features/panic-abort.md)
+ - [panic_unwind](library-features/panic-unwind.md)
+ - [pattern](library-features/pattern.md)
+ - [peek](library-features/peek.md)
+ - [placement_in](library-features/placement-in.md)
+ - [placement_new_protocol](library-features/placement-new-protocol.md)
+ - [print](library-features/print.md)
+ - [proc_macro_internals](library-features/proc-macro-internals.md)
+ - [process_try_wait](library-features/process-try-wait.md)
+ - [question_mark_carrier](library-features/question-mark-carrier.md)
+ - [rand](library-features/rand.md)
+ - [range_contains](library-features/range-contains.md)
+ - [raw](library-features/raw.md)
+ - [rc_would_unwrap](library-features/rc-would-unwrap.md)
+ - [retain_hash_collection](library-features/retain-hash-collection.md)
+ - [reverse_cmp_key](library-features/reverse-cmp-key.md)
+ - [rt](library-features/rt.md)
+ - [rustc_private](library-features/rustc-private.md)
+ - [sanitizer_runtime_lib](library-features/sanitizer-runtime-lib.md)
+ - [set_stdio](library-features/set-stdio.md)
+ - [shared](library-features/shared.md)
+ - [sip_hash_13](library-features/sip-hash-13.md)
+ - [slice_concat_ext](library-features/slice-concat-ext.md)
+ - [slice_get_slice](library-features/slice-get-slice.md)
+ - [slice_rsplit](library-features/slice-rsplit.md)
+ - [sort_internals](library-features/sort-internals.md)
+ - [sort_unstable](library-features/sort-unstable.md)
+ - [step_by](library-features/step-by.md)
+ - [step_trait](library-features/step-trait.md)
+ - [str_checked_slicing](library-features/str-checked-slicing.md)
+ - [str_escape](library-features/str-escape.md)
+ - [str_internals](library-features/str-internals.md)
+ - [str_mut_extras](library-features/str-mut-extras.md)
+ - [test](library-features/test.md)
+ - [thread_id](library-features/thread-id.md)
+ - [thread_local_internals](library-features/thread-local-internals.md)
+ - [thread_local_state](library-features/thread-local-state.md)
+ - [toowned_clone_into](library-features/toowned-clone-into.md)
+ - [trusted_len](library-features/trusted-len.md)
+ - [try_from](library-features/try-from.md)
+ - [unicode](library-features/unicode.md)
+ - [unique](library-features/unique.md)
+ - [unsize](library-features/unsize.md)
+ - [utf8_error_error_len](library-features/utf8-error-error-len.md)
+ - [vec_remove_item](library-features/vec-remove-item.md)
+ - [windows_c](library-features/windows-c.md)
+ - [windows_handle](library-features/windows-handle.md)
+ - [windows_net](library-features/windows-net.md)
+ - [windows_stdio](library-features/windows-stdio.md)
+ - [zero_one](library-features/zero-one.md)
+>>>>>> Add top level sections to the Unstable Book.
diff --git a/src/doc/unstable-book/src/compiler-flags.md b/src/doc/unstable-book/src/compiler-flags.md
new file mode 100644
index 0000000000000..43eadb351016d
--- /dev/null
+++ b/src/doc/unstable-book/src/compiler-flags.md
@@ -0,0 +1 @@
+# Compiler flags
diff --git a/src/doc/unstable-book/src/linker-flavor.md b/src/doc/unstable-book/src/compiler-flags/linker-flavor.md
similarity index 100%
rename from src/doc/unstable-book/src/linker-flavor.md
rename to src/doc/unstable-book/src/compiler-flags/linker-flavor.md
diff --git a/src/doc/unstable-book/src/language-features.md b/src/doc/unstable-book/src/language-features.md
new file mode 100644
index 0000000000000..a27514df97d69
--- /dev/null
+++ b/src/doc/unstable-book/src/language-features.md
@@ -0,0 +1 @@
+# Language features
diff --git a/src/doc/unstable-book/src/abi-msp430-interrupt.md b/src/doc/unstable-book/src/language-features/abi-msp430-interrupt.md
similarity index 100%
rename from src/doc/unstable-book/src/abi-msp430-interrupt.md
rename to src/doc/unstable-book/src/language-features/abi-msp430-interrupt.md
diff --git a/src/doc/unstable-book/src/abi-ptx.md b/src/doc/unstable-book/src/language-features/abi-ptx.md
similarity index 100%
rename from src/doc/unstable-book/src/abi-ptx.md
rename to src/doc/unstable-book/src/language-features/abi-ptx.md
diff --git a/src/doc/unstable-book/src/abi-sysv64.md b/src/doc/unstable-book/src/language-features/abi-sysv64.md
similarity index 100%
rename from src/doc/unstable-book/src/abi-sysv64.md
rename to src/doc/unstable-book/src/language-features/abi-sysv64.md
diff --git a/src/doc/unstable-book/src/abi-unadjusted.md b/src/doc/unstable-book/src/language-features/abi-unadjusted.md
similarity index 100%
rename from src/doc/unstable-book/src/abi-unadjusted.md
rename to src/doc/unstable-book/src/language-features/abi-unadjusted.md
diff --git a/src/doc/unstable-book/src/abi-vectorcall.md b/src/doc/unstable-book/src/language-features/abi-vectorcall.md
similarity index 100%
rename from src/doc/unstable-book/src/abi-vectorcall.md
rename to src/doc/unstable-book/src/language-features/abi-vectorcall.md
diff --git a/src/doc/unstable-book/src/abi-x86-interrupt.md b/src/doc/unstable-book/src/language-features/abi-x86-interrupt.md
similarity index 100%
rename from src/doc/unstable-book/src/abi-x86-interrupt.md
rename to src/doc/unstable-book/src/language-features/abi-x86-interrupt.md
diff --git a/src/doc/unstable-book/src/advanced-slice-patterns.md b/src/doc/unstable-book/src/language-features/advanced-slice-patterns.md
similarity index 100%
rename from src/doc/unstable-book/src/advanced-slice-patterns.md
rename to src/doc/unstable-book/src/language-features/advanced-slice-patterns.md
diff --git a/src/doc/unstable-book/src/allocator.md b/src/doc/unstable-book/src/language-features/allocator.md
similarity index 100%
rename from src/doc/unstable-book/src/allocator.md
rename to src/doc/unstable-book/src/language-features/allocator.md
diff --git a/src/doc/unstable-book/src/allow-internal-unstable.md b/src/doc/unstable-book/src/language-features/allow-internal-unstable.md
similarity index 100%
rename from src/doc/unstable-book/src/allow-internal-unstable.md
rename to src/doc/unstable-book/src/language-features/allow-internal-unstable.md
diff --git a/src/doc/unstable-book/src/asm.md b/src/doc/unstable-book/src/language-features/asm.md
similarity index 100%
rename from src/doc/unstable-book/src/asm.md
rename to src/doc/unstable-book/src/language-features/asm.md
diff --git a/src/doc/unstable-book/src/associated-consts.md b/src/doc/unstable-book/src/language-features/associated-consts.md
similarity index 100%
rename from src/doc/unstable-book/src/associated-consts.md
rename to src/doc/unstable-book/src/language-features/associated-consts.md
diff --git a/src/doc/unstable-book/src/associated-type-defaults.md b/src/doc/unstable-book/src/language-features/associated-type-defaults.md
similarity index 100%
rename from src/doc/unstable-book/src/associated-type-defaults.md
rename to src/doc/unstable-book/src/language-features/associated-type-defaults.md
diff --git a/src/doc/unstable-book/src/attr-literals.md b/src/doc/unstable-book/src/language-features/attr-literals.md
similarity index 100%
rename from src/doc/unstable-book/src/attr-literals.md
rename to src/doc/unstable-book/src/language-features/attr-literals.md
diff --git a/src/doc/unstable-book/src/box-patterns.md b/src/doc/unstable-book/src/language-features/box-patterns.md
similarity index 100%
rename from src/doc/unstable-book/src/box-patterns.md
rename to src/doc/unstable-book/src/language-features/box-patterns.md
diff --git a/src/doc/unstable-book/src/box-syntax.md b/src/doc/unstable-book/src/language-features/box-syntax.md
similarity index 100%
rename from src/doc/unstable-book/src/box-syntax.md
rename to src/doc/unstable-book/src/language-features/box-syntax.md
diff --git a/src/doc/unstable-book/src/catch-expr.md b/src/doc/unstable-book/src/language-features/catch-expr.md
similarity index 100%
rename from src/doc/unstable-book/src/catch-expr.md
rename to src/doc/unstable-book/src/language-features/catch-expr.md
diff --git a/src/doc/unstable-book/src/cfg-target-feature.md b/src/doc/unstable-book/src/language-features/cfg-target-feature.md
similarity index 100%
rename from src/doc/unstable-book/src/cfg-target-feature.md
rename to src/doc/unstable-book/src/language-features/cfg-target-feature.md
diff --git a/src/doc/unstable-book/src/cfg-target-has-atomic.md b/src/doc/unstable-book/src/language-features/cfg-target-has-atomic.md
similarity index 100%
rename from src/doc/unstable-book/src/cfg-target-has-atomic.md
rename to src/doc/unstable-book/src/language-features/cfg-target-has-atomic.md
diff --git a/src/doc/unstable-book/src/cfg-target-thread-local.md b/src/doc/unstable-book/src/language-features/cfg-target-thread-local.md
similarity index 100%
rename from src/doc/unstable-book/src/cfg-target-thread-local.md
rename to src/doc/unstable-book/src/language-features/cfg-target-thread-local.md
diff --git a/src/doc/unstable-book/src/cfg-target-vendor.md b/src/doc/unstable-book/src/language-features/cfg-target-vendor.md
similarity index 100%
rename from src/doc/unstable-book/src/cfg-target-vendor.md
rename to src/doc/unstable-book/src/language-features/cfg-target-vendor.md
diff --git a/src/doc/unstable-book/src/closure-to-fn-coercion.md b/src/doc/unstable-book/src/language-features/closure-to-fn-coercion.md
similarity index 100%
rename from src/doc/unstable-book/src/closure-to-fn-coercion.md
rename to src/doc/unstable-book/src/language-features/closure-to-fn-coercion.md
diff --git a/src/doc/unstable-book/src/compiler-builtins.md b/src/doc/unstable-book/src/language-features/compiler-builtins.md
similarity index 100%
rename from src/doc/unstable-book/src/compiler-builtins.md
rename to src/doc/unstable-book/src/language-features/compiler-builtins.md
diff --git a/src/doc/unstable-book/src/concat-idents.md b/src/doc/unstable-book/src/language-features/concat-idents.md
similarity index 100%
rename from src/doc/unstable-book/src/concat-idents.md
rename to src/doc/unstable-book/src/language-features/concat-idents.md
diff --git a/src/doc/unstable-book/src/conservative-impl-trait.md b/src/doc/unstable-book/src/language-features/conservative-impl-trait.md
similarity index 100%
rename from src/doc/unstable-book/src/conservative-impl-trait.md
rename to src/doc/unstable-book/src/language-features/conservative-impl-trait.md
diff --git a/src/doc/unstable-book/src/const-fn.md b/src/doc/unstable-book/src/language-features/const-fn.md
similarity index 100%
rename from src/doc/unstable-book/src/const-fn.md
rename to src/doc/unstable-book/src/language-features/const-fn.md
diff --git a/src/doc/unstable-book/src/const-indexing.md b/src/doc/unstable-book/src/language-features/const-indexing.md
similarity index 100%
rename from src/doc/unstable-book/src/const-indexing.md
rename to src/doc/unstable-book/src/language-features/const-indexing.md
diff --git a/src/doc/unstable-book/src/custom-attribute.md b/src/doc/unstable-book/src/language-features/custom-attribute.md
similarity index 100%
rename from src/doc/unstable-book/src/custom-attribute.md
rename to src/doc/unstable-book/src/language-features/custom-attribute.md
diff --git a/src/doc/unstable-book/src/custom-derive.md b/src/doc/unstable-book/src/language-features/custom-derive.md
similarity index 100%
rename from src/doc/unstable-book/src/custom-derive.md
rename to src/doc/unstable-book/src/language-features/custom-derive.md
diff --git a/src/doc/unstable-book/src/default-type-parameter-fallback.md b/src/doc/unstable-book/src/language-features/default-type-parameter-fallback.md
similarity index 100%
rename from src/doc/unstable-book/src/default-type-parameter-fallback.md
rename to src/doc/unstable-book/src/language-features/default-type-parameter-fallback.md
diff --git a/src/doc/unstable-book/src/drop-types-in-const.md b/src/doc/unstable-book/src/language-features/drop-types-in-const.md
similarity index 100%
rename from src/doc/unstable-book/src/drop-types-in-const.md
rename to src/doc/unstable-book/src/language-features/drop-types-in-const.md
diff --git a/src/doc/unstable-book/src/dropck-eyepatch.md b/src/doc/unstable-book/src/language-features/dropck-eyepatch.md
similarity index 100%
rename from src/doc/unstable-book/src/dropck-eyepatch.md
rename to src/doc/unstable-book/src/language-features/dropck-eyepatch.md
diff --git a/src/doc/unstable-book/src/dropck-parametricity.md b/src/doc/unstable-book/src/language-features/dropck-parametricity.md
similarity index 100%
rename from src/doc/unstable-book/src/dropck-parametricity.md
rename to src/doc/unstable-book/src/language-features/dropck-parametricity.md
diff --git a/src/doc/unstable-book/src/exclusive-range-pattern.md b/src/doc/unstable-book/src/language-features/exclusive-range-pattern.md
similarity index 100%
rename from src/doc/unstable-book/src/exclusive-range-pattern.md
rename to src/doc/unstable-book/src/language-features/exclusive-range-pattern.md
diff --git a/src/doc/unstable-book/src/fundamental.md b/src/doc/unstable-book/src/language-features/fundamental.md
similarity index 100%
rename from src/doc/unstable-book/src/fundamental.md
rename to src/doc/unstable-book/src/language-features/fundamental.md
diff --git a/src/doc/unstable-book/src/generic-param-attrs.md b/src/doc/unstable-book/src/language-features/generic-param-attrs.md
similarity index 100%
rename from src/doc/unstable-book/src/generic-param-attrs.md
rename to src/doc/unstable-book/src/language-features/generic-param-attrs.md
diff --git a/src/doc/unstable-book/src/global_asm.md b/src/doc/unstable-book/src/language-features/global_asm.md
similarity index 100%
rename from src/doc/unstable-book/src/global_asm.md
rename to src/doc/unstable-book/src/language-features/global_asm.md
diff --git a/src/doc/unstable-book/src/i128-type.md b/src/doc/unstable-book/src/language-features/i128-type.md
similarity index 100%
rename from src/doc/unstable-book/src/i128-type.md
rename to src/doc/unstable-book/src/language-features/i128-type.md
diff --git a/src/doc/unstable-book/src/inclusive-range-syntax.md b/src/doc/unstable-book/src/language-features/inclusive-range-syntax.md
similarity index 100%
rename from src/doc/unstable-book/src/inclusive-range-syntax.md
rename to src/doc/unstable-book/src/language-features/inclusive-range-syntax.md
diff --git a/src/doc/unstable-book/src/intrinsics.md b/src/doc/unstable-book/src/language-features/intrinsics.md
similarity index 100%
rename from src/doc/unstable-book/src/intrinsics.md
rename to src/doc/unstable-book/src/language-features/intrinsics.md
diff --git a/src/doc/unstable-book/src/lang-items.md b/src/doc/unstable-book/src/language-features/lang-items.md
similarity index 100%
rename from src/doc/unstable-book/src/lang-items.md
rename to src/doc/unstable-book/src/language-features/lang-items.md
diff --git a/src/doc/unstable-book/src/link-args.md b/src/doc/unstable-book/src/language-features/link-args.md
similarity index 100%
rename from src/doc/unstable-book/src/link-args.md
rename to src/doc/unstable-book/src/language-features/link-args.md
diff --git a/src/doc/unstable-book/src/link-cfg.md b/src/doc/unstable-book/src/language-features/link-cfg.md
similarity index 100%
rename from src/doc/unstable-book/src/link-cfg.md
rename to src/doc/unstable-book/src/language-features/link-cfg.md
diff --git a/src/doc/unstable-book/src/link-llvm-intrinsics.md b/src/doc/unstable-book/src/language-features/link-llvm-intrinsics.md
similarity index 100%
rename from src/doc/unstable-book/src/link-llvm-intrinsics.md
rename to src/doc/unstable-book/src/language-features/link-llvm-intrinsics.md
diff --git a/src/doc/unstable-book/src/linkage.md b/src/doc/unstable-book/src/language-features/linkage.md
similarity index 100%
rename from src/doc/unstable-book/src/linkage.md
rename to src/doc/unstable-book/src/language-features/linkage.md
diff --git a/src/doc/unstable-book/src/log-syntax.md b/src/doc/unstable-book/src/language-features/log-syntax.md
similarity index 100%
rename from src/doc/unstable-book/src/log-syntax.md
rename to src/doc/unstable-book/src/language-features/log-syntax.md
diff --git a/src/doc/unstable-book/src/loop-break-value.md b/src/doc/unstable-book/src/language-features/loop-break-value.md
similarity index 100%
rename from src/doc/unstable-book/src/loop-break-value.md
rename to src/doc/unstable-book/src/language-features/loop-break-value.md
diff --git a/src/doc/unstable-book/src/macro-reexport.md b/src/doc/unstable-book/src/language-features/macro-reexport.md
similarity index 100%
rename from src/doc/unstable-book/src/macro-reexport.md
rename to src/doc/unstable-book/src/language-features/macro-reexport.md
diff --git a/src/doc/unstable-book/src/macro-vis-matcher.md b/src/doc/unstable-book/src/language-features/macro-vis-matcher.md
similarity index 100%
rename from src/doc/unstable-book/src/macro-vis-matcher.md
rename to src/doc/unstable-book/src/language-features/macro-vis-matcher.md
diff --git a/src/doc/unstable-book/src/main.md b/src/doc/unstable-book/src/language-features/main.md
similarity index 100%
rename from src/doc/unstable-book/src/main.md
rename to src/doc/unstable-book/src/language-features/main.md
diff --git a/src/doc/unstable-book/src/naked-functions.md b/src/doc/unstable-book/src/language-features/naked-functions.md
similarity index 100%
rename from src/doc/unstable-book/src/naked-functions.md
rename to src/doc/unstable-book/src/language-features/naked-functions.md
diff --git a/src/doc/unstable-book/src/needs-allocator.md b/src/doc/unstable-book/src/language-features/needs-allocator.md
similarity index 100%
rename from src/doc/unstable-book/src/needs-allocator.md
rename to src/doc/unstable-book/src/language-features/needs-allocator.md
diff --git a/src/doc/unstable-book/src/needs-panic-runtime.md b/src/doc/unstable-book/src/language-features/needs-panic-runtime.md
similarity index 100%
rename from src/doc/unstable-book/src/needs-panic-runtime.md
rename to src/doc/unstable-book/src/language-features/needs-panic-runtime.md
diff --git a/src/doc/unstable-book/src/never-type.md b/src/doc/unstable-book/src/language-features/never-type.md
similarity index 100%
rename from src/doc/unstable-book/src/never-type.md
rename to src/doc/unstable-book/src/language-features/never-type.md
diff --git a/src/doc/unstable-book/src/no-core.md b/src/doc/unstable-book/src/language-features/no-core.md
similarity index 100%
rename from src/doc/unstable-book/src/no-core.md
rename to src/doc/unstable-book/src/language-features/no-core.md
diff --git a/src/doc/unstable-book/src/no-debug.md b/src/doc/unstable-book/src/language-features/no-debug.md
similarity index 100%
rename from src/doc/unstable-book/src/no-debug.md
rename to src/doc/unstable-book/src/language-features/no-debug.md
diff --git a/src/doc/unstable-book/src/non-ascii-idents.md b/src/doc/unstable-book/src/language-features/non-ascii-idents.md
similarity index 100%
rename from src/doc/unstable-book/src/non-ascii-idents.md
rename to src/doc/unstable-book/src/language-features/non-ascii-idents.md
diff --git a/src/doc/unstable-book/src/omit-gdb-pretty-printer-section.md b/src/doc/unstable-book/src/language-features/omit-gdb-pretty-printer-section.md
similarity index 100%
rename from src/doc/unstable-book/src/omit-gdb-pretty-printer-section.md
rename to src/doc/unstable-book/src/language-features/omit-gdb-pretty-printer-section.md
diff --git a/src/doc/unstable-book/src/on-unimplemented.md b/src/doc/unstable-book/src/language-features/on-unimplemented.md
similarity index 100%
rename from src/doc/unstable-book/src/on-unimplemented.md
rename to src/doc/unstable-book/src/language-features/on-unimplemented.md
diff --git a/src/doc/unstable-book/src/optin-builtin-traits.md b/src/doc/unstable-book/src/language-features/optin-builtin-traits.md
similarity index 100%
rename from src/doc/unstable-book/src/optin-builtin-traits.md
rename to src/doc/unstable-book/src/language-features/optin-builtin-traits.md
diff --git a/src/doc/unstable-book/src/overlapping-marker-traits.md b/src/doc/unstable-book/src/language-features/overlapping-marker-traits.md
similarity index 100%
rename from src/doc/unstable-book/src/overlapping-marker-traits.md
rename to src/doc/unstable-book/src/language-features/overlapping-marker-traits.md
diff --git a/src/doc/unstable-book/src/panic-runtime.md b/src/doc/unstable-book/src/language-features/panic-runtime.md
similarity index 100%
rename from src/doc/unstable-book/src/panic-runtime.md
rename to src/doc/unstable-book/src/language-features/panic-runtime.md
diff --git a/src/doc/unstable-book/src/placement-in-syntax.md b/src/doc/unstable-book/src/language-features/placement-in-syntax.md
similarity index 100%
rename from src/doc/unstable-book/src/placement-in-syntax.md
rename to src/doc/unstable-book/src/language-features/placement-in-syntax.md
diff --git a/src/doc/unstable-book/src/platform-intrinsics.md b/src/doc/unstable-book/src/language-features/platform-intrinsics.md
similarity index 100%
rename from src/doc/unstable-book/src/platform-intrinsics.md
rename to src/doc/unstable-book/src/language-features/platform-intrinsics.md
diff --git a/src/doc/unstable-book/src/plugin-registrar.md b/src/doc/unstable-book/src/language-features/plugin-registrar.md
similarity index 100%
rename from src/doc/unstable-book/src/plugin-registrar.md
rename to src/doc/unstable-book/src/language-features/plugin-registrar.md
diff --git a/src/doc/unstable-book/src/plugin.md b/src/doc/unstable-book/src/language-features/plugin.md
similarity index 100%
rename from src/doc/unstable-book/src/plugin.md
rename to src/doc/unstable-book/src/language-features/plugin.md
diff --git a/src/doc/unstable-book/src/prelude-import.md b/src/doc/unstable-book/src/language-features/prelude-import.md
similarity index 100%
rename from src/doc/unstable-book/src/prelude-import.md
rename to src/doc/unstable-book/src/language-features/prelude-import.md
diff --git a/src/doc/unstable-book/src/proc-macro.md b/src/doc/unstable-book/src/language-features/proc-macro.md
similarity index 100%
rename from src/doc/unstable-book/src/proc-macro.md
rename to src/doc/unstable-book/src/language-features/proc-macro.md
diff --git a/src/doc/unstable-book/src/quote.md b/src/doc/unstable-book/src/language-features/quote.md
similarity index 100%
rename from src/doc/unstable-book/src/quote.md
rename to src/doc/unstable-book/src/language-features/quote.md
diff --git a/src/doc/unstable-book/src/relaxed-adts.md b/src/doc/unstable-book/src/language-features/relaxed-adts.md
similarity index 100%
rename from src/doc/unstable-book/src/relaxed-adts.md
rename to src/doc/unstable-book/src/language-features/relaxed-adts.md
diff --git a/src/doc/unstable-book/src/repr-simd.md b/src/doc/unstable-book/src/language-features/repr-simd.md
similarity index 100%
rename from src/doc/unstable-book/src/repr-simd.md
rename to src/doc/unstable-book/src/language-features/repr-simd.md
diff --git a/src/doc/unstable-book/src/rustc-attrs.md b/src/doc/unstable-book/src/language-features/rustc-attrs.md
similarity index 100%
rename from src/doc/unstable-book/src/rustc-attrs.md
rename to src/doc/unstable-book/src/language-features/rustc-attrs.md
diff --git a/src/doc/unstable-book/src/rustc-diagnostic-macros.md b/src/doc/unstable-book/src/language-features/rustc-diagnostic-macros.md
similarity index 100%
rename from src/doc/unstable-book/src/rustc-diagnostic-macros.md
rename to src/doc/unstable-book/src/language-features/rustc-diagnostic-macros.md
diff --git a/src/doc/unstable-book/src/rvalue-static-promotion.md b/src/doc/unstable-book/src/language-features/rvalue-static-promotion.md
similarity index 100%
rename from src/doc/unstable-book/src/rvalue-static-promotion.md
rename to src/doc/unstable-book/src/language-features/rvalue-static-promotion.md
diff --git a/src/doc/unstable-book/src/sanitizer-runtime.md b/src/doc/unstable-book/src/language-features/sanitizer-runtime.md
similarity index 100%
rename from src/doc/unstable-book/src/sanitizer-runtime.md
rename to src/doc/unstable-book/src/language-features/sanitizer-runtime.md
diff --git a/src/doc/unstable-book/src/simd-ffi.md b/src/doc/unstable-book/src/language-features/simd-ffi.md
similarity index 100%
rename from src/doc/unstable-book/src/simd-ffi.md
rename to src/doc/unstable-book/src/language-features/simd-ffi.md
diff --git a/src/doc/unstable-book/src/simd.md b/src/doc/unstable-book/src/language-features/simd.md
similarity index 100%
rename from src/doc/unstable-book/src/simd.md
rename to src/doc/unstable-book/src/language-features/simd.md
diff --git a/src/doc/unstable-book/src/slice-patterns.md b/src/doc/unstable-book/src/language-features/slice-patterns.md
similarity index 100%
rename from src/doc/unstable-book/src/slice-patterns.md
rename to src/doc/unstable-book/src/language-features/slice-patterns.md
diff --git a/src/doc/unstable-book/src/specialization.md b/src/doc/unstable-book/src/language-features/specialization.md
similarity index 100%
rename from src/doc/unstable-book/src/specialization.md
rename to src/doc/unstable-book/src/language-features/specialization.md
diff --git a/src/doc/unstable-book/src/staged-api.md b/src/doc/unstable-book/src/language-features/staged-api.md
similarity index 100%
rename from src/doc/unstable-book/src/staged-api.md
rename to src/doc/unstable-book/src/language-features/staged-api.md
diff --git a/src/doc/unstable-book/src/start.md b/src/doc/unstable-book/src/language-features/start.md
similarity index 100%
rename from src/doc/unstable-book/src/start.md
rename to src/doc/unstable-book/src/language-features/start.md
diff --git a/src/doc/unstable-book/src/static-nobundle.md b/src/doc/unstable-book/src/language-features/static-nobundle.md
similarity index 100%
rename from src/doc/unstable-book/src/static-nobundle.md
rename to src/doc/unstable-book/src/language-features/static-nobundle.md
diff --git a/src/doc/unstable-book/src/stmt-expr-attributes.md b/src/doc/unstable-book/src/language-features/stmt-expr-attributes.md
similarity index 100%
rename from src/doc/unstable-book/src/stmt-expr-attributes.md
rename to src/doc/unstable-book/src/language-features/stmt-expr-attributes.md
diff --git a/src/doc/unstable-book/src/struct-field-attributes.md b/src/doc/unstable-book/src/language-features/struct-field-attributes.md
similarity index 100%
rename from src/doc/unstable-book/src/struct-field-attributes.md
rename to src/doc/unstable-book/src/language-features/struct-field-attributes.md
diff --git a/src/doc/unstable-book/src/structural-match.md b/src/doc/unstable-book/src/language-features/structural-match.md
similarity index 100%
rename from src/doc/unstable-book/src/structural-match.md
rename to src/doc/unstable-book/src/language-features/structural-match.md
diff --git a/src/doc/unstable-book/src/target-feature.md b/src/doc/unstable-book/src/language-features/target-feature.md
similarity index 100%
rename from src/doc/unstable-book/src/target-feature.md
rename to src/doc/unstable-book/src/language-features/target-feature.md
diff --git a/src/doc/unstable-book/src/thread-local.md b/src/doc/unstable-book/src/language-features/thread-local.md
similarity index 100%
rename from src/doc/unstable-book/src/thread-local.md
rename to src/doc/unstable-book/src/language-features/thread-local.md
diff --git a/src/doc/unstable-book/src/trace-macros.md b/src/doc/unstable-book/src/language-features/trace-macros.md
similarity index 100%
rename from src/doc/unstable-book/src/trace-macros.md
rename to src/doc/unstable-book/src/language-features/trace-macros.md
diff --git a/src/doc/unstable-book/src/type-ascription.md b/src/doc/unstable-book/src/language-features/type-ascription.md
similarity index 100%
rename from src/doc/unstable-book/src/type-ascription.md
rename to src/doc/unstable-book/src/language-features/type-ascription.md
diff --git a/src/doc/unstable-book/src/unboxed-closures.md b/src/doc/unstable-book/src/language-features/unboxed-closures.md
similarity index 100%
rename from src/doc/unstable-book/src/unboxed-closures.md
rename to src/doc/unstable-book/src/language-features/unboxed-closures.md
diff --git a/src/doc/unstable-book/src/untagged-unions.md b/src/doc/unstable-book/src/language-features/untagged-unions.md
similarity index 100%
rename from src/doc/unstable-book/src/untagged-unions.md
rename to src/doc/unstable-book/src/language-features/untagged-unions.md
diff --git a/src/doc/unstable-book/src/unwind-attributes.md b/src/doc/unstable-book/src/language-features/unwind-attributes.md
similarity index 100%
rename from src/doc/unstable-book/src/unwind-attributes.md
rename to src/doc/unstable-book/src/language-features/unwind-attributes.md
diff --git a/src/doc/unstable-book/src/use-extern-macros.md b/src/doc/unstable-book/src/language-features/use-extern-macros.md
similarity index 100%
rename from src/doc/unstable-book/src/use-extern-macros.md
rename to src/doc/unstable-book/src/language-features/use-extern-macros.md
diff --git a/src/doc/unstable-book/src/used.md b/src/doc/unstable-book/src/language-features/used.md
similarity index 100%
rename from src/doc/unstable-book/src/used.md
rename to src/doc/unstable-book/src/language-features/used.md
diff --git a/src/doc/unstable-book/src/library-features.md b/src/doc/unstable-book/src/library-features.md
new file mode 100644
index 0000000000000..9f537e26132bc
--- /dev/null
+++ b/src/doc/unstable-book/src/library-features.md
@@ -0,0 +1 @@
+# Library Features
diff --git a/src/doc/unstable-book/src/alloc-jemalloc.md b/src/doc/unstable-book/src/library-features/alloc-jemalloc.md
similarity index 100%
rename from src/doc/unstable-book/src/alloc-jemalloc.md
rename to src/doc/unstable-book/src/library-features/alloc-jemalloc.md
diff --git a/src/doc/unstable-book/src/alloc-system.md b/src/doc/unstable-book/src/library-features/alloc-system.md
similarity index 100%
rename from src/doc/unstable-book/src/alloc-system.md
rename to src/doc/unstable-book/src/library-features/alloc-system.md
diff --git a/src/doc/unstable-book/src/alloc.md b/src/doc/unstable-book/src/library-features/alloc.md
similarity index 100%
rename from src/doc/unstable-book/src/alloc.md
rename to src/doc/unstable-book/src/library-features/alloc.md
diff --git a/src/doc/unstable-book/src/as-c-str.md b/src/doc/unstable-book/src/library-features/as-c-str.md
similarity index 100%
rename from src/doc/unstable-book/src/as-c-str.md
rename to src/doc/unstable-book/src/library-features/as-c-str.md
diff --git a/src/doc/unstable-book/src/as-unsafe-cell.md b/src/doc/unstable-book/src/library-features/as-unsafe-cell.md
similarity index 100%
rename from src/doc/unstable-book/src/as-unsafe-cell.md
rename to src/doc/unstable-book/src/library-features/as-unsafe-cell.md
diff --git a/src/doc/unstable-book/src/ascii-ctype.md b/src/doc/unstable-book/src/library-features/ascii-ctype.md
similarity index 100%
rename from src/doc/unstable-book/src/ascii-ctype.md
rename to src/doc/unstable-book/src/library-features/ascii-ctype.md
diff --git a/src/doc/unstable-book/src/binary-heap-extras.md b/src/doc/unstable-book/src/library-features/binary-heap-extras.md
similarity index 100%
rename from src/doc/unstable-book/src/binary-heap-extras.md
rename to src/doc/unstable-book/src/library-features/binary-heap-extras.md
diff --git a/src/doc/unstable-book/src/binary-heap-peek-mut-pop.md b/src/doc/unstable-book/src/library-features/binary-heap-peek-mut-pop.md
similarity index 100%
rename from src/doc/unstable-book/src/binary-heap-peek-mut-pop.md
rename to src/doc/unstable-book/src/library-features/binary-heap-peek-mut-pop.md
diff --git a/src/doc/unstable-book/src/borrow-state.md b/src/doc/unstable-book/src/library-features/borrow-state.md
similarity index 100%
rename from src/doc/unstable-book/src/borrow-state.md
rename to src/doc/unstable-book/src/library-features/borrow-state.md
diff --git a/src/doc/unstable-book/src/box-heap.md b/src/doc/unstable-book/src/library-features/box-heap.md
similarity index 100%
rename from src/doc/unstable-book/src/box-heap.md
rename to src/doc/unstable-book/src/library-features/box-heap.md
diff --git a/src/doc/unstable-book/src/c-void-variant.md b/src/doc/unstable-book/src/library-features/c-void-variant.md
similarity index 100%
rename from src/doc/unstable-book/src/c-void-variant.md
rename to src/doc/unstable-book/src/library-features/c-void-variant.md
diff --git a/src/doc/unstable-book/src/char-escape-debug.md b/src/doc/unstable-book/src/library-features/char-escape-debug.md
similarity index 100%
rename from src/doc/unstable-book/src/char-escape-debug.md
rename to src/doc/unstable-book/src/library-features/char-escape-debug.md
diff --git a/src/doc/unstable-book/src/coerce-unsized.md b/src/doc/unstable-book/src/library-features/coerce-unsized.md
similarity index 100%
rename from src/doc/unstable-book/src/coerce-unsized.md
rename to src/doc/unstable-book/src/library-features/coerce-unsized.md
diff --git a/src/doc/unstable-book/src/collection-placement.md b/src/doc/unstable-book/src/library-features/collection-placement.md
similarity index 100%
rename from src/doc/unstable-book/src/collection-placement.md
rename to src/doc/unstable-book/src/library-features/collection-placement.md
diff --git a/src/doc/unstable-book/src/collections-range.md b/src/doc/unstable-book/src/library-features/collections-range.md
similarity index 100%
rename from src/doc/unstable-book/src/collections-range.md
rename to src/doc/unstable-book/src/library-features/collections-range.md
diff --git a/src/doc/unstable-book/src/collections.md b/src/doc/unstable-book/src/library-features/collections.md
similarity index 100%
rename from src/doc/unstable-book/src/collections.md
rename to src/doc/unstable-book/src/library-features/collections.md
diff --git a/src/doc/unstable-book/src/command-envs.md b/src/doc/unstable-book/src/library-features/command-envs.md
similarity index 100%
rename from src/doc/unstable-book/src/command-envs.md
rename to src/doc/unstable-book/src/library-features/command-envs.md
diff --git a/src/doc/unstable-book/src/compiler-builtins-lib.md b/src/doc/unstable-book/src/library-features/compiler-builtins-lib.md
similarity index 100%
rename from src/doc/unstable-book/src/compiler-builtins-lib.md
rename to src/doc/unstable-book/src/library-features/compiler-builtins-lib.md
diff --git a/src/doc/unstable-book/src/compiler-fences.md b/src/doc/unstable-book/src/library-features/compiler-fences.md
similarity index 100%
rename from src/doc/unstable-book/src/compiler-fences.md
rename to src/doc/unstable-book/src/library-features/compiler-fences.md
diff --git a/src/doc/unstable-book/src/concat-idents-macro.md b/src/doc/unstable-book/src/library-features/concat-idents-macro.md
similarity index 100%
rename from src/doc/unstable-book/src/concat-idents-macro.md
rename to src/doc/unstable-book/src/library-features/concat-idents-macro.md
diff --git a/src/doc/unstable-book/src/core-char-ext.md b/src/doc/unstable-book/src/library-features/core-char-ext.md
similarity index 100%
rename from src/doc/unstable-book/src/core-char-ext.md
rename to src/doc/unstable-book/src/library-features/core-char-ext.md
diff --git a/src/doc/unstable-book/src/core-float.md b/src/doc/unstable-book/src/library-features/core-float.md
similarity index 100%
rename from src/doc/unstable-book/src/core-float.md
rename to src/doc/unstable-book/src/library-features/core-float.md
diff --git a/src/doc/unstable-book/src/core-intrinsics.md b/src/doc/unstable-book/src/library-features/core-intrinsics.md
similarity index 100%
rename from src/doc/unstable-book/src/core-intrinsics.md
rename to src/doc/unstable-book/src/library-features/core-intrinsics.md
diff --git a/src/doc/unstable-book/src/core-panic.md b/src/doc/unstable-book/src/library-features/core-panic.md
similarity index 100%
rename from src/doc/unstable-book/src/core-panic.md
rename to src/doc/unstable-book/src/library-features/core-panic.md
diff --git a/src/doc/unstable-book/src/core-private-bignum.md b/src/doc/unstable-book/src/library-features/core-private-bignum.md
similarity index 100%
rename from src/doc/unstable-book/src/core-private-bignum.md
rename to src/doc/unstable-book/src/library-features/core-private-bignum.md
diff --git a/src/doc/unstable-book/src/core-private-diy-float.md b/src/doc/unstable-book/src/library-features/core-private-diy-float.md
similarity index 100%
rename from src/doc/unstable-book/src/core-private-diy-float.md
rename to src/doc/unstable-book/src/library-features/core-private-diy-float.md
diff --git a/src/doc/unstable-book/src/core-slice-ext.md b/src/doc/unstable-book/src/library-features/core-slice-ext.md
similarity index 100%
rename from src/doc/unstable-book/src/core-slice-ext.md
rename to src/doc/unstable-book/src/library-features/core-slice-ext.md
diff --git a/src/doc/unstable-book/src/core-str-ext.md b/src/doc/unstable-book/src/library-features/core-str-ext.md
similarity index 100%
rename from src/doc/unstable-book/src/core-str-ext.md
rename to src/doc/unstable-book/src/library-features/core-str-ext.md
diff --git a/src/doc/unstable-book/src/dec2flt.md b/src/doc/unstable-book/src/library-features/dec2flt.md
similarity index 100%
rename from src/doc/unstable-book/src/dec2flt.md
rename to src/doc/unstable-book/src/library-features/dec2flt.md
diff --git a/src/doc/unstable-book/src/decode-utf8.md b/src/doc/unstable-book/src/library-features/decode-utf8.md
similarity index 100%
rename from src/doc/unstable-book/src/decode-utf8.md
rename to src/doc/unstable-book/src/library-features/decode-utf8.md
diff --git a/src/doc/unstable-book/src/derive-clone-copy.md b/src/doc/unstable-book/src/library-features/derive-clone-copy.md
similarity index 100%
rename from src/doc/unstable-book/src/derive-clone-copy.md
rename to src/doc/unstable-book/src/library-features/derive-clone-copy.md
diff --git a/src/doc/unstable-book/src/derive-eq.md b/src/doc/unstable-book/src/library-features/derive-eq.md
similarity index 100%
rename from src/doc/unstable-book/src/derive-eq.md
rename to src/doc/unstable-book/src/library-features/derive-eq.md
diff --git a/src/doc/unstable-book/src/discriminant-value.md b/src/doc/unstable-book/src/library-features/discriminant-value.md
similarity index 100%
rename from src/doc/unstable-book/src/discriminant-value.md
rename to src/doc/unstable-book/src/library-features/discriminant-value.md
diff --git a/src/doc/unstable-book/src/enumset.md b/src/doc/unstable-book/src/library-features/enumset.md
similarity index 100%
rename from src/doc/unstable-book/src/enumset.md
rename to src/doc/unstable-book/src/library-features/enumset.md
diff --git a/src/doc/unstable-book/src/error-type-id.md b/src/doc/unstable-book/src/library-features/error-type-id.md
similarity index 100%
rename from src/doc/unstable-book/src/error-type-id.md
rename to src/doc/unstable-book/src/library-features/error-type-id.md
diff --git a/src/doc/unstable-book/src/exact-size-is-empty.md b/src/doc/unstable-book/src/library-features/exact-size-is-empty.md
similarity index 100%
rename from src/doc/unstable-book/src/exact-size-is-empty.md
rename to src/doc/unstable-book/src/library-features/exact-size-is-empty.md
diff --git a/src/doc/unstable-book/src/fd-read.md b/src/doc/unstable-book/src/library-features/fd-read.md
similarity index 100%
rename from src/doc/unstable-book/src/fd-read.md
rename to src/doc/unstable-book/src/library-features/fd-read.md
diff --git a/src/doc/unstable-book/src/fd.md b/src/doc/unstable-book/src/library-features/fd.md
similarity index 100%
rename from src/doc/unstable-book/src/fd.md
rename to src/doc/unstable-book/src/library-features/fd.md
diff --git a/src/doc/unstable-book/src/fixed-size-array.md b/src/doc/unstable-book/src/library-features/fixed-size-array.md
similarity index 100%
rename from src/doc/unstable-book/src/fixed-size-array.md
rename to src/doc/unstable-book/src/library-features/fixed-size-array.md
diff --git a/src/doc/unstable-book/src/float-bits-conv.md b/src/doc/unstable-book/src/library-features/float-bits-conv.md
similarity index 100%
rename from src/doc/unstable-book/src/float-bits-conv.md
rename to src/doc/unstable-book/src/library-features/float-bits-conv.md
diff --git a/src/doc/unstable-book/src/float-extras.md b/src/doc/unstable-book/src/library-features/float-extras.md
similarity index 100%
rename from src/doc/unstable-book/src/float-extras.md
rename to src/doc/unstable-book/src/library-features/float-extras.md
diff --git a/src/doc/unstable-book/src/flt2dec.md b/src/doc/unstable-book/src/library-features/flt2dec.md
similarity index 100%
rename from src/doc/unstable-book/src/flt2dec.md
rename to src/doc/unstable-book/src/library-features/flt2dec.md
diff --git a/src/doc/unstable-book/src/fmt-flags-align.md b/src/doc/unstable-book/src/library-features/fmt-flags-align.md
similarity index 100%
rename from src/doc/unstable-book/src/fmt-flags-align.md
rename to src/doc/unstable-book/src/library-features/fmt-flags-align.md
diff --git a/src/doc/unstable-book/src/fmt-internals.md b/src/doc/unstable-book/src/library-features/fmt-internals.md
similarity index 100%
rename from src/doc/unstable-book/src/fmt-internals.md
rename to src/doc/unstable-book/src/library-features/fmt-internals.md
diff --git a/src/doc/unstable-book/src/fn-traits.md b/src/doc/unstable-book/src/library-features/fn-traits.md
similarity index 100%
rename from src/doc/unstable-book/src/fn-traits.md
rename to src/doc/unstable-book/src/library-features/fn-traits.md
diff --git a/src/doc/unstable-book/src/fnbox.md b/src/doc/unstable-book/src/library-features/fnbox.md
similarity index 100%
rename from src/doc/unstable-book/src/fnbox.md
rename to src/doc/unstable-book/src/library-features/fnbox.md
diff --git a/src/doc/unstable-book/src/from_utf8_error_as_bytes.md b/src/doc/unstable-book/src/library-features/from_utf8_error_as_bytes.md
similarity index 100%
rename from src/doc/unstable-book/src/from_utf8_error_as_bytes.md
rename to src/doc/unstable-book/src/library-features/from_utf8_error_as_bytes.md
diff --git a/src/doc/unstable-book/src/fused.md b/src/doc/unstable-book/src/library-features/fused.md
similarity index 100%
rename from src/doc/unstable-book/src/fused.md
rename to src/doc/unstable-book/src/library-features/fused.md
diff --git a/src/doc/unstable-book/src/future-atomic-orderings.md b/src/doc/unstable-book/src/library-features/future-atomic-orderings.md
similarity index 100%
rename from src/doc/unstable-book/src/future-atomic-orderings.md
rename to src/doc/unstable-book/src/library-features/future-atomic-orderings.md
diff --git a/src/doc/unstable-book/src/get-type-id.md b/src/doc/unstable-book/src/library-features/get-type-id.md
similarity index 100%
rename from src/doc/unstable-book/src/get-type-id.md
rename to src/doc/unstable-book/src/library-features/get-type-id.md
diff --git a/src/doc/unstable-book/src/heap-api.md b/src/doc/unstable-book/src/library-features/heap-api.md
similarity index 100%
rename from src/doc/unstable-book/src/heap-api.md
rename to src/doc/unstable-book/src/library-features/heap-api.md
diff --git a/src/doc/unstable-book/src/i128.md b/src/doc/unstable-book/src/library-features/i128.md
similarity index 100%
rename from src/doc/unstable-book/src/i128.md
rename to src/doc/unstable-book/src/library-features/i128.md
diff --git a/src/doc/unstable-book/src/inclusive-range.md b/src/doc/unstable-book/src/library-features/inclusive-range.md
similarity index 100%
rename from src/doc/unstable-book/src/inclusive-range.md
rename to src/doc/unstable-book/src/library-features/inclusive-range.md
diff --git a/src/doc/unstable-book/src/int-error-internals.md b/src/doc/unstable-book/src/library-features/int-error-internals.md
similarity index 100%
rename from src/doc/unstable-book/src/int-error-internals.md
rename to src/doc/unstable-book/src/library-features/int-error-internals.md
diff --git a/src/doc/unstable-book/src/integer-atomics.md b/src/doc/unstable-book/src/library-features/integer-atomics.md
similarity index 100%
rename from src/doc/unstable-book/src/integer-atomics.md
rename to src/doc/unstable-book/src/library-features/integer-atomics.md
diff --git a/src/doc/unstable-book/src/into-boxed-c-str.md b/src/doc/unstable-book/src/library-features/into-boxed-c-str.md
similarity index 100%
rename from src/doc/unstable-book/src/into-boxed-c-str.md
rename to src/doc/unstable-book/src/library-features/into-boxed-c-str.md
diff --git a/src/doc/unstable-book/src/into-boxed-os-str.md b/src/doc/unstable-book/src/library-features/into-boxed-os-str.md
similarity index 100%
rename from src/doc/unstable-book/src/into-boxed-os-str.md
rename to src/doc/unstable-book/src/library-features/into-boxed-os-str.md
diff --git a/src/doc/unstable-book/src/into-boxed-path.md b/src/doc/unstable-book/src/library-features/into-boxed-path.md
similarity index 100%
rename from src/doc/unstable-book/src/into-boxed-path.md
rename to src/doc/unstable-book/src/library-features/into-boxed-path.md
diff --git a/src/doc/unstable-book/src/io-error-internals.md b/src/doc/unstable-book/src/library-features/io-error-internals.md
similarity index 100%
rename from src/doc/unstable-book/src/io-error-internals.md
rename to src/doc/unstable-book/src/library-features/io-error-internals.md
diff --git a/src/doc/unstable-book/src/io.md b/src/doc/unstable-book/src/library-features/io.md
similarity index 100%
rename from src/doc/unstable-book/src/io.md
rename to src/doc/unstable-book/src/library-features/io.md
diff --git a/src/doc/unstable-book/src/ip.md b/src/doc/unstable-book/src/library-features/ip.md
similarity index 100%
rename from src/doc/unstable-book/src/ip.md
rename to src/doc/unstable-book/src/library-features/ip.md
diff --git a/src/doc/unstable-book/src/is-unique.md b/src/doc/unstable-book/src/library-features/is-unique.md
similarity index 100%
rename from src/doc/unstable-book/src/is-unique.md
rename to src/doc/unstable-book/src/library-features/is-unique.md
diff --git a/src/doc/unstable-book/src/iter-rfind.md b/src/doc/unstable-book/src/library-features/iter-rfind.md
similarity index 100%
rename from src/doc/unstable-book/src/iter-rfind.md
rename to src/doc/unstable-book/src/library-features/iter-rfind.md
diff --git a/src/doc/unstable-book/src/libstd-io-internals.md b/src/doc/unstable-book/src/library-features/libstd-io-internals.md
similarity index 100%
rename from src/doc/unstable-book/src/libstd-io-internals.md
rename to src/doc/unstable-book/src/library-features/libstd-io-internals.md
diff --git a/src/doc/unstable-book/src/libstd-sys-internals.md b/src/doc/unstable-book/src/library-features/libstd-sys-internals.md
similarity index 100%
rename from src/doc/unstable-book/src/libstd-sys-internals.md
rename to src/doc/unstable-book/src/library-features/libstd-sys-internals.md
diff --git a/src/doc/unstable-book/src/libstd-thread-internals.md b/src/doc/unstable-book/src/library-features/libstd-thread-internals.md
similarity index 100%
rename from src/doc/unstable-book/src/libstd-thread-internals.md
rename to src/doc/unstable-book/src/library-features/libstd-thread-internals.md
diff --git a/src/doc/unstable-book/src/linked-list-extras.md b/src/doc/unstable-book/src/library-features/linked-list-extras.md
similarity index 100%
rename from src/doc/unstable-book/src/linked-list-extras.md
rename to src/doc/unstable-book/src/library-features/linked-list-extras.md
diff --git a/src/doc/unstable-book/src/lookup-host.md b/src/doc/unstable-book/src/library-features/lookup-host.md
similarity index 100%
rename from src/doc/unstable-book/src/lookup-host.md
rename to src/doc/unstable-book/src/library-features/lookup-host.md
diff --git a/src/doc/unstable-book/src/manually-drop.md b/src/doc/unstable-book/src/library-features/manually-drop.md
similarity index 100%
rename from src/doc/unstable-book/src/manually-drop.md
rename to src/doc/unstable-book/src/library-features/manually-drop.md
diff --git a/src/doc/unstable-book/src/map-entry-recover-keys.md b/src/doc/unstable-book/src/library-features/map-entry-recover-keys.md
similarity index 100%
rename from src/doc/unstable-book/src/map-entry-recover-keys.md
rename to src/doc/unstable-book/src/library-features/map-entry-recover-keys.md
diff --git a/src/doc/unstable-book/src/mpsc-select.md b/src/doc/unstable-book/src/library-features/mpsc-select.md
similarity index 100%
rename from src/doc/unstable-book/src/mpsc-select.md
rename to src/doc/unstable-book/src/library-features/mpsc-select.md
diff --git a/src/doc/unstable-book/src/n16.md b/src/doc/unstable-book/src/library-features/n16.md
similarity index 100%
rename from src/doc/unstable-book/src/n16.md
rename to src/doc/unstable-book/src/library-features/n16.md
diff --git a/src/doc/unstable-book/src/never-type-impls.md b/src/doc/unstable-book/src/library-features/never-type-impls.md
similarity index 100%
rename from src/doc/unstable-book/src/never-type-impls.md
rename to src/doc/unstable-book/src/library-features/never-type-impls.md
diff --git a/src/doc/unstable-book/src/nonzero.md b/src/doc/unstable-book/src/library-features/nonzero.md
similarity index 100%
rename from src/doc/unstable-book/src/nonzero.md
rename to src/doc/unstable-book/src/library-features/nonzero.md
diff --git a/src/doc/unstable-book/src/offset-to.md b/src/doc/unstable-book/src/library-features/offset-to.md
similarity index 100%
rename from src/doc/unstable-book/src/offset-to.md
rename to src/doc/unstable-book/src/library-features/offset-to.md
diff --git a/src/doc/unstable-book/src/once-poison.md b/src/doc/unstable-book/src/library-features/once-poison.md
similarity index 100%
rename from src/doc/unstable-book/src/once-poison.md
rename to src/doc/unstable-book/src/library-features/once-poison.md
diff --git a/src/doc/unstable-book/src/oom.md b/src/doc/unstable-book/src/library-features/oom.md
similarity index 100%
rename from src/doc/unstable-book/src/oom.md
rename to src/doc/unstable-book/src/library-features/oom.md
diff --git a/src/doc/unstable-book/src/option-entry.md b/src/doc/unstable-book/src/library-features/option-entry.md
similarity index 100%
rename from src/doc/unstable-book/src/option-entry.md
rename to src/doc/unstable-book/src/library-features/option-entry.md
diff --git a/src/doc/unstable-book/src/osstring-shrink-to-fit.md b/src/doc/unstable-book/src/library-features/osstring-shrink-to-fit.md
similarity index 100%
rename from src/doc/unstable-book/src/osstring-shrink-to-fit.md
rename to src/doc/unstable-book/src/library-features/osstring-shrink-to-fit.md
diff --git a/src/doc/unstable-book/src/panic-abort.md b/src/doc/unstable-book/src/library-features/panic-abort.md
similarity index 100%
rename from src/doc/unstable-book/src/panic-abort.md
rename to src/doc/unstable-book/src/library-features/panic-abort.md
diff --git a/src/doc/unstable-book/src/panic-unwind.md b/src/doc/unstable-book/src/library-features/panic-unwind.md
similarity index 100%
rename from src/doc/unstable-book/src/panic-unwind.md
rename to src/doc/unstable-book/src/library-features/panic-unwind.md
diff --git a/src/doc/unstable-book/src/pattern.md b/src/doc/unstable-book/src/library-features/pattern.md
similarity index 100%
rename from src/doc/unstable-book/src/pattern.md
rename to src/doc/unstable-book/src/library-features/pattern.md
diff --git a/src/doc/unstable-book/src/peek.md b/src/doc/unstable-book/src/library-features/peek.md
similarity index 100%
rename from src/doc/unstable-book/src/peek.md
rename to src/doc/unstable-book/src/library-features/peek.md
diff --git a/src/doc/unstable-book/src/placement-in.md b/src/doc/unstable-book/src/library-features/placement-in.md
similarity index 100%
rename from src/doc/unstable-book/src/placement-in.md
rename to src/doc/unstable-book/src/library-features/placement-in.md
diff --git a/src/doc/unstable-book/src/placement-new-protocol.md b/src/doc/unstable-book/src/library-features/placement-new-protocol.md
similarity index 100%
rename from src/doc/unstable-book/src/placement-new-protocol.md
rename to src/doc/unstable-book/src/library-features/placement-new-protocol.md
diff --git a/src/doc/unstable-book/src/print.md b/src/doc/unstable-book/src/library-features/print.md
similarity index 100%
rename from src/doc/unstable-book/src/print.md
rename to src/doc/unstable-book/src/library-features/print.md
diff --git a/src/doc/unstable-book/src/proc-macro-internals.md b/src/doc/unstable-book/src/library-features/proc-macro-internals.md
similarity index 100%
rename from src/doc/unstable-book/src/proc-macro-internals.md
rename to src/doc/unstable-book/src/library-features/proc-macro-internals.md
diff --git a/src/doc/unstable-book/src/process-try-wait.md b/src/doc/unstable-book/src/library-features/process-try-wait.md
similarity index 100%
rename from src/doc/unstable-book/src/process-try-wait.md
rename to src/doc/unstable-book/src/library-features/process-try-wait.md
diff --git a/src/doc/unstable-book/src/question-mark-carrier.md b/src/doc/unstable-book/src/library-features/question-mark-carrier.md
similarity index 100%
rename from src/doc/unstable-book/src/question-mark-carrier.md
rename to src/doc/unstable-book/src/library-features/question-mark-carrier.md
diff --git a/src/doc/unstable-book/src/rand.md b/src/doc/unstable-book/src/library-features/rand.md
similarity index 100%
rename from src/doc/unstable-book/src/rand.md
rename to src/doc/unstable-book/src/library-features/rand.md
diff --git a/src/doc/unstable-book/src/range-contains.md b/src/doc/unstable-book/src/library-features/range-contains.md
similarity index 100%
rename from src/doc/unstable-book/src/range-contains.md
rename to src/doc/unstable-book/src/library-features/range-contains.md
diff --git a/src/doc/unstable-book/src/raw.md b/src/doc/unstable-book/src/library-features/raw.md
similarity index 100%
rename from src/doc/unstable-book/src/raw.md
rename to src/doc/unstable-book/src/library-features/raw.md
diff --git a/src/doc/unstable-book/src/rc-would-unwrap.md b/src/doc/unstable-book/src/library-features/rc-would-unwrap.md
similarity index 100%
rename from src/doc/unstable-book/src/rc-would-unwrap.md
rename to src/doc/unstable-book/src/library-features/rc-would-unwrap.md
diff --git a/src/doc/unstable-book/src/retain-hash-collection.md b/src/doc/unstable-book/src/library-features/retain-hash-collection.md
similarity index 100%
rename from src/doc/unstable-book/src/retain-hash-collection.md
rename to src/doc/unstable-book/src/library-features/retain-hash-collection.md
diff --git a/src/doc/unstable-book/src/reverse-cmp-key.md b/src/doc/unstable-book/src/library-features/reverse-cmp-key.md
similarity index 100%
rename from src/doc/unstable-book/src/reverse-cmp-key.md
rename to src/doc/unstable-book/src/library-features/reverse-cmp-key.md
diff --git a/src/doc/unstable-book/src/rt.md b/src/doc/unstable-book/src/library-features/rt.md
similarity index 100%
rename from src/doc/unstable-book/src/rt.md
rename to src/doc/unstable-book/src/library-features/rt.md
diff --git a/src/doc/unstable-book/src/rustc-private.md b/src/doc/unstable-book/src/library-features/rustc-private.md
similarity index 100%
rename from src/doc/unstable-book/src/rustc-private.md
rename to src/doc/unstable-book/src/library-features/rustc-private.md
diff --git a/src/doc/unstable-book/src/sanitizer-runtime-lib.md b/src/doc/unstable-book/src/library-features/sanitizer-runtime-lib.md
similarity index 100%
rename from src/doc/unstable-book/src/sanitizer-runtime-lib.md
rename to src/doc/unstable-book/src/library-features/sanitizer-runtime-lib.md
diff --git a/src/doc/unstable-book/src/set-stdio.md b/src/doc/unstable-book/src/library-features/set-stdio.md
similarity index 100%
rename from src/doc/unstable-book/src/set-stdio.md
rename to src/doc/unstable-book/src/library-features/set-stdio.md
diff --git a/src/doc/unstable-book/src/shared.md b/src/doc/unstable-book/src/library-features/shared.md
similarity index 100%
rename from src/doc/unstable-book/src/shared.md
rename to src/doc/unstable-book/src/library-features/shared.md
diff --git a/src/doc/unstable-book/src/sip-hash-13.md b/src/doc/unstable-book/src/library-features/sip-hash-13.md
similarity index 100%
rename from src/doc/unstable-book/src/sip-hash-13.md
rename to src/doc/unstable-book/src/library-features/sip-hash-13.md
diff --git a/src/doc/unstable-book/src/slice-concat-ext.md b/src/doc/unstable-book/src/library-features/slice-concat-ext.md
similarity index 100%
rename from src/doc/unstable-book/src/slice-concat-ext.md
rename to src/doc/unstable-book/src/library-features/slice-concat-ext.md
diff --git a/src/doc/unstable-book/src/slice-get-slice.md b/src/doc/unstable-book/src/library-features/slice-get-slice.md
similarity index 100%
rename from src/doc/unstable-book/src/slice-get-slice.md
rename to src/doc/unstable-book/src/library-features/slice-get-slice.md
diff --git a/src/doc/unstable-book/src/slice-rsplit.md b/src/doc/unstable-book/src/library-features/slice-rsplit.md
similarity index 100%
rename from src/doc/unstable-book/src/slice-rsplit.md
rename to src/doc/unstable-book/src/library-features/slice-rsplit.md
diff --git a/src/doc/unstable-book/src/sort-internals.md b/src/doc/unstable-book/src/library-features/sort-internals.md
similarity index 100%
rename from src/doc/unstable-book/src/sort-internals.md
rename to src/doc/unstable-book/src/library-features/sort-internals.md
diff --git a/src/doc/unstable-book/src/sort-unstable.md b/src/doc/unstable-book/src/library-features/sort-unstable.md
similarity index 100%
rename from src/doc/unstable-book/src/sort-unstable.md
rename to src/doc/unstable-book/src/library-features/sort-unstable.md
diff --git a/src/doc/unstable-book/src/step-by.md b/src/doc/unstable-book/src/library-features/step-by.md
similarity index 100%
rename from src/doc/unstable-book/src/step-by.md
rename to src/doc/unstable-book/src/library-features/step-by.md
diff --git a/src/doc/unstable-book/src/step-trait.md b/src/doc/unstable-book/src/library-features/step-trait.md
similarity index 100%
rename from src/doc/unstable-book/src/step-trait.md
rename to src/doc/unstable-book/src/library-features/step-trait.md
diff --git a/src/doc/unstable-book/src/str-checked-slicing.md b/src/doc/unstable-book/src/library-features/str-checked-slicing.md
similarity index 100%
rename from src/doc/unstable-book/src/str-checked-slicing.md
rename to src/doc/unstable-book/src/library-features/str-checked-slicing.md
diff --git a/src/doc/unstable-book/src/str-escape.md b/src/doc/unstable-book/src/library-features/str-escape.md
similarity index 100%
rename from src/doc/unstable-book/src/str-escape.md
rename to src/doc/unstable-book/src/library-features/str-escape.md
diff --git a/src/doc/unstable-book/src/str-internals.md b/src/doc/unstable-book/src/library-features/str-internals.md
similarity index 100%
rename from src/doc/unstable-book/src/str-internals.md
rename to src/doc/unstable-book/src/library-features/str-internals.md
diff --git a/src/doc/unstable-book/src/str-mut-extras.md b/src/doc/unstable-book/src/library-features/str-mut-extras.md
similarity index 100%
rename from src/doc/unstable-book/src/str-mut-extras.md
rename to src/doc/unstable-book/src/library-features/str-mut-extras.md
diff --git a/src/doc/unstable-book/src/test.md b/src/doc/unstable-book/src/library-features/test.md
similarity index 100%
rename from src/doc/unstable-book/src/test.md
rename to src/doc/unstable-book/src/library-features/test.md
diff --git a/src/doc/unstable-book/src/thread-id.md b/src/doc/unstable-book/src/library-features/thread-id.md
similarity index 100%
rename from src/doc/unstable-book/src/thread-id.md
rename to src/doc/unstable-book/src/library-features/thread-id.md
diff --git a/src/doc/unstable-book/src/thread-local-internals.md b/src/doc/unstable-book/src/library-features/thread-local-internals.md
similarity index 100%
rename from src/doc/unstable-book/src/thread-local-internals.md
rename to src/doc/unstable-book/src/library-features/thread-local-internals.md
diff --git a/src/doc/unstable-book/src/thread-local-state.md b/src/doc/unstable-book/src/library-features/thread-local-state.md
similarity index 100%
rename from src/doc/unstable-book/src/thread-local-state.md
rename to src/doc/unstable-book/src/library-features/thread-local-state.md
diff --git a/src/doc/unstable-book/src/toowned-clone-into.md b/src/doc/unstable-book/src/library-features/toowned-clone-into.md
similarity index 100%
rename from src/doc/unstable-book/src/toowned-clone-into.md
rename to src/doc/unstable-book/src/library-features/toowned-clone-into.md
diff --git a/src/doc/unstable-book/src/trusted-len.md b/src/doc/unstable-book/src/library-features/trusted-len.md
similarity index 100%
rename from src/doc/unstable-book/src/trusted-len.md
rename to src/doc/unstable-book/src/library-features/trusted-len.md
diff --git a/src/doc/unstable-book/src/try-from.md b/src/doc/unstable-book/src/library-features/try-from.md
similarity index 100%
rename from src/doc/unstable-book/src/try-from.md
rename to src/doc/unstable-book/src/library-features/try-from.md
diff --git a/src/doc/unstable-book/src/unicode.md b/src/doc/unstable-book/src/library-features/unicode.md
similarity index 100%
rename from src/doc/unstable-book/src/unicode.md
rename to src/doc/unstable-book/src/library-features/unicode.md
diff --git a/src/doc/unstable-book/src/unique.md b/src/doc/unstable-book/src/library-features/unique.md
similarity index 100%
rename from src/doc/unstable-book/src/unique.md
rename to src/doc/unstable-book/src/library-features/unique.md
diff --git a/src/doc/unstable-book/src/unsize.md b/src/doc/unstable-book/src/library-features/unsize.md
similarity index 100%
rename from src/doc/unstable-book/src/unsize.md
rename to src/doc/unstable-book/src/library-features/unsize.md
diff --git a/src/doc/unstable-book/src/update-panic-count.md b/src/doc/unstable-book/src/library-features/update-panic-count.md
similarity index 100%
rename from src/doc/unstable-book/src/update-panic-count.md
rename to src/doc/unstable-book/src/library-features/update-panic-count.md
diff --git a/src/doc/unstable-book/src/utf8-error-error-len.md b/src/doc/unstable-book/src/library-features/utf8-error-error-len.md
similarity index 100%
rename from src/doc/unstable-book/src/utf8-error-error-len.md
rename to src/doc/unstable-book/src/library-features/utf8-error-error-len.md
diff --git a/src/doc/unstable-book/src/vec-remove-item.md b/src/doc/unstable-book/src/library-features/vec-remove-item.md
similarity index 100%
rename from src/doc/unstable-book/src/vec-remove-item.md
rename to src/doc/unstable-book/src/library-features/vec-remove-item.md
diff --git a/src/doc/unstable-book/src/windows-c.md b/src/doc/unstable-book/src/library-features/windows-c.md
similarity index 100%
rename from src/doc/unstable-book/src/windows-c.md
rename to src/doc/unstable-book/src/library-features/windows-c.md
diff --git a/src/doc/unstable-book/src/windows-handle.md b/src/doc/unstable-book/src/library-features/windows-handle.md
similarity index 100%
rename from src/doc/unstable-book/src/windows-handle.md
rename to src/doc/unstable-book/src/library-features/windows-handle.md
diff --git a/src/doc/unstable-book/src/windows-net.md b/src/doc/unstable-book/src/library-features/windows-net.md
similarity index 100%
rename from src/doc/unstable-book/src/windows-net.md
rename to src/doc/unstable-book/src/library-features/windows-net.md
diff --git a/src/doc/unstable-book/src/windows-stdio.md b/src/doc/unstable-book/src/library-features/windows-stdio.md
similarity index 100%
rename from src/doc/unstable-book/src/windows-stdio.md
rename to src/doc/unstable-book/src/library-features/windows-stdio.md
diff --git a/src/doc/unstable-book/src/zero-one.md b/src/doc/unstable-book/src/library-features/zero-one.md
similarity index 100%
rename from src/doc/unstable-book/src/zero-one.md
rename to src/doc/unstable-book/src/library-features/zero-one.md
diff --git a/src/doc/unstable-book/src/the-unstable-book.md b/src/doc/unstable-book/src/the-unstable-book.md
index dfbfe4cab9738..604b449f16379 100644
--- a/src/doc/unstable-book/src/the-unstable-book.md
+++ b/src/doc/unstable-book/src/the-unstable-book.md
@@ -14,7 +14,7 @@ fn main() {
The `box_syntax` feature [has a chapter][box] describing how to use it.
-[box]: box-syntax.html
+[box]: language-features/box-syntax.html
Because this documentation relates to unstable features, we make no guarantees
that what is contained here is accurate or up to date. It's developed on a
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 129674b74769c..175447e111270 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -344,9 +344,6 @@ declare_features! (
// Used to preserve symbols (see llvm.used)
(active, used, "1.18.0", Some(40289)),
- // Hack to document `-Z linker-flavor` in The Unstable Book
- (active, linker_flavor, "1.18.0", Some(41142)),
-
// Allows module-level inline assembly by way of global_asm!()
(active, global_asm, "1.18.0", Some(35119)),
diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs
index 137de561c76c9..531c148de2619 100644
--- a/src/tools/linkchecker/main.rs
+++ b/src/tools/linkchecker/main.rs
@@ -147,6 +147,12 @@ fn check(cache: &mut Cache,
return None;
}
+ // mdbook uses the HTML tag to handle links for subdirectories, which
+ // linkchecker doesn't support
+ if file.to_str().unwrap().contains("unstable-book/") {
+ return None;
+ }
+
let res = load_file(cache, root, PathBuf::from(file), SkipRedirect);
let (pretty_file, contents) = match res {
Ok(res) => res,
diff --git a/src/tools/tidy/Cargo.toml b/src/tools/tidy/Cargo.toml
index 371922c9e6bb2..664aecfcbdb9d 100644
--- a/src/tools/tidy/Cargo.toml
+++ b/src/tools/tidy/Cargo.toml
@@ -2,6 +2,3 @@
name = "tidy"
version = "0.1.0"
authors = ["Alex Crichton "]
-
-[dependencies]
-regex = "0.2"
\ No newline at end of file
diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs
index 44063e627a362..3e7046d05f490 100644
--- a/src/tools/tidy/src/main.rs
+++ b/src/tools/tidy/src/main.rs
@@ -14,8 +14,6 @@
//! etc. This is run by default on `make check` and as part of the auto
//! builders.
-extern crate regex;
-
use std::env;
use std::fs;
use std::io::{self, Write};
diff --git a/src/tools/tidy/src/unstable_book.rs b/src/tools/tidy/src/unstable_book.rs
index 2d3d9e80257f9..5a6524b3e88e5 100644
--- a/src/tools/tidy/src/unstable_book.rs
+++ b/src/tools/tidy/src/unstable_book.rs
@@ -10,35 +10,36 @@
use std::collections::HashSet;
use std::fs;
-use std::io::{self, BufRead};
use std::path;
use features::{collect_lang_features, collect_lib_features, Status};
const PATH_STR: &'static str = "doc/unstable-book/src";
-const SUMMARY_FILE_NAME: &'static str = "SUMMARY.md";
+const LANG_FEATURES_DIR: &'static str = "language-features";
-static EXCLUDE: &'static [&'static str; 2] = &[SUMMARY_FILE_NAME, "the-unstable-book.md"];
+const LIB_FEATURES_DIR: &'static str = "library-features";
/// Build the path to the Unstable Book source directory from the Rust 'src' directory
fn unstable_book_path(base_src_path: &path::Path) -> path::PathBuf {
base_src_path.join(PATH_STR)
}
-/// Build the path to the Unstable Book SUMMARY file from the Rust 'src' directory
-fn unstable_book_summary_path(base_src_path: &path::Path) -> path::PathBuf {
- unstable_book_path(base_src_path).join(SUMMARY_FILE_NAME)
+/// Directory where the features are documented within the Unstable Book source directory
+fn unstable_book_lang_features_path(base_src_path: &path::Path) -> path::PathBuf {
+ unstable_book_path(base_src_path).join(LANG_FEATURES_DIR)
}
-/// Open the Unstable Book SUMMARY file
-fn open_unstable_book_summary_file(base_src_path: &path::Path) -> fs::File {
- fs::File::open(unstable_book_summary_path(base_src_path))
- .expect("could not open Unstable Book SUMMARY.md")
+/// Directory where the features are documented within the Unstable Book source directory
+fn unstable_book_lib_features_path(base_src_path: &path::Path) -> path::PathBuf {
+ unstable_book_path(base_src_path).join(LIB_FEATURES_DIR)
}
/// Test to determine if DirEntry is a file
fn dir_entry_is_file(dir_entry: &fs::DirEntry) -> bool {
- dir_entry.file_type().expect("could not determine file type of directory entry").is_file()
+ dir_entry
+ .file_type()
+ .expect("could not determine file type of directory entry")
+ .is_file()
}
/// Retrieve names of all lang-related unstable features
@@ -61,75 +62,81 @@ fn collect_unstable_lib_feature_names(base_src_path: &path::Path) -> HashSet HashSet {
- collect_unstable_lib_feature_names(base_src_path)
- .union(&collect_unstable_lang_feature_names(base_src_path))
- .map(|n| n.to_owned())
- .collect::>()
-}
-
-/// Retrieve file names of all sections in the Unstable Book with:
-///
-/// * hyphens replaced by underscores
-/// * the markdown suffix ('.md') removed
-fn collect_unstable_book_section_file_names(base_src_path: &path::Path) -> HashSet {
- fs::read_dir(unstable_book_path(base_src_path))
+fn collect_unstable_book_section_file_names(dir: &path::Path) -> HashSet {
+ fs::read_dir(dir)
.expect("could not read directory")
.into_iter()
.map(|entry| entry.expect("could not read directory entry"))
.filter(dir_entry_is_file)
.map(|entry| entry.file_name().into_string().unwrap())
- .filter(|n| EXCLUDE.iter().all(|e| n != e))
.map(|n| n.trim_right_matches(".md").replace('-', "_"))
.collect()
}
-/// Retrieve unstable feature names that are in the Unstable Book SUMMARY file
-fn collect_unstable_book_summary_links(base_src_path: &path::Path) -> HashSet {
- let summary_link_regex =
- ::regex::Regex::new(r"^- \[(\S+)\]\(\S+\.md\)").expect("invalid regex");
- io::BufReader::new(open_unstable_book_summary_file(base_src_path))
- .lines()
- .map(|l| l.expect("could not read line from file"))
- .filter_map(|line| {
- summary_link_regex.captures(&line).map(|c| {
- c.get(1)
- .unwrap()
- .as_str()
- .to_owned()
- })
- })
- .collect()
+/// Retrieve file names of all library feature sections in the Unstable Book with:
+///
+/// * hyphens replaced by underscores
+/// * the markdown suffix ('.md') removed
+fn collect_unstable_book_lang_features_section_file_names(base_src_path: &path::Path)
+ -> HashSet {
+ collect_unstable_book_section_file_names(&unstable_book_lang_features_path(base_src_path))
+}
+
+/// Retrieve file names of all language feature sections in the Unstable Book with:
+///
+/// * hyphens replaced by underscores
+/// * the markdown suffix ('.md') removed
+fn collect_unstable_book_lib_features_section_file_names(base_src_path: &path::Path)
+ -> HashSet {
+ collect_unstable_book_section_file_names(&unstable_book_lib_features_path(base_src_path))
}
pub fn check(path: &path::Path, bad: &mut bool) {
- let unstable_feature_names = collect_unstable_feature_names(path);
- let unstable_book_section_file_names = collect_unstable_book_section_file_names(path);
- let unstable_book_links = collect_unstable_book_summary_links(path);
-
- // Check for Unstable Book section names with no corresponding SUMMARY.md link
- for feature_name in &unstable_book_section_file_names - &unstable_book_links {
- tidy_error!(
- bad,
- "The Unstable Book section '{}' needs to have a link in SUMMARY.md",
- feature_name);
- }
+
+ // Library features
+
+ let unstable_lib_feature_names = collect_unstable_lib_feature_names(path);
+ let unstable_book_lib_features_section_file_names =
+ collect_unstable_book_lib_features_section_file_names(path);
// Check for unstable features that don't have Unstable Book sections
- for feature_name in &unstable_feature_names - &unstable_book_section_file_names {
- tidy_error!(
- bad,
- "Unstable feature '{}' needs to have a section in The Unstable Book",
- feature_name);
+ for feature_name in &unstable_lib_feature_names -
+ &unstable_book_lib_features_section_file_names {
+ tidy_error!(bad,
+ "Unstable library feature '{}' needs to have a section within the \
+ 'library features' section of The Unstable Book",
+ feature_name);
+ }
+
+ // Check for Unstable Book sections that don't have a corresponding unstable feature
+ for feature_name in &unstable_book_lib_features_section_file_names -
+ &unstable_lib_feature_names {
+ tidy_error!(bad,
+ "The Unstable Book has a 'library feature' section '{}' which doesn't \
+ correspond to an unstable library feature",
+ feature_name)
+ }
+
+ // Language features
+
+ let unstable_lang_feature_names = collect_unstable_lang_feature_names(path);
+ let unstable_book_lang_features_section_file_names =
+ collect_unstable_book_lang_features_section_file_names(path);
+
+ for feature_name in &unstable_lang_feature_names -
+ &unstable_book_lang_features_section_file_names {
+ tidy_error!(bad,
+ "Unstable language feature '{}' needs to have a section within the \
+ 'language features' section of The Unstable Book",
+ feature_name);
}
// Check for Unstable Book sections that don't have a corresponding unstable feature
- for feature_name in &unstable_book_section_file_names - &unstable_feature_names {
- tidy_error!(
- bad,
- "The Unstable Book has a section '{}' which doesn't correspond \
- to an unstable feature",
- feature_name)
+ for feature_name in &unstable_book_lang_features_section_file_names -
+ &unstable_lang_feature_names {
+ tidy_error!(bad,
+ "The Unstable Book has a 'language feature' section '{}' which doesn't \
+ correspond to an unstable language feature",
+ feature_name)
}
}