Skip to content
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

Fix std::path::Path::file_name() doc #34659

Merged
merged 1 commit into from
Jul 8, 2016

Conversation

GuillaumeGomez
Copy link
Member

@@ -1542,6 +1541,11 @@ impl Path {
/// let os_str = OsStr::new("foo.txt");
///
/// assert_eq!(Some(os_str), path.file_name());
///
/// // Other examples:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we put these in a separate doc block rather than extending this one?

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Jul 5, 2016

📌 Commit 6109ef5 has been approved by steveklabnik

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jul 5, 2016
…eveklabnik

Fix `std::path::Path::file_name()` doc

Fixes rust-lang#34632

r? @steveklabnik
@steveklabnik
Copy link
Member

@bors: r-


---- path::Path::file_name_1 stdout ----
    <anon>:4:21: 4:31 error: failed to resolve. Use of undeclared type or module `OsStr` [E0433]
<anon>:4     assert_eq!(Some(OsStr::new("foo.txt")), Path::new("foo.txt/.").file_name());
                             ^~~~~~~~~~
<anon>:4:5: 4:81 note: in this expansion of assert_eq! (defined in <std macros>)
<anon>:4:45: 4:54 error: failed to resolve. Use of undeclared type or module `Path` [E0433]
<anon>:4     assert_eq!(Some(OsStr::new("foo.txt")), Path::new("foo.txt/.").file_name());
                                                     ^~~~~~~~~
<anon>:4:5: 4:81 note: in this expansion of assert_eq! (defined in <std macros>)
<anon>:5:17: 5:27 error: failed to resolve. Use of undeclared type or module `OsStr` [E0433]
<anon>:5 assert_eq!(Some(OsStr::new("foo.txt")), Path::new("foo.txt/.//").file_name());
                         ^~~~~~~~~~
<anon>:5:1: 5:79 note: in this expansion of assert_eq! (defined in <std macros>)
<anon>:5:41: 5:50 error: failed to resolve. Use of undeclared type or module `Path` [E0433]
<anon>:5 assert_eq!(Some(OsStr::new("foo.txt")), Path::new("foo.txt/.//").file_name());
                                                 ^~~~~~~~~
<anon>:5:1: 5:79 note: in this expansion of assert_eq! (defined in <std macros>)
<anon>:6:18: 6:27 error: failed to resolve. Use of undeclared type or module `Path` [E0433]
<anon>:6 assert_eq!(None, Path::new("foo.txt/..").file_name());
                          ^~~~~~~~~
<anon>:6:1: 6:55 note: in this expansion of assert_eq! (defined in <std macros>)
error: aborting due to previous error(s)
thread 'path::Path::file_name_1' panicked at 'Box<Any>', src/librustc/session/mod.rs:170
note: Run with `RUST_BACKTRACE=1` for a backtrace.


@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented Jul 5, 2016

@steveklabnik: I have put back the imports.

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Jul 7, 2016

📌 Commit 0d78f6b has been approved by steveklabnik

Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 8, 2016
…eveklabnik

Fix `std::path::Path::file_name()` doc

Fixes rust-lang#34632

r? @steveklabnik
bors added a commit that referenced this pull request Jul 8, 2016
Rollup of 9 pull requests

- Successful merges: #34097, #34456, #34610, #34612, #34659, #34688, #34691, #34699, #34700
- Failed merges:
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 8, 2016
…eveklabnik

Fix `std::path::Path::file_name()` doc

Fixes rust-lang#34632

r? @steveklabnik
bors added a commit that referenced this pull request Jul 8, 2016
Rollup of 9 pull requests

- Successful merges: #34097, #34456, #34610, #34612, #34659, #34688, #34691, #34699, #34700
- Failed merges:
@bors bors merged commit 0d78f6b into rust-lang:master Jul 8, 2016
@GuillaumeGomez GuillaumeGomez deleted the path_file_name branch July 9, 2016 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants