diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index 9dfa09cf8a512..a9a30ed80add0 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -450,7 +450,7 @@ macro_rules! writeln { /// The unsafe counterpart of this macro is the [`unreachable_unchecked`] function, which /// will cause undefined behavior if the code is reached. /// -/// [`panic!`]: ../std/macro.panic.html +/// [`panic!`]: ../std/macro.panic.html /// [`unreachable_unchecked`]: ../std/hint/fn.unreachable_unchecked.html /// [`std::hint`]: ../std/hint/index.html /// @@ -459,6 +459,7 @@ macro_rules! writeln { /// This will always [`panic!`] /// /// [`panic!`]: ../std/macro.panic.html +/// /// # Examples /// /// Match arms: @@ -510,6 +511,9 @@ macro_rules! unreachable { /// code type-check, or if you're implementing a trait that requires multiple /// methods, and you're only planning on using one of them. /// +/// There is no difference between `unimplemented!` and `todo!` apart from the +/// name. +/// /// # Panics /// /// This will always [panic!](macro.panic.html) @@ -564,8 +568,10 @@ macro_rules! unimplemented { /// Indicates unfinished code. /// /// This can be useful if you are prototyping and are just looking to have your -/// code typecheck. `todo!` works exactly like `unimplemented!`. The only -/// difference between the two macros is the name. +/// code typecheck. +/// +/// There is no difference between `unimplemented!` and `todo!` apart from the +/// name. /// /// # Panics /// @@ -587,8 +593,6 @@ macro_rules! unimplemented { /// `baz()`, so we can use `todo!`: /// /// ``` -/// #![feature(todo_macro)] -/// /// # trait Foo { /// # fn bar(&self); /// # fn baz(&self); @@ -614,7 +618,7 @@ macro_rules! unimplemented { /// } /// ``` #[macro_export] -#[unstable(feature = "todo_macro", issue = "59277")] +#[stable(feature = "todo_macro", since = "1.39.0")] macro_rules! todo { () => (panic!("not yet implemented")); ($($arg:tt)+) => (panic!("not yet implemented: {}", format_args!($($arg)*))); diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index e044b46e0d076..84c2968b71d71 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -298,7 +298,6 @@ #![feature(stmt_expr_attributes)] #![feature(str_internals)] #![feature(thread_local)] -#![feature(todo_macro)] #![feature(toowned_clone_into)] #![feature(try_reserve)] #![feature(unboxed_closures)]