diff options
| author | Kevin Butler <haqkrs@gmail.com> | 2015-11-03 16:34:11 +0000 |
|---|---|---|
| committer | Kevin Butler <haqkrs@gmail.com> | 2015-11-12 05:16:57 +0000 |
| commit | d64e551248d73ca9657952e983d3d178d85d3608 (patch) | |
| tree | 11dcbfcc63cac5274f3cd92bdbe7af1d19b863f9 /src/libsyntax/ext | |
| parent | a17f81b4b796123aa4e204145cca870fa270cf81 (diff) | |
| download | rust-d64e551248d73ca9657952e983d3d178d85d3608.tar.gz rust-d64e551248d73ca9657952e983d3d178d85d3608.zip | |
libsyntax: deny warnings in doctests
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/deriving/generic/mod.rs | 9 | ||||
| -rw-r--r-- | src/libsyntax/ext/format.rs | 7 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/libsyntax/ext/deriving/generic/mod.rs b/src/libsyntax/ext/deriving/generic/mod.rs index 5c6e2fce8ad..5a0fc4fda0c 100644 --- a/src/libsyntax/ext/deriving/generic/mod.rs +++ b/src/libsyntax/ext/deriving/generic/mod.rs @@ -54,6 +54,7 @@ //! following snippet //! //! ```rust +//! # #![allow(dead_code)] //! struct A { x : i32 } //! //! struct B(i32); @@ -88,7 +89,7 @@ //! //! ```rust //! trait PartialEq { -//! fn eq(&self, other: &Self); +//! fn eq(&self, other: &Self) -> bool; //! } //! impl PartialEq for i32 { //! fn eq(&self, other: &i32) -> bool { @@ -905,7 +906,7 @@ impl<'a> MethodDef<'a> { }) } - /// ``` + /// ```ignore /// #[derive(PartialEq)] /// struct A { x: i32, y: i32 } /// @@ -1010,7 +1011,7 @@ impl<'a> MethodDef<'a> { &StaticStruct(struct_def, summary)) } - /// ``` + /// ```ignore /// #[derive(PartialEq)] /// enum A { /// A1, @@ -1596,7 +1597,7 @@ pub fn cs_fold<F>(use_foldl: bool, /// Call the method that is being derived on all the fields, and then /// process the collected results. i.e. /// -/// ``` +/// ```ignore /// f(cx, span, vec![self_1.method(__arg_1_1, __arg_2_1), /// self_2.method(__arg_1_2, __arg_2_2)]) /// ``` diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs index c56342371c8..af0e7ce5c8d 100644 --- a/src/libsyntax/ext/format.rs +++ b/src/libsyntax/ext/format.rs @@ -77,9 +77,10 @@ struct Context<'a, 'b:'a> { /// expressions. /// /// If parsing succeeds, the return value is: -/// -/// Some((fmtstr, unnamed arguments, ordering of named arguments, -/// named arguments)) +/// ```ignore +/// Some((fmtstr, unnamed arguments, ordering of named arguments, +/// named arguments)) +/// ``` fn parse_args(ecx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) -> Option<(P<ast::Expr>, Vec<P<ast::Expr>>, Vec<String>, HashMap<String, P<ast::Expr>>)> { |
