diff options
Diffstat (limited to 'src/libsyntax/tokenstream.rs')
| -rw-r--r-- | src/libsyntax/tokenstream.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/tokenstream.rs b/src/libsyntax/tokenstream.rs index e2b5c4e1adf..455cc4391dd 100644 --- a/src/libsyntax/tokenstream.rs +++ b/src/libsyntax/tokenstream.rs @@ -31,6 +31,7 @@ use print::pprust; use serialize::{Decoder, Decodable, Encoder, Encodable}; use util::RcSlice; +use std::borrow::Cow; use std::{fmt, iter, mem}; use std::hash::{self, Hash}; @@ -106,7 +107,7 @@ impl TokenTree { -> macro_parser::NamedParseResult { // `None` is because we're not interpolating let directory = Directory { - path: cx.current_expansion.module.directory.clone(), + path: Cow::from(cx.current_expansion.module.directory.as_path()), ownership: cx.current_expansion.directory_ownership, }; macro_parser::parse(cx.parse_sess(), tts, mtch, Some(directory), true) |
