about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-09-27 00:43:37 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2017-10-07 17:23:06 +0200
commitfe24e815a2d0aecfd975a15a12a4b4937bb4cc37 (patch)
treeb14e534477fb66a951439ad35c434aa11025fc3f /src/test/rustdoc
parent3493c62ff2628ef81f6f3a968c951252e9b57824 (diff)
downloadrust-fe24e815a2d0aecfd975a15a12a4b4937bb4cc37.tar.gz
rust-fe24e815a2d0aecfd975a15a12a4b4937bb4cc37.zip
Fix invalid rustdoc rendering for FnTy args
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/fn-pointer-arg-name.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/rustdoc/fn-pointer-arg-name.rs b/src/test/rustdoc/fn-pointer-arg-name.rs
new file mode 100644
index 00000000000..af87f1b4669
--- /dev/null
+++ b/src/test/rustdoc/fn-pointer-arg-name.rs
@@ -0,0 +1,15 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name = "foo"]
+
+// @has foo/fn.f.html
+// @has - '//*[@class="rust fn"]' 'pub fn f(callback: fn(len: usize, foo: u32))'
+pub fn f(callback: fn(len: usize, foo: u32)) {}