diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-23 15:09:05 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-23 15:09:05 -0700 |
| commit | fd13400627108fbf3998545f782ed44422e344bf (patch) | |
| tree | 209af0ca5850ae4c2add0da4b278fa908032be63 /src/libsyntax | |
| parent | c77af69a3793bc0c3c49b05ceffb15dccf5ed4d0 (diff) | |
| parent | 8389253df0431e58bfe0a8e0e3949d58ebe7400f (diff) | |
| download | rust-fd13400627108fbf3998545f782ed44422e344bf.tar.gz rust-fd13400627108fbf3998545f782ed44422e344bf.zip | |
rollup merge of #23538: aturon/conversion
Conflicts: src/librustc_back/rpath.rs
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/codemap.rs | 3 | ||||
| -rw-r--r-- | src/libsyntax/ext/source_util.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/lib.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 70aab26092c..1abe8d0a3c1 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -351,8 +351,7 @@ impl Encodable for FileMap { let max_line_length = if lines.len() == 1 { 0 } else { - lines.as_slice() - .windows(2) + lines.windows(2) .map(|w| w[1] - w[0]) .map(|bp| bp.to_usize()) .max() diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs index c61aec0069d..31d8b207bb9 100644 --- a/src/libsyntax/ext/source_util.rs +++ b/src/libsyntax/ext/source_util.rs @@ -194,7 +194,7 @@ pub fn expand_include_bytes(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) fn res_rel_file(cx: &mut ExtCtxt, sp: codemap::Span, arg: &Path) -> PathBuf { // NB: relative paths are resolved relative to the compilation unit if !arg.is_absolute() { - let mut cu = PathBuf::new(&cx.codemap().span_to_filename(sp)); + let mut cu = PathBuf::from(&cx.codemap().span_to_filename(sp)); cu.pop(); cu.push(arg); cu diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 9f217bba00a..9af7b9ab633 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -39,6 +39,8 @@ #![feature(unicode)] #![feature(path_ext)] #![feature(str_char)] +#![feature(convert)] +#![feature(into_cow)] extern crate arena; extern crate fmt_macros; diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 667af642744..e77786c1347 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -5064,8 +5064,8 @@ impl<'a> Parser<'a> { outer_attrs: &[ast::Attribute], id_sp: Span) -> (ast::Item_, Vec<ast::Attribute> ) { - let mut prefix = PathBuf::new(&self.sess.span_diagnostic.cm - .span_to_filename(self.span)); + let mut prefix = PathBuf::from(&self.sess.span_diagnostic.cm + .span_to_filename(self.span)); prefix.pop(); let mut dir_path = prefix; for part in &self.mod_path_stack { |
