From 1afe77fb5f14294b7d29d0d57263e2399981c130 Mon Sep 17 00:00:00 2001 From: lukaramu Date: Sat, 15 Apr 2017 23:55:59 +0200 Subject: [PATCH 01/11] Cleaned up throughout std::path's docs Part of #29368. * added missing links * updated method summaries to use 3rd person style * added missing periods in `Component`'s variant summaries * use standard iterator boilerplate in `Components`' and `Iter`'s docs * added example to `Iter::as_path`, adapted from `Components::as_path`'s example * consolidated examples for `Path::file_name` * some other small fixes --- src/libstd/path.rs | 125 ++++++++++++++++++++++++++++----------------- 1 file changed, 78 insertions(+), 47 deletions(-) diff --git a/src/libstd/path.rs b/src/libstd/path.rs index db446d88900c1..b751122e970d6 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -370,13 +370,15 @@ pub struct PrefixComponent<'a> { } impl<'a> PrefixComponent<'a> { - /// The parsed prefix data. + /// Returns the parsed prefix data. #[stable(feature = "rust1", since = "1.0.0")] pub fn kind(&self) -> Prefix<'a> { self.parsed } - /// The raw `OsStr` slice for this prefix. + /// Returns the raw [`OsStr`] slice for this prefix. + /// + /// [`OsStr`]: ../../std/ffi/struct.OsStr.html #[stable(feature = "rust1", since = "1.0.0")] pub fn as_os_str(&self) -> &'a OsStr { self.raw @@ -446,25 +448,25 @@ pub enum Component<'a> { #[stable(feature = "rust1", since = "1.0.0")] PrefixComponent<'a> ), - /// The root directory component, appears after any prefix and before anything else + /// The root directory component, appears after any prefix and before anything else. #[stable(feature = "rust1", since = "1.0.0")] RootDir, - /// A reference to the current directory, i.e. `.` + /// A reference to the current directory, i.e. `.`. #[stable(feature = "rust1", since = "1.0.0")] CurDir, - /// A reference to the parent directory, i.e. `..` + /// A reference to the parent directory, i.e. `..`. #[stable(feature = "rust1", since = "1.0.0")] ParentDir, - /// A normal component, i.e. `a` and `b` in `a/b` + /// A normal component, e.g. `a` and `b` in `a/b`. #[stable(feature = "rust1", since = "1.0.0")] Normal(#[stable(feature = "rust1", since = "1.0.0")] &'a OsStr), } impl<'a> Component<'a> { - /// Extracts the underlying `OsStr` slice. + /// Extracts the underlying [`OsStr`] slice. /// /// # Examples /// @@ -475,6 +477,8 @@ impl<'a> Component<'a> { /// let components: Vec<_> = path.components().map(|comp| comp.as_os_str()).collect(); /// assert_eq!(&components, &[".", "tmp", "foo", "bar.txt"]); /// ``` + /// + /// [`OsStr`]: ../../std/ffi/struct.OsStr.html #[stable(feature = "rust1", since = "1.0.0")] pub fn as_os_str(self) -> &'a OsStr { match self { @@ -494,12 +498,10 @@ impl<'a> AsRef for Component<'a> { } } -/// The core iterator giving the components of a path. +/// An interator over the [`Component`]s of a [`Path`]. /// -/// See the module documentation for an in-depth explanation of components and -/// their role in the API. -/// -/// This `struct` is created by the [`path::Path::components`] method. +/// This `struct` is created by the [`components`] method on [`Path`]. +/// See its documentation for more. /// /// # Examples /// @@ -513,7 +515,9 @@ impl<'a> AsRef for Component<'a> { /// } /// ``` /// -/// [`path::Path::components`]: struct.Path.html#method.components +/// [`Component`]: enum.Component.html +/// [`components`]: struct.Path.html#method.components +/// [`Path`]: struct.Path.html #[derive(Clone)] #[stable(feature = "rust1", since = "1.0.0")] pub struct Components<'a> { @@ -534,9 +538,15 @@ pub struct Components<'a> { back: State, } -/// An iterator over the components of a path, as [`OsStr`] slices. +/// An iterator over the [`Component`]s of a [`Path`], as [`OsStr`] slices. /// +/// This `struct` is created by the [`iter`] method on [`Path`]. +/// See its documentation for more. +/// +/// [`Component`]: enum.Component.html +/// [`iter`]: struct.Path.html#method.iter /// [`OsStr`]: ../../std/ffi/struct.OsStr.html +/// [`Path`]: struct.Path.html #[derive(Clone)] #[stable(feature = "rust1", since = "1.0.0")] pub struct Iter<'a> { @@ -762,6 +772,18 @@ impl<'a> fmt::Debug for Iter<'a> { impl<'a> Iter<'a> { /// Extracts a slice corresponding to the portion of the path remaining for iteration. + /// + /// # Examples + /// + /// ``` + /// use std::path::Path; + /// + /// let mut iter = Path::new("/tmp/foo/bar.txt").iter(); + /// iter.next(); + /// iter.next(); + /// + /// assert_eq!(Path::new("foo/bar.txt"), iter.as_path()); + /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn as_path(&self) -> &'a Path { self.inner.as_path() @@ -1067,9 +1089,10 @@ impl PathBuf { /// Truncate `self` to [`self.parent`]. /// - /// Returns false and does nothing if [`self.file_name`] is `None`. + /// Returns `false` and does nothing if [`self.file_name`] is [`None`]. /// Otherwise, returns `true`. /// + /// [`None`]: ../../std/option/enum.Option.html#variant.None /// [`self.parent`]: struct.PathBuf.html#method.parent /// [`self.file_name`]: struct.PathBuf.html#method.file_name /// @@ -1132,10 +1155,11 @@ impl PathBuf { /// Updates [`self.extension`] to `extension`. /// - /// If [`self.file_name`] is `None`, does nothing and returns `false`. + /// Returns `false` and does nothing if [`self.file_name`] is [`None`], + /// returns `true` and updates the extension otherwise. /// - /// Otherwise, returns `true`; if [`self.extension`] is [`None`], the - /// extension is added; otherwise it is replaced. + /// If [`self.extension`] is [`None`], the extension is added; otherwise + /// it is replaced. /// /// [`self.file_name`]: struct.PathBuf.html#method.file_name /// [`self.extension`]: struct.PathBuf.html#method.extension @@ -1195,7 +1219,10 @@ impl PathBuf { self.inner } - /// Converts this `PathBuf` into a boxed `Path`. + /// Converts this `PathBuf` into a [boxed][`Box`] [`Path`]. + /// + /// [`Box`]: ../../std/boxed/struct.Box.html + /// [`Path`]: struct.Path.html #[unstable(feature = "into_boxed_path", issue = "40380")] pub fn into_boxed_path(self) -> Box { unsafe { mem::transmute(self.inner.into_boxed_os_str()) } @@ -1402,10 +1429,14 @@ pub struct Path { inner: OsStr, } -/// An error returned from the [`Path::strip_prefix`] method indicating that the -/// prefix was not found in `self`. +/// An error returned from [`Path::strip_prefix`][`strip_prefix`] if the prefix +/// was not found. +/// +/// This `struct` is created by the [`strip_prefix`] method on [`Path`]. +/// See its documentation for more. /// -/// [`Path::strip_prefix`]: struct.Path.html#method.strip_prefix +/// [`strip_prefix`]: struct.Path.html#method.strip_prefix +/// [`Path`]: struct.Path.html #[derive(Debug, Clone, PartialEq, Eq)] #[stable(since = "1.7.0", feature = "strip_prefix")] pub struct StripPrefixError(()); @@ -1421,7 +1452,7 @@ impl Path { os_str_as_u8_slice(&self.inner) } - /// Directly wrap a string slice as a `Path` slice. + /// Directly wraps a string slice as a `Path` slice. /// /// This is a cost-free conversion. /// @@ -1525,10 +1556,11 @@ impl Path { PathBuf::from(self.inner.to_os_string()) } - /// A path is *absolute* if it is independent of the current directory. + /// Returns `true` if the `Path` is absolute, i.e. if it is independent of + /// the current directory. /// /// * On Unix, a path is absolute if it starts with the root, so - /// `is_absolute` and `has_root` are equivalent. + /// `is_absolute` and [`has_root`] are equivalent. /// /// * On Windows, a path is absolute if it has a prefix and starts with the /// root: `c:\windows` is absolute, while `c:temp` and `\temp` are not. @@ -1540,6 +1572,8 @@ impl Path { /// /// assert!(!Path::new("foo.txt").is_absolute()); /// ``` + /// + /// [`has_root`]: #method.has_root #[stable(feature = "rust1", since = "1.0.0")] #[allow(deprecated)] pub fn is_absolute(&self) -> bool { @@ -1547,7 +1581,9 @@ impl Path { self.has_root() && (cfg!(unix) || cfg!(target_os = "redox") || self.prefix().is_some()) } - /// A path is *relative* if it is not absolute. + /// Return `false` if the `Path` is relative, i.e. not absolute. + /// + /// See [`is_absolute`]'s documentation for more details. /// /// # Examples /// @@ -1556,6 +1592,8 @@ impl Path { /// /// assert!(Path::new("foo.txt").is_relative()); /// ``` + /// + /// [`is_absolute`]: #method.is_absolute #[stable(feature = "rust1", since = "1.0.0")] pub fn is_relative(&self) -> bool { !self.is_absolute() @@ -1565,7 +1603,7 @@ impl Path { self.components().prefix } - /// A path has a root if the body of the path begins with the directory separator. + /// Returns `true` if the `Path` has a root. /// /// * On Unix, a path has a root if it begins with `/`. /// @@ -1586,7 +1624,7 @@ impl Path { self.components().has_root() } - /// The path without its final component, if any. + /// Returns the `Path` without its final component, if there is one. /// /// Returns [`None`] if the path terminates in a root or prefix. /// @@ -1619,9 +1657,9 @@ impl Path { }) } - /// The final component of the path, if it is a normal file. + /// Returns the final component of the `Path`, if it is a normal file. /// - /// If the path terminates in `..`, `file_name` will return [`None`]. + /// Returns [`None`] If the path terminates in `..`. /// /// [`None`]: ../../std/option/enum.Option.html#variant.None /// @@ -1631,18 +1669,7 @@ impl Path { /// use std::path::Path; /// use std::ffi::OsStr; /// - /// let path = Path::new("foo.txt"); - /// let os_str = OsStr::new("foo.txt"); - /// - /// assert_eq!(Some(os_str), path.file_name()); - /// ``` - /// - /// # Other examples - /// - /// ``` - /// use std::path::Path; - /// use std::ffi::OsStr; - /// + /// assert_eq!(Some(OsStr::new("foo.txt")), Path::new("foo.txt").file_name()); /// assert_eq!(Some(OsStr::new("foo.txt")), Path::new("foo.txt/.").file_name()); /// assert_eq!(Some(OsStr::new("foo.txt")), Path::new("foo.txt/.//").file_name()); /// assert_eq!(None, Path::new("foo.txt/..").file_name()); @@ -1869,7 +1896,7 @@ impl Path { buf } - /// Produce an iterator over the components of the path. + /// Produces an iterator over the components of the path. /// /// # Examples /// @@ -1896,7 +1923,7 @@ impl Path { } } - /// Produce an iterator over the path's components viewed as [`OsStr`] slices. + /// Produces an iterator over the path's components viewed as [`OsStr`] slices. /// /// [`OsStr`]: ../ffi/struct.OsStr.html /// @@ -1936,7 +1963,7 @@ impl Path { Display { path: self } } - /// Query the file system to get information about a file, directory, etc. + /// Queries the file system to get information about a file, directory, etc. /// /// This function will traverse symbolic links to query information about the /// destination file. @@ -1959,7 +1986,7 @@ impl Path { fs::metadata(self) } - /// Query the metadata about a file without following symlinks. + /// Queries the metadata about a file without following symlinks. /// /// This is an alias to [`fs::symlink_metadata`]. /// @@ -2096,7 +2123,11 @@ impl Path { fs::metadata(self).map(|m| m.is_dir()).unwrap_or(false) } - /// Converts a `Box` into a `PathBuf` without copying or allocating. + /// Converts a [`Box`][`Box`] into a [`PathBuf`] without copying or + /// allocating. + /// + /// [`Box`]: ../../std/boxed/struct.Box.html + /// [`PathBuf`]: struct.PathBuf.html #[unstable(feature = "into_boxed_path", issue = "40380")] pub fn into_path_buf(self: Box) -> PathBuf { let inner: Box = unsafe { mem::transmute(self) }; From 8c21b601367c4ee8c9b1554941189fdd09c8abb2 Mon Sep 17 00:00:00 2001 From: lukaramu Date: Mon, 17 Apr 2017 00:24:46 +0200 Subject: [PATCH 02/11] Expand and add examples to std::path::{Prefix, PrefixComponent}'s docs Part of #29368. --- src/libstd/path.rs | 116 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 106 insertions(+), 10 deletions(-) diff --git a/src/libstd/path.rs b/src/libstd/path.rs index b751122e970d6..77f0d9d95f29c 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -145,34 +145,79 @@ use sys::path::{is_sep_byte, is_verbatim_sep, MAIN_SEP_STR, parse_prefix}; /// Path prefixes (Windows only). /// -/// Windows uses a variety of path styles, including references to drive -/// volumes (like `C:`), network shared folders (like `\\server\share`) and -/// others. In addition, some path prefixes are "verbatim", in which case -/// `/` is *not* treated as a separator and essentially no normalization is -/// performed. +/// Windows uses a variety of path prefix styles, including references to drive +/// volumes (like `C:`), network shared folders (like `\\server\share`), and +/// others. In addition, some path prefixes are "verbatim" (i.e. prefixed with +/// `\\?\`, in which case `/` is *not* treated as a separator and essentially no +/// normalization is performed. +/// +/// # Examples +/// +/// ``` +/// use std::path::{Component, Path, Prefix}; +/// use std::path::Prefix::*; +/// use std::ffi::OsStr; +/// +/// fn get_path_prefix(s: &str) -> Prefix { +/// let path = Path::new(s); +/// match path.components().next().unwrap() { +/// Component::Prefix(prefix_component) => prefix_component.kind(), +/// _ => panic!(), +/// } +/// } +/// +/// # if cfg!(windows) { +/// assert_eq!(Verbatim(OsStr::new("pictures")), +/// get_path_prefix(r"\\?\pictures\kittens")); +/// assert_eq!(VerbatimUNC(OsStr::new("server"), OsStr::new("share")), +/// get_path_prefix(r"\\?\UNC\server\share")); +/// assert_eq!(VerbatimDisk('C' as u8), get_path_prefix(r"\\?\c:\")); +/// assert_eq!(DeviceNS(OsStr::new("BrainInterface")), +/// get_path_prefix(r"\\.\BrainInterface")); +/// assert_eq!(UNC(OsStr::new("server"), OsStr::new("share")), +/// get_path_prefix(r"\\server\share")); +/// assert_eq!(Disk('C' as u8), get_path_prefix(r"C:\Users\Rust\Pictures\Ferris")); +/// # } +/// ``` #[derive(Copy, Clone, Debug, Hash, PartialOrd, Ord, PartialEq, Eq)] #[stable(feature = "rust1", since = "1.0.0")] pub enum Prefix<'a> { - /// Prefix `\\?\`, together with the given component immediately following it. + /// Verbatim prefix, e.g. `\\?\cat_pics`. + /// + /// Verbatim prefixes consist of `\\?\` immediately followed by the given + /// component. #[stable(feature = "rust1", since = "1.0.0")] Verbatim(#[stable(feature = "rust1", since = "1.0.0")] &'a OsStr), - /// Prefix `\\?\UNC\`, with the "server" and "share" components following it. + /// Verbatim prefix using Windows' _**U**niform **N**aming **C**onvention_, + /// e.g. `\\?\UNC\server\share`. + /// + /// Verbatim UNC prefixes consist of `\\?\UNC\` immediately followed by the + /// server's hostname and a share name. #[stable(feature = "rust1", since = "1.0.0")] VerbatimUNC( #[stable(feature = "rust1", since = "1.0.0")] &'a OsStr, #[stable(feature = "rust1", since = "1.0.0")] &'a OsStr, ), - /// Prefix like `\\?\C:\`, for the given drive letter + /// Verbatim disk prefix, e.g. `\\?\C:\`. + /// + /// Verbatim disk prefixes consist of `\\?\` immediately followed by the + /// drive letter and `:\`. #[stable(feature = "rust1", since = "1.0.0")] VerbatimDisk(#[stable(feature = "rust1", since = "1.0.0")] u8), - /// Prefix `\\.\`, together with the given component immediately following it. + /// Device namespace prefix, e.g. `\\.\COM42`. + /// + /// Device namespace prefixes consist of `\\.\` immediately followed by the + /// device name. #[stable(feature = "rust1", since = "1.0.0")] DeviceNS(#[stable(feature = "rust1", since = "1.0.0")] &'a OsStr), - /// Prefix `\\server\share`, with the given "server" and "share" components. + /// Prefix using Windows' _**U**niform **N**aming **C**onvention_, e.g. + /// `\\server\share`. + /// + /// UNC prefixes consist of the server's hostname and a share name. #[stable(feature = "rust1", since = "1.0.0")] UNC( #[stable(feature = "rust1", since = "1.0.0")] &'a OsStr, @@ -217,6 +262,20 @@ impl<'a> Prefix<'a> { } /// Determines if the prefix is verbatim, i.e. begins with `\\?\`. + /// + /// # Examples + /// + /// ``` + /// use std::path::Prefix::*; + /// use std::ffi::OsStr; + /// + /// assert!(Verbatim(OsStr::new("pictures")).is_verbatim()); + /// assert!(VerbatimUNC(OsStr::new("server"), OsStr::new("share")).is_verbatim()); + /// assert!(VerbatimDisk('C' as u8).is_verbatim()); + /// assert!(!DeviceNS(OsStr::new("BrainInterface")).is_verbatim()); + /// assert!(!UNC(OsStr::new("server"), OsStr::new("share")).is_verbatim()); + /// assert!(!Disk('C' as u8).is_verbatim()); + /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn is_verbatim(&self) -> bool { @@ -358,7 +417,39 @@ enum State { /// A Windows path prefix, e.g. `C:` or `\\server\share`. /// +/// In addition to the parsed [`Prefix`] information returned by [`kind`], +/// `PrefixComponent` also holds the raw and unparsed [`OsStr`] slice, +/// returned by [`as_os_str`]. +/// +/// Instances of this `struct` can be obtained by matching against the +/// [`Prefix` variant] on [`Component`]. +/// /// Does not occur on Unix. +/// +/// # Examples +/// +/// ``` +/// # if cfg!(windows) { +/// use std::path::{Component, Path, Prefix}; +/// use std::ffi::OsStr; +/// +/// let path = Path::new(r"c:\you\later\"); +/// match path.components().next().unwrap() { +/// Component::Prefix(prefix_component) => { +/// assert_eq!(Prefix::Disk('C' as u8), prefix_component.kind()); +/// assert_eq!(OsStr::new("c:"), prefix_component.as_os_str()); +/// } +/// _ => unreachable!(), +/// } +/// # } +/// ``` +/// +/// [`as_os_str`]: #method.as_os_str +/// [`Component`]: enum.Component.html +/// [`kind`]: #method.kind +/// [`OsStr`]: ../../std/ffi/struct.OsStr.html +/// [`Prefix` variant]: enum.Component.html#variant.Prefix +/// [`Prefix`]: enum.Prefix.html #[stable(feature = "rust1", since = "1.0.0")] #[derive(Copy, Clone, Eq, Debug)] pub struct PrefixComponent<'a> { @@ -371,6 +462,11 @@ pub struct PrefixComponent<'a> { impl<'a> PrefixComponent<'a> { /// Returns the parsed prefix data. + /// + /// See [`Prefix`]'s documentation for more information on the different + /// kinds of prefixes. + /// + /// [`Prefix`]: enum.Prefix.html #[stable(feature = "rust1", since = "1.0.0")] pub fn kind(&self) -> Prefix<'a> { self.parsed From 51ca5fe716c48b2dd4adbe4e2379d952b60afca8 Mon Sep 17 00:00:00 2001 From: lukaramu Date: Mon, 17 Apr 2017 22:37:27 +0200 Subject: [PATCH 03/11] Restructure and redistribute std::path's module docs Part of #29368. * Added a new summary paragraph about std::path's parsing facilities * Slightly exanded `Component`'s docs * removed the now redundant section on component types from the module docs * moved the section on path normalization during parsing to the docs on `Path::components` * Clarified difference between `Prefix` and `PrefixComponent` in their respecive summary sentences --- src/libstd/path.rs | 119 +++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 64 deletions(-) diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 77f0d9d95f29c..9c8eeb0c52161 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -10,11 +10,18 @@ //! Cross-platform path manipulation. //! -//! This module provides two types, [`PathBuf`] and [`Path`][`Path`] (akin to [`String`] +//! This module provides two types, [`PathBuf`] and [`Path`] (akin to [`String`] //! and [`str`]), for working with paths abstractly. These types are thin wrappers //! around [`OsString`] and [`OsStr`] respectively, meaning that they work directly //! on strings according to the local platform's path syntax. //! +//! Paths can be parsed into [`Component`]s by iterating over the structure +//! returned by the [`components`] method on [`Path`]. [`Component`]s roughly +//! correspond to the substrings between path separators (`/` or `\`). You can +//! reconstruct an equivalent path from components with the [`push`] method on +//! [`PathBuf`]; note that the paths may differ syntactically by the +//! normalization described in the documentation for the [`components`] method. +//! //! ## Simple usage //! //! Path manipulation includes both parsing components from slices and building @@ -50,62 +57,11 @@ //! path.set_extension("dll"); //! ``` //! -//! ## Path components and normalization -//! -//! The path APIs are built around the notion of "components", which roughly -//! correspond to the substrings between path separators (`/` and, on Windows, -//! `\`). The APIs for path parsing are largely specified in terms of the path's -//! components, so it's important to clearly understand how those are -//! determined. -//! -//! A path can always be reconstructed into an *equivalent* path by -//! putting together its components via `push`. Syntactically, the -//! paths may differ by the normalization described below. -//! -//! ### Component types -//! -//! Components come in several types: -//! -//! * Normal components are the default: standard references to files or -//! directories. The path `a/b` has two normal components, `a` and `b`. -//! -//! * Current directory components represent the `.` character. For example, -//! `./a` has a current directory component and a normal component `a`. -//! -//! * The root directory component represents a separator that designates -//! starting from root. For example, `/a/b` has a root directory component -//! followed by normal components `a` and `b`. -//! -//! On Windows, an additional component type comes into play: -//! -//! * Prefix components, of which there is a large variety. For example, `C:` -//! and `\\server\share` are prefixes. The path `C:windows` has a prefix -//! component `C:` and a normal component `windows`; the path `C:\windows` has a -//! prefix component `C:`, a root directory component, and a normal component -//! `windows`. -//! -//! ### Normalization -//! -//! Aside from splitting on the separator(s), there is a small amount of -//! "normalization": -//! -//! * Repeated separators are ignored: `a/b` and `a//b` both have components `a` -//! and `b`. -//! -//! * Occurrences of `.` are normalized away, *except* if they are at -//! the beginning of the path (in which case they are often meaningful -//! in terms of path searching). So, for example, `a/./b`, `a/b/`, -//! `/a/b/.` and `a/b` all have components `a` and `b`, but `./a/b` -//! has a leading current directory component. -//! -//! No other normalization takes place by default. In particular, -//! `a/c` and `a/b/../c` are distinct, to account for the possibility -//! that `b` is a symbolic link (so its parent isn't `a`). Further -//! normalization is possible to build on top of the components APIs, -//! and will be included in this library in the near future. -//! +//! [`Component`]: ../../std/path/enum.Component.html +//! [`components`]: ../../std/path/struct.Path.html#method.components //! [`PathBuf`]: ../../std/path/struct.PathBuf.html //! [`Path`]: ../../std/path/struct.Path.html +//! [`push`]: ../../std/path/struct.PathBuf.html#method.push //! [`String`]: ../../std/string/struct.String.html //! [`str`]: ../../std/primitive.str.html //! [`OsString`]: ../../std/ffi/struct.OsString.html @@ -143,7 +99,7 @@ use sys::path::{is_sep_byte, is_verbatim_sep, MAIN_SEP_STR, parse_prefix}; // Windows Prefixes //////////////////////////////////////////////////////////////////////////////// -/// Path prefixes (Windows only). +/// Windows path prefixes, e.g. `C:` or `\\server\share`. /// /// Windows uses a variety of path prefix styles, including references to drive /// volumes (like `C:`), network shared folders (like `\\server\share`), and @@ -415,7 +371,8 @@ enum State { Done = 3, } -/// A Windows path prefix, e.g. `C:` or `\\server\share`. +/// A structure wrapping a Windows path prefix as well as its unparsed string +/// representation. /// /// In addition to the parsed [`Prefix`] information returned by [`kind`], /// `PrefixComponent` also holds the raw and unparsed [`OsStr`] slice, @@ -511,11 +468,11 @@ impl<'a> Hash for PrefixComponent<'a> { /// A single component of a path. /// -/// See the module documentation for an in-depth explanation of components and -/// their role in the API. +/// A `Component` roughtly corresponds to a substring between path separators +/// (`/` or `\`). /// -/// This `enum` is created from iterating over the [`path::Components`] -/// `struct`. +/// This `enum` is created by iterating over [`Components`], which in turn is +/// created by the [`components`][`Path::components`] method on [`Path`]. /// /// # Examples /// @@ -532,19 +489,28 @@ impl<'a> Hash for PrefixComponent<'a> { /// ]); /// ``` /// -/// [`path::Components`]: struct.Components.html +/// [`Components`]: struct.Components.html +/// [`Path`]: struct.Path.html +/// [`Path::components`]: struct.Path.html#method.components #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] #[stable(feature = "rust1", since = "1.0.0")] pub enum Component<'a> { /// A Windows path prefix, e.g. `C:` or `\\server\share`. /// + /// There is a large variety of prefix types, see [`Prefix`]'s documentation + /// for more. + /// /// Does not occur on Unix. + /// + /// [`Prefix`]: enum.Prefix.html #[stable(feature = "rust1", since = "1.0.0")] Prefix( #[stable(feature = "rust1", since = "1.0.0")] PrefixComponent<'a> ), /// The root directory component, appears after any prefix and before anything else. + /// + /// It represents a deperator that designates that a path starts from root. #[stable(feature = "rust1", since = "1.0.0")] RootDir, @@ -557,6 +523,9 @@ pub enum Component<'a> { ParentDir, /// A normal component, e.g. `a` and `b` in `a/b`. + /// + /// This variant is the most common one, it represents references to files + /// or directories. #[stable(feature = "rust1", since = "1.0.0")] Normal(#[stable(feature = "rust1", since = "1.0.0")] &'a OsStr), } @@ -1992,7 +1961,21 @@ impl Path { buf } - /// Produces an iterator over the components of the path. + /// Produces an iterator over the [`Component`]s of the path. + /// + /// When parsing the path, there is a small amount of normalization: + /// + /// * Repeated seperators are ignored, so `a/b` and `a//b` both have + /// `a` and `b` as components. + /// + /// * Occurentces of `.` are normalized away, exept if they are at the + /// beginning of the path. For example, `a/./b`, `a/b/`, `a/b/.` and + /// `a/b` all have `a` and `b` as components, but `./a/b` starts with + /// an additional [`CurDir`] component. + /// + /// Note that no other normalization takes place; in particular, `a/c` + /// and `a/b/../c` are distinct, to account for the possibility that `b` + /// is a symbolic link (so its parent isn't `a`). /// /// # Examples /// @@ -2007,6 +1990,9 @@ impl Path { /// assert_eq!(components.next(), Some(Component::Normal(OsStr::new("foo.txt")))); /// assert_eq!(components.next(), None) /// ``` + /// + /// [`Component`]: enum.Component.html + /// [`CurDir`]: enum.Component.html#variant.CurDir #[stable(feature = "rust1", since = "1.0.0")] pub fn components(&self) -> Components { let prefix = parse_prefix(self.as_os_str()); @@ -2019,8 +2005,13 @@ impl Path { } } - /// Produces an iterator over the path's components viewed as [`OsStr`] slices. + /// Produces an iterator over the path's components viewed as [`OsStr`] + /// slices. + /// + /// For more information about the particulars of how the path is separated + /// into components, see [`components`]. /// + /// [`components`]: #method.components /// [`OsStr`]: ../ffi/struct.OsStr.html /// /// # Examples From 32132d9fb66d95ab3bfbc5eff969a1e084310705 Mon Sep 17 00:00:00 2001 From: lukaramu Date: Mon, 17 Apr 2017 22:51:12 +0200 Subject: [PATCH 04/11] Expand std::path::Display's docs Part of #29368. * Added explanation for why the struct exists * Added link to where it is created * Added example --- src/libstd/path.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 9c8eeb0c52161..ce13b57f0a288 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -2236,7 +2236,26 @@ impl fmt::Debug for Path { } } -/// Helper struct for safely printing paths with `format!()` and `{}` +/// Helper struct for safely printing paths with [`format!`] and `{}`. +/// +/// A [`Path`] might contain non-Unicode data. This `struct` implements the +/// [`Display`] trait in a way that mitigates that. It is created by the +/// [`display`][`Path::display`] method on [`Path`]. +/// +/// # Examples +/// +/// ``` +/// use std::path::Path; +/// +/// let path = Path::new("/tmp/foo.rs"); +/// +/// println!("{}", path.display()); +/// ``` +/// +/// [`Display`]: ../../std/fmt/trait.Display.html +/// [`format!`]: ../../std/macro.format.html +/// [`Path`]: struct.Path.html +/// [`Path::display`]: struct.Path.html#method.display #[stable(feature = "rust1", since = "1.0.0")] pub struct Display<'a> { path: &'a Path, From e3ad1b58f560ba0557d21c1aceb25da3442ba3f6 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 17 Apr 2017 17:17:11 -0700 Subject: [PATCH 05/11] Disable debuginfo when compiling tools Currently the Cargo binary has jumped from 14M to 34M on the beta channel, which appears to be due to the fact that we're compiling tools with debug information inside them. This additionally means that the `rls` binary is 62M right now! This wasn't an intentional change, so be sure to disable debuginfo when compiling tools as it's just intended for the standard library and compile for now. --- src/bootstrap/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index d711b63ea2e26..5e046f41673e8 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -464,8 +464,6 @@ impl Build { .env("RUSTC", self.out.join("bootstrap/debug/rustc")) .env("RUSTC_REAL", self.compiler_path(compiler)) .env("RUSTC_STAGE", stage.to_string()) - .env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string()) - .env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string()) .env("RUSTC_CODEGEN_UNITS", self.config.rust_codegen_units.to_string()) .env("RUSTC_DEBUG_ASSERTIONS", @@ -477,6 +475,13 @@ impl Build { .env("RUSTDOC_REAL", self.rustdoc(compiler)) .env("RUSTC_FLAGS", self.rustc_flags(target).join(" ")); + // Tools don't get debuginfo right now, e.g. cargo and rls don't get + // compiled with debuginfo. + if mode != Mode::Tool { + cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string()) + .env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string()); + } + // Enable usage of unstable features cargo.env("RUSTC_BOOTSTRAP", "1"); self.add_rust_test_threads(&mut cargo); From d6f7577279b28ab0551e60820b737aebf4f61105 Mon Sep 17 00:00:00 2001 From: lukaramu Date: Tue, 18 Apr 2017 15:03:41 +0200 Subject: [PATCH 06/11] Fix typos in std::path's docs * Closed an unclosed paren * seperator -> separator * deperator -> separator --- src/libstd/path.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libstd/path.rs b/src/libstd/path.rs index ce13b57f0a288..22889b5de4c2a 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -104,8 +104,8 @@ use sys::path::{is_sep_byte, is_verbatim_sep, MAIN_SEP_STR, parse_prefix}; /// Windows uses a variety of path prefix styles, including references to drive /// volumes (like `C:`), network shared folders (like `\\server\share`), and /// others. In addition, some path prefixes are "verbatim" (i.e. prefixed with -/// `\\?\`, in which case `/` is *not* treated as a separator and essentially no -/// normalization is performed. +/// `\\?\`), in which case `/` is *not* treated as a separator and essentially +/// no normalization is performed. /// /// # Examples /// @@ -510,7 +510,7 @@ pub enum Component<'a> { /// The root directory component, appears after any prefix and before anything else. /// - /// It represents a deperator that designates that a path starts from root. + /// It represents a separator that designates that a path starts from root. #[stable(feature = "rust1", since = "1.0.0")] RootDir, @@ -1965,7 +1965,7 @@ impl Path { /// /// When parsing the path, there is a small amount of normalization: /// - /// * Repeated seperators are ignored, so `a/b` and `a//b` both have + /// * Repeated separators are ignored, so `a/b` and `a//b` both have /// `a` and `b` as components. /// /// * Occurentces of `.` are normalized away, exept if they are at the From 43d92bb585aa520436d9039ce74fb5339c5d8786 Mon Sep 17 00:00:00 2001 From: steveklabnik Date: Tue, 18 Apr 2017 11:01:20 -0400 Subject: [PATCH 07/11] update mdbook --- src/Cargo.lock | 6 +++--- src/tools/rustbook/Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Cargo.lock b/src/Cargo.lock index 62b853480394f..80a8596a499c7 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -269,7 +269,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "mdbook" -version = "0.0.18" +version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clap 2.22.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -425,7 +425,7 @@ name = "rustbook" version = "0.1.0" dependencies = [ "clap 2.22.1 (registry+https://github.com/rust-lang/crates.io-index)", - "mdbook 0.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "mdbook 0.0.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1004,7 +1004,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum lazy_static 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4732c563b9a21a406565c4747daa7b46742f082911ae4753f390dc9ec7ee1a97" "checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135" "checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad" -"checksum mdbook 0.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "06a68e8738e42b38a02755d3ce5fa12d559e17acb238e4326cbc3cc056e65280" +"checksum mdbook 0.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "2598843aeda0c5bb2e8e4d714564f1c3fc40f7844157e34563bf96ae3866b56e" "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" "checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99" "checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3" diff --git a/src/tools/rustbook/Cargo.toml b/src/tools/rustbook/Cargo.toml index d5b95c08306b2..e320933067226 100644 --- a/src/tools/rustbook/Cargo.toml +++ b/src/tools/rustbook/Cargo.toml @@ -8,5 +8,5 @@ license = "MIT/Apache-2.0" clap = "2.19.3" [dependencies.mdbook] -version = "0.0.18" +version = "0.0.19" default-features = false From 0a69bf4cdd01a279f8b99280de950e0083c85725 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 18 Apr 2017 08:57:56 -0700 Subject: [PATCH 08/11] Bump stage0 to fix ARM LLVM There was a serious ARM codegen bug in LLVM that was fixed by #40779, also backported to beta. This updates stage0 to 1.17.0-beta.3 to pick up that change, so ARM can bootstrap natively again. Fixes #41291 cc @arielb1 --- src/stage0.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stage0.txt b/src/stage0.txt index 60fbcadf49157..dc6931c1d0bdd 100644 --- a/src/stage0.txt +++ b/src/stage0.txt @@ -12,4 +12,4 @@ # tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was # released on `$date` -rustc: beta-2017-03-21 +rustc: beta-2017-04-05 From cba0c6ad6da735d00819d5a0df3953b3a8ebfe3e Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Tue, 18 Apr 2017 23:59:25 +0300 Subject: [PATCH 09/11] rustc_trans: do not treat byval as using up registers. --- src/librustc_trans/cabi_x86_64.rs | 6 +++--- .../run-make/extern-fn-struct-passing-abi/test.c | 15 +++++++++++++++ .../run-make/extern-fn-struct-passing-abi/test.rs | 8 ++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/librustc_trans/cabi_x86_64.rs b/src/librustc_trans/cabi_x86_64.rs index 2daebf5cf3d6b..2cfab7df8b30b 100644 --- a/src/librustc_trans/cabi_x86_64.rs +++ b/src/librustc_trans/cabi_x86_64.rs @@ -229,12 +229,12 @@ pub fn compute_abi_info<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, fty: &mut FnType }; if in_mem { - // `sret` / `byval` parameter thus one less integer register available - int_regs -= 1; - arg.make_indirect(ccx); if is_arg { arg.attrs.set(ArgAttribute::ByVal); + } else { + // `sret` parameter thus one less integer register available + int_regs -= 1; } } else { // split into sized chunks passed individually diff --git a/src/test/run-make/extern-fn-struct-passing-abi/test.c b/src/test/run-make/extern-fn-struct-passing-abi/test.c index 4e09928edc6d1..44a940a17a98a 100644 --- a/src/test/run-make/extern-fn-struct-passing-abi/test.c +++ b/src/test/run-make/extern-fn-struct-passing-abi/test.c @@ -137,6 +137,21 @@ void byval_rect_with_float(int32_t a, int32_t b, float c, int32_t d, assert(s.d == 556); } +// System V x86_64 ABI: +// a, b, d, e, f should be byval pointer (on the stack) +// g passed via register (fixes #41375) +// +// Win64 ABI: +// a, b, d, e, f, g should be byval pointer +void byval_rect_with_many_huge(struct Huge a, struct Huge b, struct Huge c, + struct Huge d, struct Huge e, struct Huge f, + struct Rect g) { + assert(g.a == 123); + assert(g.b == 456); + assert(g.c == 789); + assert(g.d == 420); +} + // System V x86_64 & Win64 ABI: // a, b should be in registers // s should be split across 2 integer registers diff --git a/src/test/run-make/extern-fn-struct-passing-abi/test.rs b/src/test/run-make/extern-fn-struct-passing-abi/test.rs index ff845a644b114..aaae7ae4fb49b 100644 --- a/src/test/run-make/extern-fn-struct-passing-abi/test.rs +++ b/src/test/run-make/extern-fn-struct-passing-abi/test.rs @@ -64,6 +64,8 @@ extern { fn byval_rect_with_float(a: i32, b: i32, c: f32, d: i32, e: i32, f: i32, s: Rect); + fn byval_rect_with_many_huge(a: Huge, b: Huge, c: Huge, d: Huge, e: Huge, f: Huge, g: Rect); + fn split_rect(a: i32, b: i32, s: Rect); fn split_rect_floats(a: f32, b: f32, s: FloatRect); @@ -95,6 +97,12 @@ fn main() { byval_many_rect(1, 2, 3, 4, 5, 6, s); byval_rect_floats(1., 2., 3., 4., 5., 6., 7., s, u); byval_rect_with_float(1, 2, 3.0, 4, 5, 6, s); + byval_rect_with_many_huge(v, v, v, v, v, v, Rect { + a: 123, + b: 456, + c: 789, + d: 420 + }); split_rect(1, 2, s); split_rect_floats(1., 2., u); split_rect_with_floats(1, 2, 3.0, 4, 5.0, 6, s); From fea357663364c3b9464b1d907d8e1f11e859bc2b Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Thu, 13 Apr 2017 13:12:44 -0400 Subject: [PATCH 10/11] Add top level sections to the Unstable Book. Prior to this commit, the contents of the Unstable Book were assumed to be unstable features. This commit moves features into 'language features' or 'library features' subsections. It also moves the 'linker_flavor' compiler flag into a new 'Compiler Flags' subsection. Even though it was helpful, I removed the tidy check that cross-references the SUMMARY.md links with the Unstable Book directory contents just because it would be difficult to maintain. Relevant PR: https://github.com/rust-lang/rust/issues/41142. --- src/Cargo.lock | 3 - src/doc/guide-plugins.md | 2 +- src/doc/unstable-book/src/SUMMARY.md | 450 +++++++++--------- src/doc/unstable-book/src/compiler-flags.md | 1 + .../src/{ => compiler-flags}/linker-flavor.md | 0 .../unstable-book/src/language-features.md | 1 + .../abi-msp430-interrupt.md | 0 .../src/{ => language-features}/abi-ptx.md | 0 .../src/{ => language-features}/abi-sysv64.md | 0 .../{ => language-features}/abi-unadjusted.md | 0 .../{ => language-features}/abi-vectorcall.md | 0 .../abi-x86-interrupt.md | 0 .../advanced-slice-patterns.md | 0 .../src/{ => language-features}/allocator.md | 0 .../allow-internal-unstable.md | 0 .../src/{ => language-features}/asm.md | 0 .../associated-consts.md | 0 .../associated-type-defaults.md | 0 .../{ => language-features}/attr-literals.md | 0 .../{ => language-features}/box-patterns.md | 0 .../src/{ => language-features}/box-syntax.md | 0 .../src/{ => language-features}/catch-expr.md | 0 .../cfg-target-feature.md | 0 .../cfg-target-has-atomic.md | 0 .../cfg-target-thread-local.md | 0 .../cfg-target-vendor.md | 0 .../closure-to-fn-coercion.md | 0 .../compiler-builtins.md | 0 .../{ => language-features}/concat-idents.md | 0 .../conservative-impl-trait.md | 0 .../src/{ => language-features}/const-fn.md | 0 .../{ => language-features}/const-indexing.md | 0 .../custom-attribute.md | 0 .../{ => language-features}/custom-derive.md | 0 .../default-type-parameter-fallback.md | 0 .../drop-types-in-const.md | 0 .../dropck-eyepatch.md | 0 .../dropck-parametricity.md | 0 .../exclusive-range-pattern.md | 0 .../{ => language-features}/fundamental.md | 0 .../generic-param-attrs.md | 0 .../src/{ => language-features}/global_asm.md | 0 .../src/{ => language-features}/i128-type.md | 0 .../inclusive-range-syntax.md | 0 .../src/{ => language-features}/intrinsics.md | 0 .../src/{ => language-features}/lang-items.md | 0 .../src/{ => language-features}/link-args.md | 0 .../src/{ => language-features}/link-cfg.md | 0 .../link-llvm-intrinsics.md | 0 .../src/{ => language-features}/linkage.md | 0 .../src/{ => language-features}/log-syntax.md | 0 .../loop-break-value.md | 0 .../{ => language-features}/macro-reexport.md | 0 .../macro-vis-matcher.md | 0 .../src/{ => language-features}/main.md | 0 .../naked-functions.md | 0 .../needs-allocator.md | 0 .../needs-panic-runtime.md | 0 .../src/{ => language-features}/never-type.md | 0 .../src/{ => language-features}/no-core.md | 0 .../src/{ => language-features}/no-debug.md | 0 .../non-ascii-idents.md | 0 .../omit-gdb-pretty-printer-section.md | 0 .../on-unimplemented.md | 0 .../optin-builtin-traits.md | 0 .../overlapping-marker-traits.md | 0 .../{ => language-features}/panic-runtime.md | 0 .../placement-in-syntax.md | 0 .../platform-intrinsics.md | 0 .../plugin-registrar.md | 0 .../src/{ => language-features}/plugin.md | 0 .../{ => language-features}/prelude-import.md | 0 .../src/{ => language-features}/proc-macro.md | 0 .../src/{ => language-features}/quote.md | 0 .../{ => language-features}/relaxed-adts.md | 0 .../src/{ => language-features}/repr-simd.md | 0 .../{ => language-features}/rustc-attrs.md | 0 .../rustc-diagnostic-macros.md | 0 .../rvalue-static-promotion.md | 0 .../sanitizer-runtime.md | 0 .../src/{ => language-features}/simd-ffi.md | 0 .../src/{ => language-features}/simd.md | 0 .../{ => language-features}/slice-patterns.md | 0 .../{ => language-features}/specialization.md | 0 .../src/{ => language-features}/staged-api.md | 0 .../src/{ => language-features}/start.md | 0 .../static-nobundle.md | 0 .../stmt-expr-attributes.md | 0 .../struct-field-attributes.md | 0 .../structural-match.md | 0 .../{ => language-features}/target-feature.md | 0 .../{ => language-features}/thread-local.md | 0 .../{ => language-features}/trace-macros.md | 0 .../type-ascription.md | 0 .../unboxed-closures.md | 0 .../untagged-unions.md | 0 .../unwind-attributes.md | 0 .../use-extern-macros.md | 0 .../src/{ => language-features}/used.md | 0 src/doc/unstable-book/src/library-features.md | 1 + .../{ => library-features}/alloc-jemalloc.md | 0 .../{ => library-features}/alloc-system.md | 0 .../src/{ => library-features}/alloc.md | 0 .../src/{ => library-features}/as-c-str.md | 0 .../{ => library-features}/as-unsafe-cell.md | 0 .../src/{ => library-features}/ascii-ctype.md | 0 .../binary-heap-extras.md | 0 .../binary-heap-peek-mut-pop.md | 0 .../{ => library-features}/borrow-state.md | 0 .../src/{ => library-features}/box-heap.md | 0 .../{ => library-features}/c-void-variant.md | 0 .../char-escape-debug.md | 0 .../{ => library-features}/coerce-unsized.md | 0 .../collection-placement.md | 0 .../collections-range.md | 0 .../src/{ => library-features}/collections.md | 0 .../{ => library-features}/command-envs.md | 0 .../compiler-builtins-lib.md | 0 .../{ => library-features}/compiler-fences.md | 0 .../concat-idents-macro.md | 0 .../{ => library-features}/core-char-ext.md | 0 .../src/{ => library-features}/core-float.md | 0 .../{ => library-features}/core-intrinsics.md | 0 .../src/{ => library-features}/core-panic.md | 0 .../core-private-bignum.md | 0 .../core-private-diy-float.md | 0 .../{ => library-features}/core-slice-ext.md | 0 .../{ => library-features}/core-str-ext.md | 0 .../src/{ => library-features}/dec2flt.md | 0 .../src/{ => library-features}/decode-utf8.md | 0 .../derive-clone-copy.md | 0 .../src/{ => library-features}/derive-eq.md | 0 .../discriminant-value.md | 0 .../src/{ => library-features}/enumset.md | 0 .../{ => library-features}/error-type-id.md | 0 .../exact-size-is-empty.md | 0 .../src/{ => library-features}/fd-read.md | 0 .../src/{ => library-features}/fd.md | 0 .../fixed-size-array.md | 0 .../{ => library-features}/float-bits-conv.md | 0 .../{ => library-features}/float-extras.md | 0 .../src/{ => library-features}/flt2dec.md | 0 .../{ => library-features}/fmt-flags-align.md | 0 .../{ => library-features}/fmt-internals.md | 0 .../src/{ => library-features}/fn-traits.md | 0 .../src/{ => library-features}/fnbox.md | 0 .../from_utf8_error_as_bytes.md | 0 .../src/{ => library-features}/fused.md | 0 .../future-atomic-orderings.md | 0 .../src/{ => library-features}/get-type-id.md | 0 .../src/{ => library-features}/heap-api.md | 0 .../src/{ => library-features}/i128.md | 0 .../{ => library-features}/inclusive-range.md | 0 .../int-error-internals.md | 0 .../{ => library-features}/integer-atomics.md | 0 .../into-boxed-c-str.md | 0 .../into-boxed-os-str.md | 0 .../{ => library-features}/into-boxed-path.md | 0 .../io-error-internals.md | 0 .../src/{ => library-features}/io.md | 0 .../src/{ => library-features}/ip.md | 0 .../src/{ => library-features}/is-unique.md | 0 .../src/{ => library-features}/iter-rfind.md | 0 .../libstd-io-internals.md | 0 .../libstd-sys-internals.md | 0 .../libstd-thread-internals.md | 0 .../linked-list-extras.md | 0 .../src/{ => library-features}/lookup-host.md | 0 .../{ => library-features}/manually-drop.md | 0 .../map-entry-recover-keys.md | 0 .../src/{ => library-features}/mpsc-select.md | 0 .../src/{ => library-features}/n16.md | 0 .../never-type-impls.md | 0 .../src/{ => library-features}/nonzero.md | 0 .../src/{ => library-features}/offset-to.md | 0 .../src/{ => library-features}/once-poison.md | 0 .../src/{ => library-features}/oom.md | 0 .../{ => library-features}/option-entry.md | 0 .../osstring-shrink-to-fit.md | 0 .../src/{ => library-features}/panic-abort.md | 0 .../{ => library-features}/panic-unwind.md | 0 .../src/{ => library-features}/pattern.md | 0 .../src/{ => library-features}/peek.md | 0 .../{ => library-features}/placement-in.md | 0 .../placement-new-protocol.md | 0 .../src/{ => library-features}/print.md | 0 .../proc-macro-internals.md | 0 .../process-try-wait.md | 0 .../question-mark-carrier.md | 0 .../src/{ => library-features}/rand.md | 0 .../{ => library-features}/range-contains.md | 0 .../src/{ => library-features}/raw.md | 0 .../{ => library-features}/rc-would-unwrap.md | 0 .../retain-hash-collection.md | 0 .../{ => library-features}/reverse-cmp-key.md | 0 .../src/{ => library-features}/rt.md | 0 .../{ => library-features}/rustc-private.md | 0 .../sanitizer-runtime-lib.md | 0 .../src/{ => library-features}/set-stdio.md | 0 .../src/{ => library-features}/shared.md | 0 .../src/{ => library-features}/sip-hash-13.md | 0 .../slice-concat-ext.md | 0 .../{ => library-features}/slice-get-slice.md | 0 .../{ => library-features}/slice-rsplit.md | 0 .../{ => library-features}/sort-internals.md | 0 .../{ => library-features}/sort-unstable.md | 0 .../src/{ => library-features}/step-by.md | 0 .../src/{ => library-features}/step-trait.md | 0 .../str-checked-slicing.md | 0 .../src/{ => library-features}/str-escape.md | 0 .../{ => library-features}/str-internals.md | 0 .../{ => library-features}/str-mut-extras.md | 0 .../src/{ => library-features}/test.md | 0 .../src/{ => library-features}/thread-id.md | 0 .../thread-local-internals.md | 0 .../thread-local-state.md | 0 .../toowned-clone-into.md | 0 .../src/{ => library-features}/trusted-len.md | 0 .../src/{ => library-features}/try-from.md | 0 .../src/{ => library-features}/unicode.md | 0 .../src/{ => library-features}/unique.md | 0 .../src/{ => library-features}/unsize.md | 0 .../update-panic-count.md | 0 .../utf8-error-error-len.md | 0 .../{ => library-features}/vec-remove-item.md | 0 .../src/{ => library-features}/windows-c.md | 0 .../{ => library-features}/windows-handle.md | 0 .../src/{ => library-features}/windows-net.md | 0 .../{ => library-features}/windows-stdio.md | 0 .../src/{ => library-features}/zero-one.md | 0 .../unstable-book/src/the-unstable-book.md | 2 +- src/libsyntax/feature_gate.rs | 3 - src/tools/linkchecker/main.rs | 6 + src/tools/tidy/Cargo.toml | 3 - src/tools/tidy/src/main.rs | 2 - src/tools/tidy/src/unstable_book.rs | 135 +++--- 236 files changed, 308 insertions(+), 301 deletions(-) create mode 100644 src/doc/unstable-book/src/compiler-flags.md rename src/doc/unstable-book/src/{ => compiler-flags}/linker-flavor.md (100%) create mode 100644 src/doc/unstable-book/src/language-features.md rename src/doc/unstable-book/src/{ => language-features}/abi-msp430-interrupt.md (100%) rename src/doc/unstable-book/src/{ => language-features}/abi-ptx.md (100%) rename src/doc/unstable-book/src/{ => language-features}/abi-sysv64.md (100%) rename src/doc/unstable-book/src/{ => language-features}/abi-unadjusted.md (100%) rename src/doc/unstable-book/src/{ => language-features}/abi-vectorcall.md (100%) rename src/doc/unstable-book/src/{ => language-features}/abi-x86-interrupt.md (100%) rename src/doc/unstable-book/src/{ => language-features}/advanced-slice-patterns.md (100%) rename src/doc/unstable-book/src/{ => language-features}/allocator.md (100%) rename src/doc/unstable-book/src/{ => language-features}/allow-internal-unstable.md (100%) rename src/doc/unstable-book/src/{ => language-features}/asm.md (100%) rename src/doc/unstable-book/src/{ => language-features}/associated-consts.md (100%) rename src/doc/unstable-book/src/{ => language-features}/associated-type-defaults.md (100%) rename src/doc/unstable-book/src/{ => language-features}/attr-literals.md (100%) rename src/doc/unstable-book/src/{ => language-features}/box-patterns.md (100%) rename src/doc/unstable-book/src/{ => language-features}/box-syntax.md (100%) rename src/doc/unstable-book/src/{ => language-features}/catch-expr.md (100%) rename src/doc/unstable-book/src/{ => language-features}/cfg-target-feature.md (100%) rename src/doc/unstable-book/src/{ => language-features}/cfg-target-has-atomic.md (100%) rename src/doc/unstable-book/src/{ => language-features}/cfg-target-thread-local.md (100%) rename src/doc/unstable-book/src/{ => language-features}/cfg-target-vendor.md (100%) rename src/doc/unstable-book/src/{ => language-features}/closure-to-fn-coercion.md (100%) rename src/doc/unstable-book/src/{ => language-features}/compiler-builtins.md (100%) rename src/doc/unstable-book/src/{ => language-features}/concat-idents.md (100%) rename src/doc/unstable-book/src/{ => language-features}/conservative-impl-trait.md (100%) rename src/doc/unstable-book/src/{ => language-features}/const-fn.md (100%) rename src/doc/unstable-book/src/{ => language-features}/const-indexing.md (100%) rename src/doc/unstable-book/src/{ => language-features}/custom-attribute.md (100%) rename src/doc/unstable-book/src/{ => language-features}/custom-derive.md (100%) rename src/doc/unstable-book/src/{ => language-features}/default-type-parameter-fallback.md (100%) rename src/doc/unstable-book/src/{ => language-features}/drop-types-in-const.md (100%) rename src/doc/unstable-book/src/{ => language-features}/dropck-eyepatch.md (100%) rename src/doc/unstable-book/src/{ => language-features}/dropck-parametricity.md (100%) rename src/doc/unstable-book/src/{ => language-features}/exclusive-range-pattern.md (100%) rename src/doc/unstable-book/src/{ => language-features}/fundamental.md (100%) rename src/doc/unstable-book/src/{ => language-features}/generic-param-attrs.md (100%) rename src/doc/unstable-book/src/{ => language-features}/global_asm.md (100%) rename src/doc/unstable-book/src/{ => language-features}/i128-type.md (100%) rename src/doc/unstable-book/src/{ => language-features}/inclusive-range-syntax.md (100%) rename src/doc/unstable-book/src/{ => language-features}/intrinsics.md (100%) rename src/doc/unstable-book/src/{ => language-features}/lang-items.md (100%) rename src/doc/unstable-book/src/{ => language-features}/link-args.md (100%) rename src/doc/unstable-book/src/{ => language-features}/link-cfg.md (100%) rename src/doc/unstable-book/src/{ => language-features}/link-llvm-intrinsics.md (100%) rename src/doc/unstable-book/src/{ => language-features}/linkage.md (100%) rename src/doc/unstable-book/src/{ => language-features}/log-syntax.md (100%) rename src/doc/unstable-book/src/{ => language-features}/loop-break-value.md (100%) rename src/doc/unstable-book/src/{ => language-features}/macro-reexport.md (100%) rename src/doc/unstable-book/src/{ => language-features}/macro-vis-matcher.md (100%) rename src/doc/unstable-book/src/{ => language-features}/main.md (100%) rename src/doc/unstable-book/src/{ => language-features}/naked-functions.md (100%) rename src/doc/unstable-book/src/{ => language-features}/needs-allocator.md (100%) rename src/doc/unstable-book/src/{ => language-features}/needs-panic-runtime.md (100%) rename src/doc/unstable-book/src/{ => language-features}/never-type.md (100%) rename src/doc/unstable-book/src/{ => language-features}/no-core.md (100%) rename src/doc/unstable-book/src/{ => language-features}/no-debug.md (100%) rename src/doc/unstable-book/src/{ => language-features}/non-ascii-idents.md (100%) rename src/doc/unstable-book/src/{ => language-features}/omit-gdb-pretty-printer-section.md (100%) rename src/doc/unstable-book/src/{ => language-features}/on-unimplemented.md (100%) rename src/doc/unstable-book/src/{ => language-features}/optin-builtin-traits.md (100%) rename src/doc/unstable-book/src/{ => language-features}/overlapping-marker-traits.md (100%) rename src/doc/unstable-book/src/{ => language-features}/panic-runtime.md (100%) rename src/doc/unstable-book/src/{ => language-features}/placement-in-syntax.md (100%) rename src/doc/unstable-book/src/{ => language-features}/platform-intrinsics.md (100%) rename src/doc/unstable-book/src/{ => language-features}/plugin-registrar.md (100%) rename src/doc/unstable-book/src/{ => language-features}/plugin.md (100%) rename src/doc/unstable-book/src/{ => language-features}/prelude-import.md (100%) rename src/doc/unstable-book/src/{ => language-features}/proc-macro.md (100%) rename src/doc/unstable-book/src/{ => language-features}/quote.md (100%) rename src/doc/unstable-book/src/{ => language-features}/relaxed-adts.md (100%) rename src/doc/unstable-book/src/{ => language-features}/repr-simd.md (100%) rename src/doc/unstable-book/src/{ => language-features}/rustc-attrs.md (100%) rename src/doc/unstable-book/src/{ => language-features}/rustc-diagnostic-macros.md (100%) rename src/doc/unstable-book/src/{ => language-features}/rvalue-static-promotion.md (100%) rename src/doc/unstable-book/src/{ => language-features}/sanitizer-runtime.md (100%) rename src/doc/unstable-book/src/{ => language-features}/simd-ffi.md (100%) rename src/doc/unstable-book/src/{ => language-features}/simd.md (100%) rename src/doc/unstable-book/src/{ => language-features}/slice-patterns.md (100%) rename src/doc/unstable-book/src/{ => language-features}/specialization.md (100%) rename src/doc/unstable-book/src/{ => language-features}/staged-api.md (100%) rename src/doc/unstable-book/src/{ => language-features}/start.md (100%) rename src/doc/unstable-book/src/{ => language-features}/static-nobundle.md (100%) rename src/doc/unstable-book/src/{ => language-features}/stmt-expr-attributes.md (100%) rename src/doc/unstable-book/src/{ => language-features}/struct-field-attributes.md (100%) rename src/doc/unstable-book/src/{ => language-features}/structural-match.md (100%) rename src/doc/unstable-book/src/{ => language-features}/target-feature.md (100%) rename src/doc/unstable-book/src/{ => language-features}/thread-local.md (100%) rename src/doc/unstable-book/src/{ => language-features}/trace-macros.md (100%) rename src/doc/unstable-book/src/{ => language-features}/type-ascription.md (100%) rename src/doc/unstable-book/src/{ => language-features}/unboxed-closures.md (100%) rename src/doc/unstable-book/src/{ => language-features}/untagged-unions.md (100%) rename src/doc/unstable-book/src/{ => language-features}/unwind-attributes.md (100%) rename src/doc/unstable-book/src/{ => language-features}/use-extern-macros.md (100%) rename src/doc/unstable-book/src/{ => language-features}/used.md (100%) create mode 100644 src/doc/unstable-book/src/library-features.md rename src/doc/unstable-book/src/{ => library-features}/alloc-jemalloc.md (100%) rename src/doc/unstable-book/src/{ => library-features}/alloc-system.md (100%) rename src/doc/unstable-book/src/{ => library-features}/alloc.md (100%) rename src/doc/unstable-book/src/{ => library-features}/as-c-str.md (100%) rename src/doc/unstable-book/src/{ => library-features}/as-unsafe-cell.md (100%) rename src/doc/unstable-book/src/{ => library-features}/ascii-ctype.md (100%) rename src/doc/unstable-book/src/{ => library-features}/binary-heap-extras.md (100%) rename src/doc/unstable-book/src/{ => library-features}/binary-heap-peek-mut-pop.md (100%) rename src/doc/unstable-book/src/{ => library-features}/borrow-state.md (100%) rename src/doc/unstable-book/src/{ => library-features}/box-heap.md (100%) rename src/doc/unstable-book/src/{ => library-features}/c-void-variant.md (100%) rename src/doc/unstable-book/src/{ => library-features}/char-escape-debug.md (100%) rename src/doc/unstable-book/src/{ => library-features}/coerce-unsized.md (100%) rename src/doc/unstable-book/src/{ => library-features}/collection-placement.md (100%) rename src/doc/unstable-book/src/{ => library-features}/collections-range.md (100%) rename src/doc/unstable-book/src/{ => library-features}/collections.md (100%) rename src/doc/unstable-book/src/{ => library-features}/command-envs.md (100%) rename src/doc/unstable-book/src/{ => library-features}/compiler-builtins-lib.md (100%) rename src/doc/unstable-book/src/{ => library-features}/compiler-fences.md (100%) rename src/doc/unstable-book/src/{ => library-features}/concat-idents-macro.md (100%) rename src/doc/unstable-book/src/{ => library-features}/core-char-ext.md (100%) rename src/doc/unstable-book/src/{ => library-features}/core-float.md (100%) rename src/doc/unstable-book/src/{ => library-features}/core-intrinsics.md (100%) rename src/doc/unstable-book/src/{ => library-features}/core-panic.md (100%) rename src/doc/unstable-book/src/{ => library-features}/core-private-bignum.md (100%) rename src/doc/unstable-book/src/{ => library-features}/core-private-diy-float.md (100%) rename src/doc/unstable-book/src/{ => library-features}/core-slice-ext.md (100%) rename src/doc/unstable-book/src/{ => library-features}/core-str-ext.md (100%) rename src/doc/unstable-book/src/{ => library-features}/dec2flt.md (100%) rename src/doc/unstable-book/src/{ => library-features}/decode-utf8.md (100%) rename src/doc/unstable-book/src/{ => library-features}/derive-clone-copy.md (100%) rename src/doc/unstable-book/src/{ => library-features}/derive-eq.md (100%) rename src/doc/unstable-book/src/{ => library-features}/discriminant-value.md (100%) rename src/doc/unstable-book/src/{ => library-features}/enumset.md (100%) rename src/doc/unstable-book/src/{ => library-features}/error-type-id.md (100%) rename src/doc/unstable-book/src/{ => library-features}/exact-size-is-empty.md (100%) rename src/doc/unstable-book/src/{ => library-features}/fd-read.md (100%) rename src/doc/unstable-book/src/{ => library-features}/fd.md (100%) rename src/doc/unstable-book/src/{ => library-features}/fixed-size-array.md (100%) rename src/doc/unstable-book/src/{ => library-features}/float-bits-conv.md (100%) rename src/doc/unstable-book/src/{ => library-features}/float-extras.md (100%) rename src/doc/unstable-book/src/{ => library-features}/flt2dec.md (100%) rename src/doc/unstable-book/src/{ => library-features}/fmt-flags-align.md (100%) rename src/doc/unstable-book/src/{ => library-features}/fmt-internals.md (100%) rename src/doc/unstable-book/src/{ => library-features}/fn-traits.md (100%) rename src/doc/unstable-book/src/{ => library-features}/fnbox.md (100%) rename src/doc/unstable-book/src/{ => library-features}/from_utf8_error_as_bytes.md (100%) rename src/doc/unstable-book/src/{ => library-features}/fused.md (100%) rename src/doc/unstable-book/src/{ => library-features}/future-atomic-orderings.md (100%) rename src/doc/unstable-book/src/{ => library-features}/get-type-id.md (100%) rename src/doc/unstable-book/src/{ => library-features}/heap-api.md (100%) rename src/doc/unstable-book/src/{ => library-features}/i128.md (100%) rename src/doc/unstable-book/src/{ => library-features}/inclusive-range.md (100%) rename src/doc/unstable-book/src/{ => library-features}/int-error-internals.md (100%) rename src/doc/unstable-book/src/{ => library-features}/integer-atomics.md (100%) rename src/doc/unstable-book/src/{ => library-features}/into-boxed-c-str.md (100%) rename src/doc/unstable-book/src/{ => library-features}/into-boxed-os-str.md (100%) rename src/doc/unstable-book/src/{ => library-features}/into-boxed-path.md (100%) rename src/doc/unstable-book/src/{ => library-features}/io-error-internals.md (100%) rename src/doc/unstable-book/src/{ => library-features}/io.md (100%) rename src/doc/unstable-book/src/{ => library-features}/ip.md (100%) rename src/doc/unstable-book/src/{ => library-features}/is-unique.md (100%) rename src/doc/unstable-book/src/{ => library-features}/iter-rfind.md (100%) rename src/doc/unstable-book/src/{ => library-features}/libstd-io-internals.md (100%) rename src/doc/unstable-book/src/{ => library-features}/libstd-sys-internals.md (100%) rename src/doc/unstable-book/src/{ => library-features}/libstd-thread-internals.md (100%) rename src/doc/unstable-book/src/{ => library-features}/linked-list-extras.md (100%) rename src/doc/unstable-book/src/{ => library-features}/lookup-host.md (100%) rename src/doc/unstable-book/src/{ => library-features}/manually-drop.md (100%) rename src/doc/unstable-book/src/{ => library-features}/map-entry-recover-keys.md (100%) rename src/doc/unstable-book/src/{ => library-features}/mpsc-select.md (100%) rename src/doc/unstable-book/src/{ => library-features}/n16.md (100%) rename src/doc/unstable-book/src/{ => library-features}/never-type-impls.md (100%) rename src/doc/unstable-book/src/{ => library-features}/nonzero.md (100%) rename src/doc/unstable-book/src/{ => library-features}/offset-to.md (100%) rename src/doc/unstable-book/src/{ => library-features}/once-poison.md (100%) rename src/doc/unstable-book/src/{ => library-features}/oom.md (100%) rename src/doc/unstable-book/src/{ => library-features}/option-entry.md (100%) rename src/doc/unstable-book/src/{ => library-features}/osstring-shrink-to-fit.md (100%) rename src/doc/unstable-book/src/{ => library-features}/panic-abort.md (100%) rename src/doc/unstable-book/src/{ => library-features}/panic-unwind.md (100%) rename src/doc/unstable-book/src/{ => library-features}/pattern.md (100%) rename src/doc/unstable-book/src/{ => library-features}/peek.md (100%) rename src/doc/unstable-book/src/{ => library-features}/placement-in.md (100%) rename src/doc/unstable-book/src/{ => library-features}/placement-new-protocol.md (100%) rename src/doc/unstable-book/src/{ => library-features}/print.md (100%) rename src/doc/unstable-book/src/{ => library-features}/proc-macro-internals.md (100%) rename src/doc/unstable-book/src/{ => library-features}/process-try-wait.md (100%) rename src/doc/unstable-book/src/{ => library-features}/question-mark-carrier.md (100%) rename src/doc/unstable-book/src/{ => library-features}/rand.md (100%) rename src/doc/unstable-book/src/{ => library-features}/range-contains.md (100%) rename src/doc/unstable-book/src/{ => library-features}/raw.md (100%) rename src/doc/unstable-book/src/{ => library-features}/rc-would-unwrap.md (100%) rename src/doc/unstable-book/src/{ => library-features}/retain-hash-collection.md (100%) rename src/doc/unstable-book/src/{ => library-features}/reverse-cmp-key.md (100%) rename src/doc/unstable-book/src/{ => library-features}/rt.md (100%) rename src/doc/unstable-book/src/{ => library-features}/rustc-private.md (100%) rename src/doc/unstable-book/src/{ => library-features}/sanitizer-runtime-lib.md (100%) rename src/doc/unstable-book/src/{ => library-features}/set-stdio.md (100%) rename src/doc/unstable-book/src/{ => library-features}/shared.md (100%) rename src/doc/unstable-book/src/{ => library-features}/sip-hash-13.md (100%) rename src/doc/unstable-book/src/{ => library-features}/slice-concat-ext.md (100%) rename src/doc/unstable-book/src/{ => library-features}/slice-get-slice.md (100%) rename src/doc/unstable-book/src/{ => library-features}/slice-rsplit.md (100%) rename src/doc/unstable-book/src/{ => library-features}/sort-internals.md (100%) rename src/doc/unstable-book/src/{ => library-features}/sort-unstable.md (100%) rename src/doc/unstable-book/src/{ => library-features}/step-by.md (100%) rename src/doc/unstable-book/src/{ => library-features}/step-trait.md (100%) rename src/doc/unstable-book/src/{ => library-features}/str-checked-slicing.md (100%) rename src/doc/unstable-book/src/{ => library-features}/str-escape.md (100%) rename src/doc/unstable-book/src/{ => library-features}/str-internals.md (100%) rename src/doc/unstable-book/src/{ => library-features}/str-mut-extras.md (100%) rename src/doc/unstable-book/src/{ => library-features}/test.md (100%) rename src/doc/unstable-book/src/{ => library-features}/thread-id.md (100%) rename src/doc/unstable-book/src/{ => library-features}/thread-local-internals.md (100%) rename src/doc/unstable-book/src/{ => library-features}/thread-local-state.md (100%) rename src/doc/unstable-book/src/{ => library-features}/toowned-clone-into.md (100%) rename src/doc/unstable-book/src/{ => library-features}/trusted-len.md (100%) rename src/doc/unstable-book/src/{ => library-features}/try-from.md (100%) rename src/doc/unstable-book/src/{ => library-features}/unicode.md (100%) rename src/doc/unstable-book/src/{ => library-features}/unique.md (100%) rename src/doc/unstable-book/src/{ => library-features}/unsize.md (100%) rename src/doc/unstable-book/src/{ => library-features}/update-panic-count.md (100%) rename src/doc/unstable-book/src/{ => library-features}/utf8-error-error-len.md (100%) rename src/doc/unstable-book/src/{ => library-features}/vec-remove-item.md (100%) rename src/doc/unstable-book/src/{ => library-features}/windows-c.md (100%) rename src/doc/unstable-book/src/{ => library-features}/windows-handle.md (100%) rename src/doc/unstable-book/src/{ => library-features}/windows-net.md (100%) rename src/doc/unstable-book/src/{ => library-features}/windows-stdio.md (100%) rename src/doc/unstable-book/src/{ => library-features}/zero-one.md (100%) 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/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/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) } } From bf202c880c7028a12a70bf119c359563413988d2 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Mon, 17 Apr 2017 16:55:43 -0400 Subject: [PATCH 11/11] Bump book and reference. --- src/doc/book | 2 +- src/doc/reference | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/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