about summary refs log tree commit diff
path: root/src/libproc_macro
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-08-16 17:53:29 +0000
committerbors <bors@rust-lang.org>2018-08-16 17:53:29 +0000
commitb2028828db7e4870cb6a310f8ad8169ac9ea134d (patch)
treebc4f6c4442f67a7b62f9afe54c0b1368a3ca210f /src/libproc_macro
parentb5590423e6ceb048dd7d792382e960d66b7615d2 (diff)
parenta68e61a9f207fd2be27584bbea184822e22d8cfe (diff)
downloadrust-b2028828db7e4870cb6a310f8ad8169ac9ea134d.tar.gz
rust-b2028828db7e4870cb6a310f8ad8169ac9ea134d.zip
Auto merge of #53433 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

Successful merges:

 - #52946 (Documented impl From on line 367 of libserialize/json.rs)
 - #53234 (Remove Travis shutdown debug scripts, and remove CI-specific DNS settings)
 - #53313 (Two small improvements)
 - #53360 (Addressed #51602)
 - #53364 (Warn if the user tries to use GATs)
 - #53373 (Tweak unclosed delimiter parser error)
 - #53377 (std: Use target_pointer_width for BACKTRACE_ELF_SIZE)
 - #53395 (Use #[non_exhaustive] on internal enums)
 - #53399 (Tidy: ignore non-Markdown files when linting for the Unstable Book)
 - #53412 (syntax_ext: remove leftover span_err_if_not_stage0 macro.)
Diffstat (limited to 'src/libproc_macro')
-rw-r--r--src/libproc_macro/diagnostic.rs3
-rw-r--r--src/libproc_macro/lib.rs1
-rw-r--r--src/libproc_macro/rustc.rs1
3 files changed, 2 insertions, 3 deletions
diff --git a/src/libproc_macro/diagnostic.rs b/src/libproc_macro/diagnostic.rs
index 51e7647f36c..af779016418 100644
--- a/src/libproc_macro/diagnostic.rs
+++ b/src/libproc_macro/diagnostic.rs
@@ -16,6 +16,7 @@ use syntax_pos::MultiSpan;
 /// An enum representing a diagnostic level.
 #[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
 #[derive(Copy, Clone, Debug)]
+#[non_exhaustive]
 pub enum Level {
     /// An error.
     Error,
@@ -25,8 +26,6 @@ pub enum Level {
     Note,
     /// A help message.
     Help,
-    #[doc(hidden)]
-    __Nonexhaustive,
 }
 
 /// A structure representing a diagnostic message and associated children
diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs
index 66afe36e7cb..b54054752ea 100644
--- a/src/libproc_macro/lib.rs
+++ b/src/libproc_macro/lib.rs
@@ -36,6 +36,7 @@
 #![feature(staged_api)]
 #![feature(lang_items)]
 #![feature(optin_builtin_traits)]
+#![feature(non_exhaustive)]
 
 #![recursion_limit="256"]
 
diff --git a/src/libproc_macro/rustc.rs b/src/libproc_macro/rustc.rs
index a54c695f637..21229d3299d 100644
--- a/src/libproc_macro/rustc.rs
+++ b/src/libproc_macro/rustc.rs
@@ -278,7 +278,6 @@ impl Level {
             Level::Warning => errors::Level::Warning,
             Level::Note => errors::Level::Note,
             Level::Help => errors::Level::Help,
-            Level::__Nonexhaustive => unreachable!("Level::__Nonexhaustive"),
         }
     }
 }