rustdoc: Convert fn return type to retdoc record

This commit is contained in:
Brian Anderson
2012-01-16 14:02:46 -08:00
parent 63dcc64275
commit e77b8db707
3 changed files with 14 additions and 6 deletions

View File

@@ -112,7 +112,10 @@ fn parse_fn_(
name: name,
brief: _brief,
desc: desc,
return: return,
return: some({
desc: return,
ty: none,
}),
args: argdocs }
}
@@ -176,7 +179,7 @@ mod tests {
let source = "#[doc(return = \"return value\")]";
let attrs = parse_attributes(source);
let doc = parse_fn("f", 0, attrs);
assert doc.return == some("return value");
assert option::get(doc.return).desc == some("return value");
}
#[test]