summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-12-03 18:07:08 +0800
committerGitHub <noreply@github.com>2018-12-03 18:07:08 +0800
commit441aaf811057b620a4ce7f3f58114feb7f4b4901 (patch)
tree24689e3668b200a142f89379443e87b277d82f27 /src/libstd
parentbf96a7bbed4000ec00cf1a320ecd32352f927d23 (diff)
parentf4cde5bc4e17198670d49c21aa8ce4c199c5489c (diff)
downloadrust-441aaf811057b620a4ce7f3f58114feb7f4b4901.tar.gz
rust-441aaf811057b620a4ce7f3f58114feb7f4b4901.zip
Rollup merge of #56395 - Centril:stabilize-dbg-macro, r=SimonSapin
Stabilize dbg!(...)

Per FCP in https://github.com/rust-lang/rust/issues/54306 (which is ~1 day from completion).

r? @SimonSapin

The PR is fairly isolated so a rollup should probably work.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/macros.rs12
1 files changed, 2 insertions, 10 deletions
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