Skip to content

Commit

Permalink
Remove hidden foo functions from doc examples; use Termination tr…
Browse files Browse the repository at this point in the history
…ait.

Fixes #49233.
  • Loading branch information
frewsxcv committed Mar 28, 2018
1 parent c19264f commit e9dcec0
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 e9dcec0

Please sign in to comment.