diff options
| author | bors <bors@rust-lang.org> | 2019-02-20 10:14:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-02-20 10:14:28 +0000 |
| commit | f66e4697ae286985ddefc53c3a047614568458bb (patch) | |
| tree | 656e63ba3f96698e771c822a90670f7eb608aa51 /src/test/rustdoc | |
| parent | 74e35d270067afff72034312065c48e6d8cfba67 (diff) | |
| parent | a1a17f5c6663a6a22a58505a6a925b44dfc016e9 (diff) | |
Auto merge of #58578 - kennytm:rollup, r=kennytm
Rollup of 24 pull requests
Successful merges:
- #56470 (Modify doctest's auto-`fn main()` to allow `Result`s)
- #58044 (Make overflowing and wrapping negation const)
- #58303 (Improve stability tags display)
- #58336 (Fix search results interactions)
- #58384 (Fix tables display)
- #58392 (Use less explicit shifting in std::net::ip)
- #58409 (rustdoc: respect alternate flag when formatting impl trait)
- #58456 (Remove no longer accurate diagnostic code about NLL)
- #58528 (Don't use an allocation for ItemId in StmtKind)
- #58530 (Monomorphize less code in fs::{read|write})
- #58534 (Mention capping forbid lints)
- #58536 (Remove UB in pointer tests)
- #58538 (Add missing fmt structs examples)
- #58539 (Add alias methods to PathBuf for underlying OsString (#58234))
- #58544 (Fix doc for rustc "-g" flag)
- #58545 (Add regression test for a specialization-related ICE (#39448))
- #58546 (librustc_codegen_llvm => 2018)
- #58551 (Explain a panic in test case net::tcp::tests::double_bind)
- #58553 (Use more impl header lifetime elision)
- #58562 (Fix style nits)
- #58565 (Fix typo in std::future::Future docs)
- #58568 (Fix a transposition in driver.rs.)
- #58569 (Reduce Some Code Repetitions like `(n << amt) >> amt`)
- #58576 (Stabilize iter::successors and iter::from_fn)
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/process-termination.rs | 24 | ||||
| -rw-r--r-- | src/test/rustdoc/wrapping.rs | 5 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/test/rustdoc/process-termination.rs b/src/test/rustdoc/process-termination.rs new file mode 100644 index 00000000000..32258792b6e --- /dev/null +++ b/src/test/rustdoc/process-termination.rs @@ -0,0 +1,24 @@ +// compile-flags:--test + +/// A check of using various process termination strategies +/// +/// # Examples +/// +/// ```rust +/// assert!(true); // this returns `()`, all is well +/// ``` +/// +/// You can also simply return `Ok(())`, but you'll need to disambiguate the +/// type using turbofish, because we cannot infer the type: +/// +/// ```rust +/// Ok::<(), &'static str>(()) +/// ``` +/// +/// You can err with anything that implements `Debug`: +/// +/// ```rust,should_panic +/// Err("This is returned from `main`, leading to panic")?; +/// Ok::<(), &'static str>(()) +/// ``` +pub fn check_process_termination() {} diff --git a/src/test/rustdoc/wrapping.rs b/src/test/rustdoc/wrapping.rs new file mode 100644 index 00000000000..8d8221bcdf2 --- /dev/null +++ b/src/test/rustdoc/wrapping.rs @@ -0,0 +1,5 @@ +use std::fmt::Debug; + +// @has 'wrapping/fn.foo.html' '//pre[@class="rust fn"]' 'pub fn foo() -> impl Debug' +// @count - '//pre[@class="rust fn"]/br' 0 +pub fn foo() -> impl Debug {} |
