Skip to content

Rollup of 13 pull requests #44460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 27 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
adfebed
Explicitly run perl for OpenSSL Configure
smaeul Aug 28, 2017
51a478c
rustc: Separately feature gate repr(i128)
alexcrichton Sep 2, 2017
7e0b79d
Use rvalue promotion to 'static instead of static items.
eddyb Sep 4, 2017
cf318c3
bootstrap: use shasum(1) on NetBSD build hosts
jakllsch Aug 31, 2017
ab89870
bootstrap: use tar -z on extract
jakllsch Aug 31, 2017
258ec30
Expect pipe symbol after closure parameter lists
tirr-c Sep 5, 2017
0573949
Fixup some nits from #44238
nrc Sep 5, 2017
502e707
Reduce false positives number in rustdoc html diff
GuillaumeGomez Sep 5, 2017
5b76b86
Use memalign instead of posix_memalign for Solaris
bgermann Sep 6, 2017
f633284
std: Fix a segfault on OSX with backtraces
alexcrichton Sep 7, 2017
fc44447
Update the libcompiler_builins submodule
est31 Sep 7, 2017
ddb072b
std::thread::LocalKey: Document limitation with initializers
joshlf Sep 7, 2017
3e8fadc
Add doc example to String::as_str
tommyip Sep 9, 2017
967c4e6
Fix bitrotted generator panic emission
Zoxc Sep 9, 2017
d1d9331
Rollup merge of #44131 - smaeul:openssl-perl, r=Mark-Simulacrum
frewsxcv Sep 9, 2017
8ba533e
Rollup merge of #44262 - alexcrichton:repr-128-gate, r=nikomatsakis
frewsxcv Sep 9, 2017
beccf91
Rollup merge of #44312 - eddyb:static-by-any-other-name, r=alexcrichton
frewsxcv Sep 9, 2017
cef0eaf
Rollup merge of #44320 - jakllsch:jakllsch-caf2c3d2-c939-4c4d-8c68-1a…
frewsxcv Sep 9, 2017
66becdc
Rollup merge of #44329 - nrc:pulldown-warn-fix, r=ollie27
frewsxcv Sep 9, 2017
93c3ff6
Rollup merge of #44332 - tirr-c:issue-44021, r=petrochenkov
frewsxcv Sep 9, 2017
b7c542f
Rollup merge of #44347 - GuillaumeGomez:rustdoc-false-positive, r=Qui…
frewsxcv Sep 9, 2017
e68038f
Rollup merge of #44372 - bgermann:master, r=alexcrichton
frewsxcv Sep 9, 2017
6c1e1ef
Rollup merge of #44384 - alexcrichton:osx-segfault, r=estebank
frewsxcv Sep 9, 2017
e7e279e
Rollup merge of #44387 - est31:update_compiler_builtins, r=Mark-Simul…
frewsxcv Sep 9, 2017
6482acd
Rollup merge of #44396 - joshlf:tls-comment, r=alexcrichton
frewsxcv Sep 9, 2017
8a6c9b5
Rollup merge of #44449 - tommyip:doc_string_as_str, r=frewsxcv
frewsxcv Sep 9, 2017
e3d0be2
Rollup merge of #44451 - Zoxc:gen-panic, r=eddyb
frewsxcv Sep 9, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add doc example to String::as_str
Fixes #44428.
  • Loading branch information
tommyip committed Sep 9, 2017
commit 3e8fadc2ac5d5e25aaf0449d50988c54be92dbe4
10 changes: 10 additions & 0 deletions src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,16 @@ impl String {
}

/// Extracts a string slice containing the entire string.
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let s = String::from("foo");
///
/// assert_eq!("foo", s.as_str());
/// ```
#[inline]
#[stable(feature = "string_as_str", since = "1.7.0")]
pub fn as_str(&self) -> &str {
Expand Down