about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-12-28 21:36:59 -0800
committerbors <bors@rust-lang.org>2013-12-28 21:36:59 -0800
commitafe8f6e106cddab165fb09596f7b13ab04a71f71 (patch)
tree00f8d937c8578ab7ddf136a3bc6a41a22108feca /src
parent38a5edbfe6f61d202299b998cb225e4222881b2e (diff)
parent7b382e58b1b2cbacf8d70fa4bb759db5050a2e8a (diff)
downloadrust-afe8f6e106cddab165fb09596f7b13ab04a71f71.tar.gz
rust-afe8f6e106cddab165fb09596f7b13ab04a71f71.zip
auto merge of #11177 : cmr/rust/native_and_green_docs, r=alexcrichton
Some people have requested this, and I think it's quite useful to have
documentation for the compiler libraries. libnative and libgreen are
self-explanatory I think.
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/clean.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/librustdoc/clean.rs b/src/librustdoc/clean.rs
index 7d80cea23c1..bd5103d767c 100644
--- a/src/librustdoc/clean.rs
+++ b/src/librustdoc/clean.rs
@@ -1123,6 +1123,8 @@ fn lit_to_str(lit: &ast::lit) -> ~str {
 
 fn name_from_pat(p: &ast::Pat) -> ~str {
     use syntax::ast::*;
+    debug!("Trying to get a name from pattern: {:?}", p);
+
     match p.node {
         PatWild => ~"_",
         PatWildMulti => ~"..",
@@ -1134,9 +1136,12 @@ fn name_from_pat(p: &ast::Pat) -> ~str {
         PatBox(p) => name_from_pat(p),
         PatUniq(p) => name_from_pat(p),
         PatRegion(p) => name_from_pat(p),
-        PatLit(..) => fail!("tried to get argument name from pat_lit, \
-                            which is not allowed in function arguments"),
-        PatRange(..) => fail!("tried to get argument name from pat_range, \
+        PatLit(..) => {
+            warn!("tried to get argument name from PatLit, \
+                  which is silly in function arguments");
+            ~"()"
+        },
+        PatRange(..) => fail!("tried to get argument name from PatRange, \
                               which is not allowed in function arguments"),
         PatVec(..) => fail!("tried to get argument name from pat_vec, \
                              which is not allowed in function arguments")