about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-12-03 15:44:43 +0000
committerbors <bors@rust-lang.org>2018-12-03 15:44:43 +0000
commit0c999ed132d67bf2520643e9bd619972cf3888ba (patch)
treee9dfee00ab60ea6aaa3fb48c0867fe4d5db3cf1e /src
parent9cd3bef4cfaaac2a608682d4b0834cda344249e0 (diff)
parentac363d8793a1c6b69822a583e6f7d0b2f9904c86 (diff)
downloadrust-0c999ed132d67bf2520643e9bd619972cf3888ba.tar.gz
rust-0c999ed132d67bf2520643e9bd619972cf3888ba.zip
Auto merge of #56451 - kennytm:rollup, r=kennytm
Rollup of 13 pull requests

Successful merges:

 - #56141 ([std] Osstr len clarity)
 - #56366 (Stabilize self_in_typedefs feature)
 - #56395 (Stabilize dbg!(...))
 - #56401 (Move VecDeque::resize_with out of the impl<T:Clone> block)
 - #56402 (Improve the unstable book example for #[marker] trait)
 - #56412 (Update tracking issue for `extern_crate_self`)
 - #56416 (Remove unneeded body class selector)
 - #56418 (Fix failing tidy (line endings on Windows))
 - #56419 (Remove some uses of try!)
 - #56432 (Update issue number of `shrink_to` methods to point the tracking issue)
 - #56433 (Add description about `crate` for parse_visibility's comment)
 - #56435 (make the C part of compiler-builtins opt-out)
 - #56438 (Remove not used `DotEq` token)

Failed merges:

r? @ghost
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/doc.rs6
-rw-r--r--src/bootstrap/util.rs6
m---------src/doc/edition-guide0
m---------src/doc/rustc-guide0
-rw-r--r--src/doc/unstable-book/src/language-features/marker-trait-attr.md14
-rw-r--r--src/doc/unstable-book/src/language-features/self-in-typedefs.md24
-rw-r--r--src/liballoc/collections/binary_heap.rs2
-rw-r--r--src/liballoc/collections/vec_deque.rs62
-rw-r--r--src/liballoc/string.rs2
-rw-r--r--src/liballoc/vec.rs2
-rw-r--r--src/libcore/macros.rs10
-rw-r--r--src/librustc/ich/impls_syntax.rs1
-rw-r--r--src/librustc_incremental/persist/fs.rs6
-rw-r--r--src/librustc_mir/dataflow/move_paths/builder.rs2
-rw-r--r--src/librustc_resolve/lib.rs20
-rw-r--r--src/librustc_target/spec/mod.rs6
-rw-r--r--src/librustdoc/html/highlight.rs2
-rw-r--r--src/librustdoc/html/static/rustdoc.css4
-rw-r--r--src/libstd/Cargo.toml3
-rw-r--r--src/libstd/collections/hash/map.rs2
-rw-r--r--src/libstd/collections/hash/set.rs2
-rw-r--r--src/libstd/ffi/os_str.rs26
-rw-r--r--src/libstd/fs.rs2
-rw-r--r--src/libstd/macros.rs12
-rw-r--r--src/libstd/sys/windows/stdio.rs4
-rw-r--r--src/libsyntax/ext/quote.rs1
-rw-r--r--src/libsyntax/feature_gate.rs13
-rw-r--r--src/libsyntax/parse/parser.rs13
-rw-r--r--src/libsyntax/parse/token.rs5
-rw-r--r--src/libsyntax/print/pprust.rs3
-rw-r--r--src/libsyntax_ext/format_foreign.rs2
-rw-r--r--src/libsyntax_ext/proc_macro_server.rs1
-rw-r--r--src/rustc/compiler_builtins_shim/Cargo.toml2
-rw-r--r--src/test/run-pass/self/self-in-typedefs.rs3
-rw-r--r--src/test/ui/error-codes/E0411.stderr2
-rw-r--r--src/test/ui/feature-gates/feature-gate-extern_crate_self.stderr2
-rw-r--r--src/test/ui/feature-gates/feature-gate-self_in_typedefs.rs18
-rw-r--r--src/test/ui/feature-gates/feature-gate-self_in_typedefs.stderr11
-rw-r--r--src/test/ui/issues/issue-36638.rs1
-rw-r--r--src/test/ui/issues/issue-36638.stderr13
-rw-r--r--src/test/ui/resolve/issue-24968.stderr2
-rw-r--r--src/test/ui/resolve/resolve-self-in-impl-2.stderr2
-rw-r--r--src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs18
-rw-r--r--src/test/ui/rfc-2361-dbg-macro/dbg-macro-feature-gate.rs5
-rw-r--r--src/test/ui/rfc-2361-dbg-macro/dbg-macro-feature-gate.stderr11
-rw-r--r--src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.nll.stderr2
-rw-r--r--src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.rs2
-rw-r--r--src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr4
-rw-r--r--src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs2
-rw-r--r--src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr2
50 files changed, 138 insertions, 222 deletions
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index 18a2b950e59..201129b92df 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -915,13 +915,13 @@ fn symlink_dir_force(config: &Config, src: &Path, dst: &Path) -> io::Result<()>
     }
     if let Ok(m) = fs::symlink_metadata(dst) {
         if m.file_type().is_dir() {
-            try!(fs::remove_dir_all(dst));
+            fs::remove_dir_all(dst)?;
         } else {
             // handle directory junctions on windows by falling back to
             // `remove_dir`.
-            try!(fs::remove_file(dst).or_else(|_| {
+            fs::remove_file(dst).or_else(|_| {
                 fs::remove_dir(dst)
-            }));
+            })?;
         }
     }
 
diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs
index 8ce8f20add3..be24ae0ce66 100644
--- a/src/bootstrap/util.rs
+++ b/src/bootstrap/util.rs
@@ -203,11 +203,11 @@ pub fn symlink_dir(config: &Config, src: &Path, dest: &Path) -> io::Result<()> {
         // We're using low-level APIs to create the junction, and these are more
         // picky about paths. For example, forward slashes cannot be used as a
         // path separator, so we should try to canonicalize the path first.
-        let target = try!(fs::canonicalize(target));
+        let target = fs::canonicalize(target)?;
 
-        try!(fs::create_dir(junction));
+        fs::create_dir(junction)?;
 
-        let path = try!(to_u16s(junction));
+        let path = to_u16s(junction)?;
 
         unsafe {
             let h = CreateFileW(path.as_ptr(),
diff --git a/src/doc/edition-guide b/src/doc/edition-guide
-Subproject ad895867b675199a7f597ce7045a56875a7e516
+Subproject 850ea159d0fcf44dfbff16148faf9b5162481f8
diff --git a/src/doc/rustc-guide b/src/doc/rustc-guide
-Subproject 3a804956e3c28d7e44e38804207a00013594e1d
+Subproject 344c4e437ba4cfa5c14db643ec4d6b68dcd164c
diff --git a/src/doc/unstable-book/src/language-features/marker-trait-attr.md b/src/doc/unstable-book/src/language-features/marker-trait-attr.md
index 9dd7b6fae9b..dedc7d3015d 100644
--- a/src/doc/unstable-book/src/language-features/marker-trait-attr.md
+++ b/src/doc/unstable-book/src/language-features/marker-trait-attr.md
@@ -17,15 +17,17 @@ when they'd need to do the same thing for every type anyway).
 ```rust
 #![feature(marker_trait_attr)]
 
-use std::fmt::{Debug, Display};
+#[marker] trait CheapToClone: Clone {}
 
-#[marker] trait MyMarker {}
+impl<T: Copy> CheapToClone for T {}
 
-impl<T: Debug> MyMarker for T {}
-impl<T: Display> MyMarker for T {}
+// These could potentally overlap with the blanket implementation above,
+// so are only allowed because CheapToClone is a marker trait.
+impl<T: CheapToClone, U: CheapToClone> CheapToClone for (T, U) {}
+impl<T: CheapToClone> CheapToClone for std::ops::Range<T> {}
 
-fn foo<T: MyMarker>(t: T) -> T {
-    t
+fn cheap_clone<T: CheapToClone>(t: T) -> T {
+    t.clone()
 }
 ```
 
diff --git a/src/doc/unstable-book/src/language-features/self-in-typedefs.md b/src/doc/unstable-book/src/language-features/self-in-typedefs.md
deleted file mode 100644
index 2416e85c17d..00000000000
--- a/src/doc/unstable-book/src/language-features/self-in-typedefs.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# `self_in_typedefs`
-
-The tracking issue for this feature is: [#49303]
-
-[#49303]: https://github.com/rust-lang/rust/issues/49303
-
-------------------------
-
-The `self_in_typedefs` feature gate lets you use the special `Self` identifier
-in `struct`, `enum`, and `union` type definitions.
-
-A simple example is:
-
-```rust
-#![feature(self_in_typedefs)]
-
-enum List<T>
-where
-    Self: PartialOrd<Self> // can write `Self` instead of `List<T>`
-{
-    Nil,
-    Cons(T, Box<Self>) // likewise here
-}
-```
diff --git a/src/liballoc/collections/binary_heap.rs b/src/liballoc/collections/binary_heap.rs
index fcadcb544c4..8c36962a299 100644
--- a/src/liballoc/collections/binary_heap.rs
+++ b/src/liballoc/collections/binary_heap.rs
@@ -529,7 +529,7 @@ impl<T: Ord> BinaryHeap<T> {
     /// assert!(heap.capacity() >= 10);
     /// ```
     #[inline]
-    #[unstable(feature = "shrink_to", reason = "new API", issue="0")]
+    #[unstable(feature = "shrink_to", reason = "new API", issue="56431")]
     pub fn shrink_to(&mut self, min_capacity: usize) {
         self.data.shrink_to(min_capacity)
     }
diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs
index cbf104a8fcd..c8ee40f3d27 100644
--- a/src/liballoc/collections/vec_deque.rs
+++ b/src/liballoc/collections/vec_deque.rs
@@ -19,7 +19,7 @@
 
 use core::cmp::Ordering;
 use core::fmt;
-use core::iter::{repeat, repeat_with, FromIterator, FusedIterator};
+use core::iter::{repeat_with, FromIterator, FusedIterator};
 use core::mem;
 use core::ops::Bound::{Excluded, Included, Unbounded};
 use core::ops::{Index, IndexMut, RangeBounds};
@@ -701,7 +701,7 @@ impl<T> VecDeque<T> {
     /// buf.shrink_to(0);
     /// assert!(buf.capacity() >= 4);
     /// ```
-    #[unstable(feature = "shrink_to", reason = "new API", issue="0")]
+    #[unstable(feature = "shrink_to", reason = "new API", issue="56431")]
     pub fn shrink_to(&mut self, min_capacity: usize) {
         assert!(self.capacity() >= min_capacity, "Tried to shrink to a larger capacity");
 
@@ -1886,16 +1886,16 @@ impl<T> VecDeque<T> {
             debug_assert!(!self.is_full());
         }
     }
-}
 
-impl<T: Clone> VecDeque<T> {
-    /// Modifies the `VecDeque` in-place so that `len()` is equal to new_len,
-    /// either by removing excess elements from the back or by appending clones of `value`
-    /// to the back.
+    /// Modifies the `VecDeque` in-place so that `len()` is equal to `new_len`,
+    /// either by removing excess elements from the back or by appending
+    /// elements generated by calling `generator` to the back.
     ///
     /// # Examples
     ///
     /// ```
+    /// #![feature(vec_resize_with)]
+    ///
     /// use std::collections::VecDeque;
     ///
     /// let mut buf = VecDeque::new();
@@ -1904,32 +1904,36 @@ impl<T: Clone> VecDeque<T> {
     /// buf.push_back(15);
     /// assert_eq!(buf, [5, 10, 15]);
     ///
-    /// buf.resize(2, 0);
+    /// buf.resize_with(5, Default::default);
+    /// assert_eq!(buf, [5, 10, 15, 0, 0]);
+    ///
+    /// buf.resize_with(2, || unreachable!());
     /// assert_eq!(buf, [5, 10]);
     ///
-    /// buf.resize(5, 20);
-    /// assert_eq!(buf, [5, 10, 20, 20, 20]);
+    /// let mut state = 100;
+    /// buf.resize_with(5, || { state += 1; state });
+    /// assert_eq!(buf, [5, 10, 101, 102, 103]);
     /// ```
-    #[stable(feature = "deque_extras", since = "1.16.0")]
-    pub fn resize(&mut self, new_len: usize, value: T) {
+    #[unstable(feature = "vec_resize_with", issue = "41758")]
+    pub fn resize_with(&mut self, new_len: usize, generator: impl FnMut()->T) {
         let len = self.len();
 
         if new_len > len {
-            self.extend(repeat(value).take(new_len - len))
+            self.extend(repeat_with(generator).take(new_len - len))
         } else {
             self.truncate(new_len);
         }
     }
+}
 
-    /// Modifies the `VecDeque` in-place so that `len()` is equal to `new_len`,
-    /// either by removing excess elements from the back or by appending
-    /// elements generated by calling `generator` to the back.
+impl<T: Clone> VecDeque<T> {
+    /// Modifies the `VecDeque` in-place so that `len()` is equal to new_len,
+    /// either by removing excess elements from the back or by appending clones of `value`
+    /// to the back.
     ///
     /// # Examples
     ///
     /// ```
-    /// #![feature(vec_resize_with)]
-    ///
     /// use std::collections::VecDeque;
     ///
     /// let mut buf = VecDeque::new();
@@ -1938,25 +1942,15 @@ impl<T: Clone> VecDeque<T> {
     /// buf.push_back(15);
     /// assert_eq!(buf, [5, 10, 15]);
     ///
-    /// buf.resize_with(5, Default::default);
-    /// assert_eq!(buf, [5, 10, 15, 0, 0]);
-    ///
-    /// buf.resize_with(2, || unreachable!());
+    /// buf.resize(2, 0);
     /// assert_eq!(buf, [5, 10]);
     ///
-    /// let mut state = 100;
-    /// buf.resize_with(5, || { state += 1; state });
-    /// assert_eq!(buf, [5, 10, 101, 102, 103]);
+    /// buf.resize(5, 20);
+    /// assert_eq!(buf, [5, 10, 20, 20, 20]);
     /// ```
-    #[unstable(feature = "vec_resize_with", issue = "41758")]
-    pub fn resize_with(&mut self, new_len: usize, generator: impl FnMut()->T) {
-        let len = self.len();
-
-        if new_len > len {
-            self.extend(repeat_with(generator).take(new_len - len))
-        } else {
-            self.truncate(new_len);
-        }
+    #[stable(feature = "deque_extras", since = "1.16.0")]
+    pub fn resize(&mut self, new_len: usize, value: T) {
+        self.resize_with(new_len, || value.clone());
     }
 }
 
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs
index 0b25d911a29..662f8ae614f 100644
--- a/src/liballoc/string.rs
+++ b/src/liballoc/string.rs
@@ -1050,7 +1050,7 @@ impl String {
     /// assert!(s.capacity() >= 3);
     /// ```
     #[inline]
-    #[unstable(feature = "shrink_to", reason = "new API", issue="0")]
+    #[unstable(feature = "shrink_to", reason = "new API", issue="56431")]
     pub fn shrink_to(&mut self, min_capacity: usize) {
         self.vec.shrink_to(min_capacity)
     }
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs
index f7a0bbdceaf..ca7c766e413 100644
--- a/src/liballoc/vec.rs
+++ b/src/liballoc/vec.rs
@@ -613,7 +613,7 @@ impl<T> Vec<T> {
     /// vec.shrink_to(0);
     /// assert!(vec.capacity() >= 3);
     /// ```
-    #[unstable(feature = "shrink_to", reason = "new API", issue="0")]
+    #[unstable(feature = "shrink_to", reason = "new API", issue="56431")]
     pub fn shrink_to(&mut self, min_capacity: usize) {
         self.buf.shrink_to_fit(cmp::max(self.len, min_capacity));
     }
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index c008b78e450..8b1855800c2 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -278,14 +278,14 @@ macro_rules! debug_assert_ne {
 ///
 /// // The previous method of quick returning Errors
 /// fn write_to_file_using_try() -> Result<(), MyError> {
-///     let mut file = try!(File::create("my_best_friends.txt"));
-///     try!(file.write_all(b"This is a list of my best friends."));
+///     let mut file = r#try!(File::create("my_best_friends.txt"));
+///     r#try!(file.write_all(b"This is a list of my best friends."));
 ///     Ok(())
 /// }
 ///
 /// // This is equivalent to:
 /// fn write_to_file_using_match() -> Result<(), MyError> {
-///     let mut file = try!(File::create("my_best_friends.txt"));
+///     let mut file = r#try!(File::create("my_best_friends.txt"));
 ///     match file.write_all(b"This is a list of my best friends.") {
 ///         Ok(v) => v,
 ///         Err(e) => return Err(From::from(e)),
@@ -296,14 +296,14 @@ macro_rules! debug_assert_ne {
 #[macro_export]
 #[stable(feature = "rust1", since = "1.0.0")]
 #[doc(alias = "?")]
-macro_rules! try {
+macro_rules! r#try {
     ($expr:expr) => (match $expr {
         $crate::result::Result::Ok(val) => val,
         $crate::result::Result::Err(err) => {
             return $crate::result::Result::Err($crate::convert::From::from(err))
         }
     });
-    ($expr:expr,) => (try!($expr));
+    ($expr:expr,) => (r#try!($expr));
 }
 
 /// Write formatted data into a buffer.
diff --git a/src/librustc/ich/impls_syntax.rs b/src/librustc/ich/impls_syntax.rs
index 4be467c01aa..b629fb820b3 100644
--- a/src/librustc/ich/impls_syntax.rs
+++ b/src/librustc/ich/impls_syntax.rs
@@ -314,7 +314,6 @@ fn hash_token<'a, 'gcx, W: StableHasherResult>(
         token::Token::DotDot |
         token::Token::DotDotDot |
         token::Token::DotDotEq |
-        token::Token::DotEq |
         token::Token::Comma |
         token::Token::Semi |
         token::Token::Colon |
diff --git a/src/librustc_incremental/persist/fs.rs b/src/librustc_incremental/persist/fs.rs
index 2a8a0baf571..75cdefaf49f 100644
--- a/src/librustc_incremental/persist/fs.rs
+++ b/src/librustc_incremental/persist/fs.rs
@@ -659,7 +659,7 @@ pub fn garbage_collect_session_directories(sess: &Session) -> io::Result<()> {
     let mut session_directories = FxHashSet::default();
     let mut lock_files = FxHashSet::default();
 
-    for dir_entry in try!(crate_directory.read_dir()) {
+    for dir_entry in crate_directory.read_dir()? {
         let dir_entry = match dir_entry {
             Ok(dir_entry) => dir_entry,
             _ => {
@@ -887,7 +887,7 @@ fn all_except_most_recent(deletion_candidates: Vec<(SystemTime, PathBuf, Option<
 /// into the '\\?\' format, which supports much longer paths.
 fn safe_remove_dir_all(p: &Path) -> io::Result<()> {
     if p.exists() {
-        let canonicalized = try!(p.canonicalize());
+        let canonicalized = p.canonicalize()?;
         std_fs::remove_dir_all(canonicalized)
     } else {
         Ok(())
@@ -896,7 +896,7 @@ fn safe_remove_dir_all(p: &Path) -> io::Result<()> {
 
 fn safe_remove_file(p: &Path) -> io::Result<()> {
     if p.exists() {
-        let canonicalized = try!(p.canonicalize());
+        let canonicalized = p.canonicalize()?;
         std_fs::remove_file(canonicalized)
     } else {
         Ok(())
diff --git a/src/librustc_mir/dataflow/move_paths/builder.rs b/src/librustc_mir/dataflow/move_paths/builder.rs
index 3796b1cc4b0..7fe27e97d3d 100644
--- a/src/librustc_mir/dataflow/move_paths/builder.rs
+++ b/src/librustc_mir/dataflow/move_paths/builder.rs
@@ -128,7 +128,7 @@ impl<'b, 'a, 'gcx, 'tcx> Gatherer<'b, 'a, 'gcx, 'tcx> {
                                 proj: &PlaceProjection<'tcx>)
                                 -> Result<MovePathIndex, MoveError<'tcx>>
     {
-        let base = try!(self.move_path_for(&proj.base));
+        let base = self.move_path_for(&proj.base)?;
         let mir = self.builder.mir;
         let tcx = self.builder.tcx;
         let place_ty = proj.base.ty(mir, tcx).to_ty(tcx);
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index c1d4643c240..fdac1e3b816 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -2373,13 +2373,9 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> {
         self.with_current_self_item(item, |this| {
             this.with_type_parameter_rib(HasTypeParameters(generics, ItemRibKind), |this| {
                 let item_def_id = this.definitions.local_def_id(item.id);
-                if this.session.features_untracked().self_in_typedefs {
-                    this.with_self_rib(Def::SelfTy(None, Some(item_def_id)), |this| {
-                        visit::walk_item(this, item);
-                    });
-                } else {
+                this.with_self_rib(Def::SelfTy(None, Some(item_def_id)), |this| {
                     visit::walk_item(this, item);
-                }
+                });
             });
         });
     }
@@ -3185,16 +3181,8 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> {
             if is_self_type(path, ns) {
                 __diagnostic_used!(E0411);
                 err.code(DiagnosticId::Error("E0411".into()));
-                let available_in = if this.session.features_untracked().self_in_typedefs {
-                    "impls, traits, and type definitions"
-                } else {
-                    "traits and impls"
-                };
-                err.span_label(span, format!("`Self` is only available in {}", available_in));
-                if this.current_self_item.is_some() && nightly_options::is_nightly_build() {
-                    err.help("add #![feature(self_in_typedefs)] to the crate attributes \
-                              to enable");
-                }
+                err.span_label(span, format!("`Self` is only available in impls, traits, \
+                                              and type definitions"));
                 return (err, Vec::new());
             }
             if is_self_value(path, ns) {
diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs
index 3285ccfd6c1..1c654bf9192 100644
--- a/src/librustc_target/spec/mod.rs
+++ b/src/librustc_target/spec/mod.rs
@@ -995,7 +995,7 @@ impl Target {
 
         key!(is_builtin, bool);
         key!(linker, optional);
-        try!(key!(lld_flavor, LldFlavor));
+        key!(lld_flavor, LldFlavor)?;
         key!(pre_link_args, link_args);
         key!(pre_link_args_crt, link_args);
         key!(pre_link_objects_exe, list);
@@ -1038,7 +1038,7 @@ impl Target {
         key!(no_default_libraries, bool);
         key!(position_independent_executables, bool);
         key!(needs_plt, bool);
-        try!(key!(relro_level, RelroLevel));
+        key!(relro_level, RelroLevel)?;
         key!(archive_format);
         key!(allow_asm, bool);
         key!(custom_unwind_resume, bool);
@@ -1048,7 +1048,7 @@ impl Target {
         key!(max_atomic_width, Option<u64>);
         key!(min_atomic_width, Option<u64>);
         key!(atomic_cas, bool);
-        try!(key!(panic_strategy, PanicStrategy));
+        key!(panic_strategy, PanicStrategy)?;
         key!(crt_static_allows_dylibs, bool);
         key!(crt_static_default, bool);
         key!(crt_static_respected, bool);
diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs
index 6522261fe1e..8fb91cc23f7 100644
--- a/src/librustdoc/html/highlight.rs
+++ b/src/librustdoc/html/highlight.rs
@@ -346,7 +346,7 @@ impl<'a> Classifier<'a> {
             token::Lifetime(..) => Class::Lifetime,
 
             token::Eof | token::Interpolated(..) |
-            token::Tilde | token::At | token::DotEq | token::SingleQuote => Class::None,
+            token::Tilde | token::At| token::SingleQuote => Class::None,
         };
 
         // Anything that didn't return above is the simple case where we the
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index a5b4a86ad8d..c50c968f360 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -282,7 +282,7 @@ nav.sub {
 	padding-left: 0;
 }
 
-body:not(.source) .example-wrap {
+:not(.source) .example-wrap {
 	display: inline-flex;
 	margin-bottom: 10px;
 }
@@ -300,7 +300,7 @@ body:not(.source) .example-wrap {
 	text-align: right;
 }
 
-body:not(.source) .example-wrap > pre.rust {
+:not(.source) .example-wrap > pre.rust {
 	width: 100%;
 }
 
diff --git a/src/libstd/Cargo.toml b/src/libstd/Cargo.toml
index c1446218367..cae2f405318 100644
--- a/src/libstd/Cargo.toml
+++ b/src/libstd/Cargo.toml
@@ -43,9 +43,12 @@ cc = "1.0"
 build_helper = { path = "../build_helper" }
 
 [features]
+default = ["compiler_builtins_c"]
+
 backtrace = []
 panic-unwind = ["panic_unwind"]
 profiler = ["profiler_builtins"]
+compiler_builtins_c = ["compiler_builtins/c"]
 
 # Make panics and failed asserts immediately abort without formatting any message
 panic_immediate_abort = ["core/panic_immediate_abort"]
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 349aa029ba8..536ce2e16a0 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -1018,7 +1018,7 @@ impl<K, V, S> HashMap<K, V, S>
     /// map.shrink_to(0);
     /// assert!(map.capacity() >= 2);
     /// ```
-    #[unstable(feature = "shrink_to", reason = "new API", issue="0")]
+    #[unstable(feature = "shrink_to", reason = "new API", issue="56431")]
     pub fn shrink_to(&mut self, min_capacity: usize) {
         assert!(self.capacity() >= min_capacity, "Tried to shrink to a larger capacity");
 
diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs
index 5ac3e8f9cf7..4bb3ce0cf44 100644
--- a/src/libstd/collections/hash/set.rs
+++ b/src/libstd/collections/hash/set.rs
@@ -315,7 +315,7 @@ impl<T, S> HashSet<T, S>
     /// assert!(set.capacity() >= 2);
     /// ```
     #[inline]
-    #[unstable(feature = "shrink_to", reason = "new API", issue="0")]
+    #[unstable(feature = "shrink_to", reason = "new API", issue="56431")]
     pub fn shrink_to(&mut self, min_capacity: usize) {
         self.map.shrink_to(min_capacity)
     }
diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs
index e9390630445..9c40a31986c 100644
--- a/src/libstd/ffi/os_str.rs
+++ b/src/libstd/ffi/os_str.rs
@@ -42,6 +42,13 @@ use sys_common::{AsInner, IntoInner, FromInner};
 /// in each pair are owned strings; the latter are borrowed
 /// references.
 ///
+/// Note, `OsString` and `OsStr` internally do not necessarily hold strings in
+/// the form native to the platform; While on Unix, strings are stored as a
+/// sequence of 8-bit values, on Windows, where strings are 16-bit value based
+/// as just discussed, strings are also actually stored as a sequence of 8-bit
+/// values, encoded in a less-strict variant of UTF-8. This is useful to
+/// understand when handling capacity and length values.
+///
 /// # Creating an `OsString`
 ///
 /// **From a Rust string**: `OsString` implements
@@ -324,7 +331,7 @@ impl OsString {
     /// assert!(s.capacity() >= 3);
     /// ```
     #[inline]
-    #[unstable(feature = "shrink_to", reason = "new API", issue="0")]
+    #[unstable(feature = "shrink_to", reason = "new API", issue="56431")]
     pub fn shrink_to(&mut self, min_capacity: usize) {
         self.inner.shrink_to(min_capacity)
     }
@@ -583,14 +590,19 @@ impl OsStr {
 
     /// Returns the length of this `OsStr`.
     ///
-    /// Note that this does **not** return the number of bytes in this string
-    /// as, for example, OS strings on Windows are encoded as a list of [`u16`]
-    /// rather than a list of bytes. This number is simply useful for passing to
-    /// other methods like [`OsString::with_capacity`] to avoid reallocations.
+    /// Note that this does **not** return the number of bytes in the string in
+    /// OS string form.
+    ///
+    /// The length returned is that of the underlying storage used by `OsStr`;
+    /// As discussed in the [`OsString`] introduction, [`OsString`] and `OsStr`
+    /// store strings in a form best suited for cheap inter-conversion between
+    /// native-platform and Rust string forms, which may differ significantly
+    /// from both of them, including in storage size and encoding.
     ///
-    /// See `OsStr` introduction for more information about encoding.
+    /// This number is simply useful for passing to other methods, like
+    /// [`OsString::with_capacity`] to avoid reallocations.
     ///
-    /// [`u16`]: ../primitive.u16.html
+    /// [`OsString`]: struct.OsString.html
     /// [`OsString::with_capacity`]: struct.OsString.html#method.with_capacity
     ///
     /// # Examples
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index 92678dd5ced..7d054a347f4 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -2065,7 +2065,7 @@ impl DirBuilder {
             Err(e) => return Err(e),
         }
         match path.parent() {
-            Some(p) => try!(self.create_dir_all(p)),
+            Some(p) => self.create_dir_all(p)?,
             None => return Err(io::Error::new(io::ErrorKind::Other, "failed to create whole tree")),
         }
         match self.inner.mkdir(path) {
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index 0995ab3c373..94827d2a035 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -224,11 +224,9 @@ macro_rules! eprintln {
 /// the value of a given expression. An example:
 ///
 /// ```rust
-/// #![feature(dbg_macro)]
-///
 /// let a = 2;
 /// let b = dbg!(a * 2) + 1;
-/// //      ^-- prints: [src/main.rs:4] a * 2 = 4
+/// //      ^-- prints: [src/main.rs:2] a * 2 = 4
 /// assert_eq!(b, 5);
 /// ```
 ///
@@ -262,8 +260,6 @@ macro_rules! eprintln {
 /// With a method call:
 ///
 /// ```rust
-/// #![feature(dbg_macro)]
-///
 /// fn foo(n: usize) {
 ///     if let Some(_) = dbg!(n.checked_sub(4)) {
 ///         // ...
@@ -282,8 +278,6 @@ macro_rules! eprintln {
 /// Naive factorial implementation:
 ///
 /// ```rust
-/// #![feature(dbg_macro)]
-///
 /// fn factorial(n: u32) -> u32 {
 ///     if dbg!(n <= 1) {
 ///         dbg!(1)
@@ -312,8 +306,6 @@ macro_rules! eprintln {
 /// The `dbg!(..)` macro moves the input:
 ///
 /// ```compile_fail
-/// #![feature(dbg_macro)]
-///
 /// /// A wrapper around `usize` which importantly is not Copyable.
 /// #[derive(Debug)]
 /// struct NoCopy(usize);
@@ -325,7 +317,7 @@ macro_rules! eprintln {
 ///
 /// [stderr]: https://en.wikipedia.org/wiki/Standard_streams#Standard_error_(stderr)
 #[macro_export]
-#[unstable(feature = "dbg_macro", issue = "54306")]
+#[stable(feature = "dbg_macro", since = "1.32.0")]
 macro_rules! dbg {
     ($val:expr) => {
         // Use of `match` here is intentional because it affects the lifetimes
diff --git a/src/libstd/sys/windows/stdio.rs b/src/libstd/sys/windows/stdio.rs
index 81b89da21d3..c3a94698a0f 100644
--- a/src/libstd/sys/windows/stdio.rs
+++ b/src/libstd/sys/windows/stdio.rs
@@ -48,7 +48,7 @@ pub fn get(handle: c::DWORD) -> io::Result<Output> {
 }
 
 fn write(handle: c::DWORD, data: &[u8]) -> io::Result<usize> {
-    let handle = match try!(get(handle)) {
+    let handle = match get(handle)? {
         Output::Console(c) => c,
         Output::Pipe(p) => {
             let handle = Handle::new(p);
@@ -99,7 +99,7 @@ impl Stdin {
     }
 
     pub fn read(&self, buf: &mut [u8]) -> io::Result<usize> {
-        let handle = match try!(get(c::STD_INPUT_HANDLE)) {
+        let handle = match get(c::STD_INPUT_HANDLE)? {
             Output::Console(c) => c,
             Output::Pipe(p) => {
                 let handle = Handle::new(p);
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs
index c6e0adbb5a4..69ed318b049 100644
--- a/src/libsyntax/ext/quote.rs
+++ b/src/libsyntax/ext/quote.rs
@@ -703,7 +703,6 @@ fn expr_mk_token(cx: &ExtCtxt, sp: Span, tok: &token::Token) -> P<ast::Expr> {
         token::At           => "At",
         token::Dot          => "Dot",
         token::DotDot       => "DotDot",
-        token::DotEq        => "DotEq",
         token::DotDotDot    => "DotDotDot",
         token::DotDotEq     => "DotDotEq",
         token::Comma        => "Comma",
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index d0c4d1c7dce..fac7ff2bf34 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -462,9 +462,6 @@ declare_features! (
     // Allows `use x::y;` to resolve through `self::x`, not just `::x`
     (active, uniform_paths, "1.30.0", Some(53130), None),
 
-    // Allows `Self` in type definitions
-    (active, self_in_typedefs, "1.30.0", Some(49303), None),
-
     // Allows unsized rvalues at arguments and parameters
     (active, unsized_locals, "1.30.0", Some(48055), None),
 
@@ -494,7 +491,7 @@ declare_features! (
     (active, lint_reasons, "1.31.0", Some(54503), None),
 
     // `extern crate self as foo;` puts local crate root into extern prelude under name `foo`.
-    (active, extern_crate_self, "1.31.0", Some(54658), None),
+    (active, extern_crate_self, "1.31.0", Some(56409), None),
 );
 
 declare_features! (
@@ -675,21 +672,23 @@ declare_features! (
     (accepted, extern_prelude, "1.30.0", Some(44660), None),
     // Parentheses in patterns
     (accepted, pattern_parentheses, "1.31.0", Some(51087), None),
-    // Allows the definition of `const fn` functions.
+    // Allows the definition of `const fn` functions
     (accepted, min_const_fn, "1.31.0", Some(53555), None),
     // Scoped lints
     (accepted, tool_lints, "1.31.0", Some(44690), None),
     // impl<I:Iterator> Iterator for &mut Iterator
     // impl Debug for Foo<'_>
     (accepted, impl_header_lifetime_elision, "1.31.0", Some(15872), None),
-    // `extern crate foo as bar;` puts `bar` into extern prelude.
+    // `extern crate foo as bar;` puts `bar` into extern prelude
     (accepted, extern_crate_item_prelude, "1.31.0", Some(55599), None),
     // Allows use of the :literal macro fragment specifier (RFC 1576)
     (accepted, macro_literal_matcher, "1.31.0", Some(35625), None),
     // Use `?` as the Kleene "at most one" operator
     (accepted, macro_at_most_once_rep, "1.32.0", Some(48075), None),
-    // Self struct constructor  (RFC 2302)
+    // `Self` struct constructor (RFC 2302)
     (accepted, self_struct_ctor, "1.32.0", Some(51994), None),
+    // `Self` in type definitions (RFC 2300)
+    (accepted, self_in_typedefs, "1.32.0", Some(49303), None),
 );
 
 // If you change this, please modify `src/doc/unstable-book` as well. You must
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 33715f206de..1cd5006f330 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3145,7 +3145,7 @@ impl<'a> Parser<'a> {
                     RangeLimits::Closed
                 };
 
-                let r = try!(self.mk_range(Some(lhs), rhs, limits));
+                let r = self.mk_range(Some(lhs), rhs, limits)?;
                 lhs = self.mk_expr(lhs_span.to(rhs_span), r, ThinVec::new());
                 break
             }
@@ -3353,9 +3353,7 @@ impl<'a> Parser<'a> {
             RangeLimits::Closed
         };
 
-        let r = try!(self.mk_range(None,
-                                   opt_end,
-                                   limits));
+        let r = self.mk_range(None, opt_end, limits)?;
         Ok(self.mk_expr(lo.to(hi), r, attrs))
     }
 
@@ -6282,9 +6280,10 @@ impl<'a> Parser<'a> {
         self.parse_single_struct_field(lo, vis, attrs)
     }
 
-    /// Parse `pub`, `pub(crate)` and `pub(in path)` plus shortcuts `pub(self)` for `pub(in self)`
-    /// and `pub(super)` for `pub(in super)`.  If the following element can't be a tuple (i.e. it's
-    /// a function definition, it's not a tuple struct field) and the contents within the parens
+    /// Parse `pub`, `pub(crate)` and `pub(in path)` plus shortcuts `crate` for `pub(crate)`,
+    /// `pub(self)` for `pub(in self)` and `pub(super)` for `pub(in super)`.
+    /// If the following element can't be a tuple (i.e. it's a function definition,
+    /// it's not a tuple struct field) and the contents within the parens
     /// isn't valid, emit a proper diagnostic.
     pub fn parse_visibility(&mut self, can_take_tuple: bool) -> PResult<'a, Visibility> {
         maybe_whole!(self, NtVis, |x| x);
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 46fc6454d1c..4a5f3e240da 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -163,7 +163,6 @@ pub enum Token {
     DotDot,
     DotDotDot,
     DotDotEq,
-    DotEq, // HACK(durka42) never produced by the parser, only used for libproc_macro
     Comma,
     Semi,
     Colon,
@@ -454,7 +453,6 @@ impl Token {
             Dot => match joint {
                 Dot => DotDot,
                 DotDot => DotDotDot,
-                DotEq => DotDotEq,
                 _ => return None,
             },
             DotDot => match joint {
@@ -477,7 +475,7 @@ impl Token {
                 _ => return None,
             },
 
-            Le | EqEq | Ne | Ge | AndAnd | OrOr | Tilde | BinOpEq(..) | At | DotDotDot | DotEq |
+            Le | EqEq | Ne | Ge | AndAnd | OrOr | Tilde | BinOpEq(..) | At | DotDotDot |
             DotDotEq | Comma | Semi | ModSep | RArrow | LArrow | FatArrow | Pound | Dollar |
             Question | OpenDelim(..) | CloseDelim(..) => return None,
 
@@ -606,7 +604,6 @@ impl Token {
             (&DotDot, &DotDot) |
             (&DotDotDot, &DotDotDot) |
             (&DotDotEq, &DotDotEq) |
-            (&DotEq, &DotEq) |
             (&Comma, &Comma) |
             (&Semi, &Semi) |
             (&Colon, &Colon) |
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 14ad4b5c6f8..a9f08fdd411 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -210,7 +210,6 @@ pub fn token_to_string(tok: &Token) -> String {
         token::DotDot               => "..".to_string(),
         token::DotDotDot            => "...".to_string(),
         token::DotDotEq             => "..=".to_string(),
-        token::DotEq                => ".=".to_string(),
         token::Comma                => ",".to_string(),
         token::Semi                 => ";".to_string(),
         token::Colon                => ":".to_string(),
@@ -1527,7 +1526,7 @@ impl<'a> State<'a> {
 
     pub fn print_defaultness(&mut self, defaultness: ast::Defaultness) -> io::Result<()> {
         if let ast::Defaultness::Default = defaultness {
-            try!(self.word_nbsp("default"));
+            self.word_nbsp("default")?;
         }
         Ok(())
     }
diff --git a/src/libsyntax_ext/format_foreign.rs b/src/libsyntax_ext/format_foreign.rs
index 6eba3c4f2bb..9c854019de6 100644
--- a/src/libsyntax_ext/format_foreign.rs
+++ b/src/libsyntax_ext/format_foreign.rs
@@ -264,7 +264,7 @@ pub mod printf {
             match *self {
                 Num::Num(n) => write!(s, "{}", n),
                 Num::Arg(n) => {
-                    let n = try!(n.checked_sub(1).ok_or(::std::fmt::Error));
+                    let n = n.checked_sub(1).ok_or(::std::fmt::Error)?;
                     write!(s, "{}$", n)
                 },
                 Num::Next => write!(s, "*"),
diff --git a/src/libsyntax_ext/proc_macro_server.rs b/src/libsyntax_ext/proc_macro_server.rs
index 56bd58b28a6..4babc2e612f 100644
--- a/src/libsyntax_ext/proc_macro_server.rs
+++ b/src/libsyntax_ext/proc_macro_server.rs
@@ -213,7 +213,6 @@ impl FromInternal<(TokenStream, &'_ ParseSess, &'_ mut Vec<Self>)>
                 })
             }
 
-            DotEq => op!('.', '='),
             OpenDelim(..) | CloseDelim(..) => unreachable!(),
             Whitespace | Comment | Shebang(..) | Eof => unreachable!(),
         }
diff --git a/src/rustc/compiler_builtins_shim/Cargo.toml b/src/rustc/compiler_builtins_shim/Cargo.toml
index 7d8423ca84e..9804177280f 100644
--- a/src/rustc/compiler_builtins_shim/Cargo.toml
+++ b/src/rustc/compiler_builtins_shim/Cargo.toml
@@ -34,7 +34,7 @@ cc = "1.0.1"
 
 [features]
 c = []
-default = ["c", "rustbuild", "compiler-builtins"]
+default = ["rustbuild", "compiler-builtins"]
 mem = []
 rustbuild = []
 compiler-builtins = []
diff --git a/src/test/run-pass/self/self-in-typedefs.rs b/src/test/run-pass/self/self-in-typedefs.rs
index 92eccb47e18..84a7e18f91a 100644
--- a/src/test/run-pass/self/self-in-typedefs.rs
+++ b/src/test/run-pass/self/self-in-typedefs.rs
@@ -9,12 +9,11 @@
 // except according to those terms.
 
 // run-pass
-#![allow(unions_with_drop_fields)]
 
-#![feature(self_in_typedefs)]
 #![feature(untagged_unions)]
 
 #![allow(dead_code)]
+#![allow(unions_with_drop_fields)]
 
 enum A<'a, T: 'a>
 where
diff --git a/src/test/ui/error-codes/E0411.stderr b/src/test/ui/error-codes/E0411.stderr
index a5f2e3a7b93..4e85f651b55 100644
--- a/src/test/ui/error-codes/E0411.stderr
+++ b/src/test/ui/error-codes/E0411.stderr
@@ -2,7 +2,7 @@ error[E0411]: cannot find type `Self` in this scope
   --> $DIR/E0411.rs:12:6
    |
 LL |     <Self>::foo; //~ ERROR E0411
-   |      ^^^^ `Self` is only available in traits and impls
+   |      ^^^^ `Self` is only available in impls, traits, and type definitions
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/feature-gates/feature-gate-extern_crate_self.stderr b/src/test/ui/feature-gates/feature-gate-extern_crate_self.stderr
index 61cc6847783..530015b2cb7 100644
--- a/src/test/ui/feature-gates/feature-gate-extern_crate_self.stderr
+++ b/src/test/ui/feature-gates/feature-gate-extern_crate_self.stderr
@@ -1,4 +1,4 @@
-error[E0658]: `extern crate self` is unstable (see issue #54658)
+error[E0658]: `extern crate self` is unstable (see issue #56409)
   --> $DIR/feature-gate-extern_crate_self.rs:1:1
    |
 LL | extern crate self as foo; //~ ERROR `extern crate self` is unstable
diff --git a/src/test/ui/feature-gates/feature-gate-self_in_typedefs.rs b/src/test/ui/feature-gates/feature-gate-self_in_typedefs.rs
deleted file mode 100644
index 4b476a0a645..00000000000
--- a/src/test/ui/feature-gates/feature-gate-self_in_typedefs.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-enum StackList<'a, T: 'a> {
-    Nil,
-    Cons(T, &'a Self)
-    //~^ ERROR cannot find type `Self` in this scope
-    //~| `Self` is only available in traits and impls
-}
-
-fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-self_in_typedefs.stderr b/src/test/ui/feature-gates/feature-gate-self_in_typedefs.stderr
deleted file mode 100644
index ab04953f3e5..00000000000
--- a/src/test/ui/feature-gates/feature-gate-self_in_typedefs.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0411]: cannot find type `Self` in this scope
-  --> $DIR/feature-gate-self_in_typedefs.rs:13:17
-   |
-LL |     Cons(T, &'a Self)
-   |                 ^^^^ `Self` is only available in traits and impls
-   |
-   = help: add #![feature(self_in_typedefs)] to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0411`.
diff --git a/src/test/ui/issues/issue-36638.rs b/src/test/ui/issues/issue-36638.rs
index 5e43536ef3f..acb501c29fc 100644
--- a/src/test/ui/issues/issue-36638.rs
+++ b/src/test/ui/issues/issue-36638.rs
@@ -12,6 +12,7 @@
 
 struct Foo<Self>(Self);
 //~^ ERROR expected identifier, found keyword `Self`
+//~^^ ERROR E0392
 
 trait Bar<Self> {}
 //~^ ERROR expected identifier, found keyword `Self`
diff --git a/src/test/ui/issues/issue-36638.stderr b/src/test/ui/issues/issue-36638.stderr
index d111fb469bf..155eb170b09 100644
--- a/src/test/ui/issues/issue-36638.stderr
+++ b/src/test/ui/issues/issue-36638.stderr
@@ -5,10 +5,19 @@ LL | struct Foo<Self>(Self);
    |            ^^^^ expected identifier, found keyword
 
 error: expected identifier, found keyword `Self`
-  --> $DIR/issue-36638.rs:16:11
+  --> $DIR/issue-36638.rs:17:11
    |
 LL | trait Bar<Self> {}
    |           ^^^^ expected identifier, found keyword
 
-error: aborting due to 2 previous errors
+error[E0392]: parameter `Self` is never used
+  --> $DIR/issue-36638.rs:13:12
+   |
+LL | struct Foo<Self>(Self);
+   |            ^^^^ unused type parameter
+   |
+   = help: consider removing `Self` or using a marker such as `std::marker::PhantomData`
+
+error: aborting due to 3 previous errors
 
+For more information about this error, try `rustc --explain E0392`.
diff --git a/src/test/ui/resolve/issue-24968.stderr b/src/test/ui/resolve/issue-24968.stderr
index 9a1d5ea170e..cfb20340504 100644
--- a/src/test/ui/resolve/issue-24968.stderr
+++ b/src/test/ui/resolve/issue-24968.stderr
@@ -2,7 +2,7 @@ error[E0411]: cannot find type `Self` in this scope
   --> $DIR/issue-24968.rs:11:11
    |
 LL | fn foo(_: Self) {
-   |           ^^^^ `Self` is only available in traits and impls
+   |           ^^^^ `Self` is only available in impls, traits, and type definitions
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/resolve/resolve-self-in-impl-2.stderr b/src/test/ui/resolve/resolve-self-in-impl-2.stderr
index 183b9b66327..b3a8261bcfc 100644
--- a/src/test/ui/resolve/resolve-self-in-impl-2.stderr
+++ b/src/test/ui/resolve/resolve-self-in-impl-2.stderr
@@ -2,7 +2,7 @@ error[E0411]: expected trait, found self type `Self`
   --> $DIR/resolve-self-in-impl-2.rs:14:6
    |
 LL | impl Self for S {} //~ ERROR expected trait, found self type `Self`
-   |      ^^^^ `Self` is only available in traits and impls
+   |      ^^^^ `Self` is only available in impls, traits, and type definitions
 
 error[E0405]: cannot find trait `N` in `Self`
   --> $DIR/resolve-self-in-impl-2.rs:15:12
diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs
index f7216c57e42..3d24f49ad75 100644
--- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs
+++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs
@@ -5,8 +5,6 @@
 // Tests ensuring that `dbg!(expr)` has the expected run-time behavior.
 // as well as some compile time properties we expect.
 
-#![feature(dbg_macro)]
-
 #[derive(Copy, Clone, Debug)]
 struct Unit;
 
@@ -57,31 +55,31 @@ fn test() {
 
 fn validate_stderr(stderr: Vec<String>) {
     assert_eq!(stderr, &[
-        ":23] Unit = Unit",
+        ":21] Unit = Unit",
 
-        ":24] a = Unit",
+        ":22] a = Unit",
 
-        ":30] Point{x: 42, y: 24,} = Point {",
+        ":28] Point{x: 42, y: 24,} = Point {",
         "    x: 42,",
         "    y: 24",
         "}",
 
-        ":31] b = Point {",
+        ":29] b = Point {",
         "    x: 42,",
         "    y: 24",
         "}",
 
-        ":40] &a = NoCopy(",
+        ":38] &a = NoCopy(",
         "    1337",
         ")",
 
-        ":40] dbg!(& a) = NoCopy(",
+        ":38] dbg!(& a) = NoCopy(",
         "    1337",
         ")",
-        ":45] f(&42) = 42",
+        ":43] f(&42) = 42",
 
         "before",
-        ":50] { foo += 1; eprintln!(\"before\"); 7331 } = 7331",
+        ":48] { foo += 1; eprintln!(\"before\"); 7331 } = 7331",
     ]);
 }
 
diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-feature-gate.rs b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-feature-gate.rs
deleted file mode 100644
index b237c6f147b..00000000000
--- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-feature-gate.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-// Feature gate test for `dbg!(..)`.
-
-fn main() {
-    dbg!(1);
-}
diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-feature-gate.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-feature-gate.stderr
deleted file mode 100644
index 64df1e196d2..00000000000
--- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-feature-gate.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0658]: macro dbg! is unstable (see issue #54306)
-  --> $DIR/dbg-macro-feature-gate.rs:4:5
-   |
-LL |     dbg!(1);
-   |     ^^^^^^^^
-   |
-   = help: add #![feature(dbg_macro)] to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.nll.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.nll.stderr
index bf99fef3bbd..218a1d5b5fd 100644
--- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.nll.stderr
+++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.nll.stderr
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `a`
-  --> $DIR/dbg-macro-move-semantics.rs:11:18
+  --> $DIR/dbg-macro-move-semantics.rs:9:18
    |
 LL |     let _ = dbg!(a);
    |             ------- value moved here
diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.rs b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.rs
index bcf508d9af5..06a23ea1767 100644
--- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.rs
+++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.rs
@@ -1,7 +1,5 @@
 // Test ensuring that `dbg!(expr)` will take ownership of the argument.
 
-#![feature(dbg_macro)]
-
 #[derive(Debug)]
 struct NoCopy(usize);
 
diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr
index 10643174385..cfc318c1cd0 100644
--- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr
+++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `a`
-  --> $DIR/dbg-macro-move-semantics.rs:11:18
+  --> $DIR/dbg-macro-move-semantics.rs:9:18
    |
 LL |     let _ = dbg!(a);
    |             ------- value moved here
@@ -10,7 +10,7 @@ LL |     let _ = dbg!(a);
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error[E0382]: use of moved value: `a`
-  --> $DIR/dbg-macro-move-semantics.rs:11:13
+  --> $DIR/dbg-macro-move-semantics.rs:9:13
    |
 LL |     let _ = dbg!(a);
    |             ------- value moved here
diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs
index 8e6f3b226fc..365e62c8086 100644
--- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs
+++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs
@@ -1,7 +1,5 @@
 // Test ensuring that `dbg!(expr)` requires the passed type to implement `Debug`.
 
-#![feature(dbg_macro)]
-
 struct NotDebug;
 
 fn main() {
diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr
index a3b6a1761b9..ecab673953d 100644
--- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr
+++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `NotDebug` doesn't implement `std::fmt::Debug`
-  --> $DIR/dbg-macro-requires-debug.rs:8:23
+  --> $DIR/dbg-macro-requires-debug.rs:6:23
    |
 LL |     let _: NotDebug = dbg!(NotDebug);
    |                       ^^^^^^^^^^^^^^ `NotDebug` cannot be formatted using `{:?}`