diff options
| author | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2014-02-07 21:18:17 +1100 |
|---|---|---|
| committer | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2014-02-08 04:43:39 +1100 |
| commit | 7e1cfc8893ecd220c517661a18eb0c94b9e342e3 (patch) | |
| tree | 0a21d0d3eb44e53f5a4a4256dbc4e3a3ee6f6765 /src/libstd/macros.rs | |
| parent | 14cb4be6e90d0c5eb42a3eef58d083acc8e51837 (diff) | |
| download | rust-7e1cfc8893ecd220c517661a18eb0c94b9e342e3.tar.gz rust-7e1cfc8893ecd220c517661a18eb0c94b9e342e3.zip | |
Add unimplemented! macro
Diffstat (limited to 'src/libstd/macros.rs')
| -rw-r--r-- | src/libstd/macros.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index cd81d6037e6..e67ac24fcd5 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -123,6 +123,13 @@ macro_rules! unreachable (() => ( fail!("internal error: entered unreachable code"); )) +/// A standardised placeholder for marking unfinished code. It fails with the +/// message `"not yet implemented"` when executed. +#[macro_export] +macro_rules! unimplemented( + () => (fail!("not yet implemented")) +) + #[macro_export] macro_rules! format(($($arg:tt)*) => ( format_args!(::std::fmt::format, $($arg)*) |
