Skip to content

Commit

Permalink
Auto merge of #49357 - frewsxcv:frewsxcv-termination-doc-examples, r=…
Browse files Browse the repository at this point in the history
…GuillaumeGomez

Remove hidden `foo` functions from doc examples; use `Termination` trait.

Fixes #49233.

Easier to review with the white-space ignoring `?w=1` feature: https://github.com/rust-lang/rust/pull/49357/files?w=1
  • Loading branch information
bors committed Mar 28, 2018
2 parents 1169541 + e9dcec0 commit e5277c1
Show file tree
Hide file tree
Showing 13 changed files with 1,130 additions and 1,127 deletions.
14 changes: 7 additions & 7 deletions src/libstd/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,17 +552,17 @@ pub fn home_dir() -> Option<PathBuf> {
///
/// [msdn]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa364992(v=vs.85).aspx
///
/// ```
/// ```no_run
/// use std::env;
/// use std::fs::File;
///
/// # fn foo() -> std::io::Result<()> {
/// let mut dir = env::temp_dir();
/// dir.push("foo.txt");
/// fn main() -> std::io::Result<()> {
/// let mut dir = env::temp_dir();
/// dir.push("foo.txt");
///
/// let f = File::create(dir)?;
/// # Ok(())
/// # }
/// let f = File::create(dir)?;
/// Ok(())
/// }
/// ```
#[stable(feature = "env", since = "1.0.0")]
pub fn temp_dir() -> PathBuf {
Expand Down
Loading

0 comments on commit e5277c1

Please sign in to comment.