]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/playground.rs
Rollup merge of #48166 - hedgehog1024:hedgehog1024-stabilize-entry_and_modify, r...
[rust.git] / src / test / rustdoc / playground.rs
1 // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // ignore-tidy-linelength
12
13 #![crate_name = "foo"]
14
15 #![doc(html_playground_url = "https://www.example.com/")]
16
17 //! module docs
18 //!
19 //! ```
20 //! println!("Hello, world!");
21 //! ```
22 //!
23 //! ```
24 //! fn main() {
25 //!     println!("Hello, world!");
26 //! }
27 //! ```
28 //!
29 //! ```
30 //! #![feature(something)]
31 //!
32 //! fn main() {
33 //!     println!("Hello, world!");
34 //! }
35 //! ```
36
37 // @matches foo/index.html '//a[@class="test-arrow"][@href="https://www.example.com/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0A%20%20%20%20println!(%22Hello%2C%20world!%22)%3B%0A%7D"]' "Run"
38 // @matches foo/index.html '//a[@class="test-arrow"][@href="https://www.example.com/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Aprintln!(%22Hello%2C%20world!%22)%3B%0A%7D"]' "Run"
39 // @matches foo/index.html '//a[@class="test-arrow"][@href="https://www.example.com/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(something)%5D%0A%0Afn%20main()%20%7B%0A%20%20%20%20println!(%22Hello%2C%20world!%22)%3B%0A%7D&version=nightly"]' "Run"