about summary refs log tree commit diff
path: root/src/liballoc/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-07-01 14:45:56 +0000
committerbors <bors@rust-lang.org>2020-07-01 14:45:56 +0000
commitf781babf87dea29c44f93842b7ac9eb809549d29 (patch)
treefcb575eda0c6d0e786d9b42d1b6559b4865f3ff6 /src/liballoc/tests
parent1505c1239554fd8c9a5f7a6f4823c7384a0c29e3 (diff)
parentc9b3e869771e7944719e139a327422726f7529de (diff)
downloadrust-f781babf87dea29c44f93842b7ac9eb809549d29.tar.gz
rust-f781babf87dea29c44f93842b7ac9eb809549d29.zip
Auto merge of #73924 - Manishearth:rollup-8r51ld9, r=Manishearth
Rollup of 17 pull requests

Successful merges:

 - #72071 (Added detailed error code explanation for issue E0687 in Rust compiler.)
 - #72369 (Bring net/parser.rs up to modern up to date with modern rust patterns)
 - #72445 (Stabilize `#[track_caller]`.)
 - #73466 (impl From<char> for String)
 - #73548 (remove rustdoc warnings)
 - #73649 (Fix sentence structure)
 - #73678 (Update Box::from_raw example to generalize better)
 - #73705 (stop taking references in Relate)
 - #73716 (Document the static keyword)
 - #73752 (Remap Windows ERROR_INVALID_PARAMETER to ErrorKind::InvalidInput from Other)
 - #73776 (Move terminator to new module)
 - #73778 (Make `likely` and `unlikely` const, gated by feature `const_unlikely`)
 - #73805 (Document the type keyword)
 - #73806 (Use an 'approximate' universal upper bound when reporting region errors)
 - #73828 (Fix wording for anonymous parameter name help)
 - #73846 (Fix comma in debug_assert! docs)
 - #73847 (Edit cursor.prev() method docs in lexer)

Failed merges:

r? @ghost
Diffstat (limited to 'src/liballoc/tests')
-rw-r--r--src/liballoc/tests/string.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/liballoc/tests/string.rs b/src/liballoc/tests/string.rs
index 9ea020d2d19..d38655af78c 100644
--- a/src/liballoc/tests/string.rs
+++ b/src/liballoc/tests/string.rs
@@ -714,3 +714,10 @@ fn test_try_reserve_exact() {
         }
     }
 }
+
+#[test]
+fn test_from_char() {
+    assert_eq!(String::from('a'), 'a'.to_string());
+    let s: String = 'x'.into();
+    assert_eq!(s, 'x'.to_string());
+}