diff options
| author | Kevin Ballard <kevin@sb.org> | 2013-10-07 19:16:58 -0700 |
|---|---|---|
| committer | Kevin Ballard <kevin@sb.org> | 2013-10-16 10:26:48 -0700 |
| commit | bab7eb20dff32294c65fa28cece552481c40cf0b (patch) | |
| tree | fc81daee54a1f01c62c792ccbfba362e61d52d76 /src/libsyntax | |
| parent | c01a97b7a981fb5ae008be7e06df4bf6a85eba4f (diff) | |
| download | rust-bab7eb20dff32294c65fa28cece552481c40cf0b.tar.gz rust-bab7eb20dff32294c65fa28cece552481c40cf0b.zip | |
path2: Update based on more review feedback
Standardize the is_sep() functions to be the same in both posix and windows, and re-export from path. Update extra::glob to use this. Remove the usage of either, as it's going away. Move the WindowsPath-specific methods out of WindowsPath and make them top-level functions of path::windows instead. This way you cannot accidentally write code that will fail to compile on non-windows architectures without typing ::windows anywhere. Remove GenericPath::from_c_str() and just impl BytesContainer for CString instead. Remove .join_path() and .push_path() and just implement BytesContainer for Path instead. Remove FilenameDisplay and add a boolean flag to Display instead. Remove .each_parent(). It only had one caller, so just inline its definition there.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/source_util.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs index c7ac3e1da9e..1c13beb790d 100644 --- a/src/libsyntax/ext/source_util.rs +++ b/src/libsyntax/ext/source_util.rs @@ -147,7 +147,7 @@ fn res_rel_file(cx: @ExtCtxt, sp: codemap::Span, arg: &Path) -> Path { if !arg.is_absolute() { let mut cu = Path::new(cx.codemap().span_to_filename(sp)); cu.pop(); - cu.push_path(arg); + cu.push(arg); cu } else { arg.clone() diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 3e1a008f6ca..c776e5bfd38 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3996,7 +3996,7 @@ impl Parser { prefix.pop(); let mod_path_stack = &*self.mod_path_stack; let mod_path = Path::new(".").join_many(*mod_path_stack); - let dir_path = prefix.join_path(&mod_path); + let dir_path = prefix.join(&mod_path); let file_path = match ::attr::first_attr_value_str_by_name( outer_attrs, "path") { Some(d) => dir_path.join(d), |
