From e5bbbca33e11d9e22dbbe32c975f908710d4155c Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 6 Jun 2014 09:12:18 -0700 Subject: 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 --- src/libsync/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libsync') diff --git a/src/libsync/lib.rs b/src/libsync/lib.rs index e0cc57a4967..fc4d5fec5f5 100644 --- a/src/libsync/lib.rs +++ b/src/libsync/lib.rs @@ -18,7 +18,8 @@ #![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(phase)] #![deny(deprecated_owned_vector)] -- cgit 1.4.1-3-g733a5