From b48833d6db16c7d94f20ee6083dbb880979acfd4 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Mon, 24 Feb 2014 12:29:45 +1100 Subject: Update rustc/syntax docs now that rustdoc lexes all non-`notrust` code blocks. This includes blocks made by indentation, so they need to be changed to explicitly have ```notrust ... ``` fences.. --- src/libsyntax/ext/deriving/generic.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/deriving/generic.rs b/src/libsyntax/ext/deriving/generic.rs index 99ac07ba4d7..ded80295320 100644 --- a/src/libsyntax/ext/deriving/generic.rs +++ b/src/libsyntax/ext/deriving/generic.rs @@ -59,7 +59,7 @@ associated with. It is only not `None` when the associated field has an identifier in the source code. For example, the `x`s in the following snippet -~~~ignore +~~~notrust struct A { x : int } struct B(int); @@ -83,7 +83,7 @@ variants, it is represented as a count of 0. The following simplified `Eq` is used for in-code examples: -~~~ignore +~~~notrust trait Eq { fn eq(&self, other: &Self); } @@ -101,7 +101,7 @@ above `Eq`, `A`, `B` and `C`. When generating the `expr` for the `A` impl, the `SubstructureFields` is -~~~ignore +~~~notrust Struct(~[FieldInfo { span: name: Some(), @@ -112,7 +112,7 @@ Struct(~[FieldInfo { For the `B` impl, called with `B(a)` and `B(b)`, -~~~ignore +~~~notrust Struct(~[FieldInfo { span: , name: None, @@ -126,7 +126,7 @@ Struct(~[FieldInfo { When generating the `expr` for a call with `self == C0(a)` and `other == C0(b)`, the SubstructureFields is -~~~ignore +~~~notrust EnumMatching(0, , ~[FieldInfo { span: @@ -138,7 +138,7 @@ EnumMatching(0, , For `C1 {x}` and `C1 {x}`, -~~~ignore +~~~notrust EnumMatching(1, , ~[FieldInfo { span: @@ -150,7 +150,7 @@ EnumMatching(1, , For `C0(a)` and `C1 {x}` , -~~~ignore +~~~notrust EnumNonMatching(~[(0, , ~[(, None, )]), (1, , @@ -164,7 +164,7 @@ EnumNonMatching(~[(0, , A static method on the above would result in, -~~~~ignore +~~~~notrust StaticStruct(, Named(~[(, )])) StaticStruct(, Unnamed(~[])) @@ -625,7 +625,7 @@ impl<'a> MethodDef<'a> { } /** - ~~~ignore + ~~~ #[deriving(Eq)] struct A { x: int, y: int } @@ -725,7 +725,7 @@ impl<'a> MethodDef<'a> { } /** - ~~~ignore + ~~~ #[deriving(Eq)] enum A { A1 @@ -768,7 +768,7 @@ impl<'a> MethodDef<'a> { /** Creates the nested matches for an enum definition recursively, i.e. - ~~~ignore + ~~~notrust match self { Variant1 => match other { Variant1 => matching, Variant2 => nonmatching, ... }, Variant2 => match other { Variant1 => nonmatching, Variant2 => matching, ... }, @@ -1172,7 +1172,7 @@ pub fn cs_fold(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, ~[self_1.method(__arg_1_1, __arg_2_1), self_2.method(__arg_1_2, __arg_2_2)]) ~~~ -- cgit 1.4.1-3-g733a5