about summary refs log tree commit diff
path: root/src/libserialize
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-06-06 09:12:18 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-06 20:00:16 -0700
commite5bbbca33e11d9e22dbbe32c975f908710d4155c (patch)
tree5095bb40b83e840f373b22f9fe62b0228d3a3453 /src/libserialize
parentcc63d4c61bb83fcbcef5ccfffcd9b26b1bf2d20a (diff)
downloadrust-e5bbbca33e11d9e22dbbe32c975f908710d4155c.tar.gz
rust-e5bbbca33e11d9e22dbbe32c975f908710d4155c.zip
rustdoc: Submit examples to play.rust-lang.org
This grows a new option inside of rustdoc to add the ability to submit examples
to an external website. If the `--markdown-playground-url` command line option
or crate doc attribute `html_playground_url` is present, then examples will have
a button on hover to submit the code to the playground specified.

This commit enables submission of example code to play.rust-lang.org. The code
submitted is that which is tested by rustdoc, not necessarily the exact code
shown in the example.

Closes #14654
Diffstat (limited to 'src/libserialize')
-rw-r--r--src/libserialize/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs
index 904c7da4da2..08348c96333 100644
--- a/src/libserialize/lib.rs
+++ b/src/libserialize/lib.rs
@@ -20,7 +20,8 @@ Core encoding and decoding interfaces.
 #![license = "MIT/ASL2"]
 #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "http://www.rust-lang.org/favicon.ico",
-       html_root_url = "http://doc.rust-lang.org/")]
+       html_root_url = "http://doc.rust-lang.org/",
+       html_playground_url = "http://play.rust-lang.org/")]
 #![feature(macro_rules, managed_boxes, default_type_params, phase)]
 
 // test harness access