]> git.lizzy.rs Git - rust.git/commitdiff
deny intra-doc link resolution failures in libstd
authorAndy Russell <arussell123@gmail.com>
Tue, 18 Dec 2018 02:10:24 +0000 (21:10 -0500)
committerAndy Russell <arussell123@gmail.com>
Tue, 18 Dec 2018 02:10:24 +0000 (21:10 -0500)
src/liballoc/lib.rs
src/liballoc/rc.rs
src/liballoc/sync.rs
src/libcore/lib.rs
src/libcore/mem.rs
src/libcore/slice/mod.rs
src/libstd/io/buffered.rs
src/libstd/io/error.rs
src/libstd/lib.rs

index abacc62c8562b0e594477a96904b292cfd7518a6..31a4aeeab4be8705c15a461d87c4f733d7841ed4 100644 (file)
@@ -72,6 +72,8 @@
        test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
 #![no_std]
 #![needs_allocator]
+
+#![deny(intra_doc_link_resolution_failure)]
 #![deny(missing_debug_implementations)]
 
 #![cfg_attr(not(test), feature(fn_traits))]
index 52ad30c411a10c0aac16a379a6a2a45642ad4852..37204bc20c2722316f33469f37e6f7ff5e1c6661 100644 (file)
@@ -840,6 +840,8 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Rc<T> {
     /// drop(foo);    // Doesn't print anything
     /// drop(foo2);   // Prints "dropped!"
     /// ```
+    ///
+    /// [`Weak`]: ../../std/rc/struct.Weak.html
     fn drop(&mut self) {
         unsafe {
             self.dec_strong();
@@ -1381,9 +1383,10 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 #[stable(feature = "downgraded_weak", since = "1.10.0")]
 impl<T> Default for Weak<T> {
     /// Constructs a new `Weak<T>`, allocating memory for `T` without initializing
-    /// it. Calling [`upgrade`][Weak::upgrade] on the return value always gives [`None`].
+    /// it. Calling [`upgrade`] on the return value always gives [`None`].
     ///
     /// [`None`]: ../../std/option/enum.Option.html
+    /// [`upgrade`]: ../../std/rc/struct.Weak.html#method.upgrade
     ///
     /// # Examples
     ///
index 111459d12a4df1dd9495d696c611f3e5eaa0d23c..5f72b232c64ced591257d4694e26f1a502429cda 100644 (file)
@@ -952,6 +952,8 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Arc<T> {
     /// drop(foo);    // Doesn't print anything
     /// drop(foo2);   // Prints "dropped!"
     /// ```
+    ///
+    /// [`Weak`]: ../../std/sync/struct.Weak.html
     #[inline]
     fn drop(&mut self) {
         // Because `fetch_sub` is already atomic, we do not need to synchronize
@@ -1219,10 +1221,11 @@ fn clone(&self) -> Weak<T> {
 #[stable(feature = "downgraded_weak", since = "1.10.0")]
 impl<T> Default for Weak<T> {
     /// Constructs a new `Weak<T>`, without allocating memory.
-    /// Calling [`upgrade`][Weak::upgrade] on the return value always
+    /// Calling [`upgrade`] on the return value always
     /// gives [`None`].
     ///
     /// [`None`]: ../../std/option/enum.Option.html#variant.None
+    /// [`upgrade`]: ../../std/sync/struct.Weak.html#method.upgrade
     ///
     /// # Examples
     ///
index a51674fbfc71a8cb9754451764267ed6caa166c7..258f499d4448179d059472c8afb9ffa91c29c8c8 100644 (file)
@@ -71,6 +71,7 @@
 
 #![no_core]
 #![deny(missing_docs)]
+#![deny(intra_doc_link_resolution_failure)]
 #![deny(missing_debug_implementations)]
 
 #![feature(allow_internal_unstable)]
index afd9fcb1fba84d9638d27c0b86312bb2efb109d7..0cde23cde40f1c8483dd9951ff53ea0bd1a8fd2b 100644 (file)
@@ -984,6 +984,9 @@ pub const fn into_inner(slot: ManuallyDrop<T>) -> T {
     ///
     /// This function semantically moves out the contained value without preventing further usage.
     /// It is up to the user of this method to ensure that this container is not used again.
+    ///
+    /// [`ManuallyDrop::drop`]: #method.drop
+    /// [`ManuallyDrop::into_inner`]: #method.into_inner
     #[must_use = "if you don't need the value, you can use `ManuallyDrop::drop` instead"]
     #[unstable(feature = "manually_drop_take", issue = "55422")]
     #[inline]
index 59c11b273293f484dd5496bf25fc75a46147ff0e..193061457b5cd8617dab130ca60576f6849a67c4 100644 (file)
@@ -877,6 +877,7 @@ pub fn rchunks_mut(&mut self, chunk_size: usize) -> RChunksMut<T> {
     /// assert_eq!(iter.remainder(), &['l']);
     /// ```
     ///
+    /// [`chunks`]: #method.chunks
     /// [`rchunks`]: #method.rchunks
     /// [`chunks_exact`]: #method.chunks_exact
     #[stable(feature = "rchunks", since = "1.31.0")]
@@ -921,6 +922,7 @@ pub fn rchunks_exact(&self, chunk_size: usize) -> RChunksExact<T> {
     /// assert_eq!(v, &[0, 2, 2, 1, 1]);
     /// ```
     ///
+    /// [`chunks_mut`]: #method.chunks_mut
     /// [`rchunks_mut`]: #method.rchunks_mut
     /// [`chunks_exact_mut`]: #method.chunks_exact_mut
     #[stable(feature = "rchunks", since = "1.31.0")]
index 7ede050da6c45fc57ec0ca0e478b8d489b61f011..7aaf89cd0ff71dc502b8f8010a5581a6a3ed65af 100644 (file)
@@ -294,7 +294,7 @@ impl<R: Seek> Seek for BufReader<R> {
     /// `.into_inner()` immediately after a seek yields the underlying reader
     /// at the same position.
     ///
-    /// To seek without discarding the internal buffer, use [`Seek::seek_relative`].
+    /// To seek without discarding the internal buffer, use [`BufReader::seek_relative`].
     ///
     /// See [`std::io::Seek`] for more details.
     ///
@@ -303,6 +303,9 @@ impl<R: Seek> Seek for BufReader<R> {
     /// seeks will be performed instead of one. If the second seek returns
     /// `Err`, the underlying reader will be left at the same position it would
     /// have if you called `seek` with `SeekFrom::Current(0)`.
+    ///
+    /// [`BufReader::seek_relative`]: struct.BufReader.html#method.seek_relative
+    /// [`std::io::Seek`]: trait.Seek.html
     fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
         let result: u64;
         if let SeekFrom::Current(n) = pos {
index d3844ebe19e4bbe8e2e78432bf6940fb9a34293c..324852355b0d66847f125684e64ab5e13559de5e 100644 (file)
@@ -225,6 +225,9 @@ impl From<ErrorKind> for Error {
     /// let error = Error::from(not_found);
     /// assert_eq!("entity not found", format!("{}", error));
     /// ```
+    ///
+    /// [`ErrorKind`]: ../../std/io/enum.ErrorKind.html
+    /// [`Error`]: ../../std/io/struct.Error.html
     #[inline]
     fn from(kind: ErrorKind) -> Error {
         Error {
index ead38f2112687144b85198b463c86a451779cb55..13de55a6a542f3788515886a4424a75ac6cc7d70 100644 (file)
 #![no_std]
 
 #![deny(missing_docs)]
+#![deny(intra_doc_link_resolution_failure)]
 #![deny(missing_debug_implementations)]
 
 // Tell the compiler to link to either panic_abort or panic_unwind