diff options
| author | Robin Schoonover <robin@cornhooves.org> | 2020-09-16 19:41:22 -0600 |
|---|---|---|
| committer | Robin Schoonover <robin@cornhooves.org> | 2020-10-04 15:52:15 -0600 |
| commit | 5ab19676ed25ce52769b06a2fc7319b93d6c64dd (patch) | |
| tree | 06ef1dbeecab8317ae98ee6857c1858165cc1dd2 /compiler/rustc_builtin_macros/src | |
| parent | 4ccf5f731bb71db3470002d6baf5ab4792b821d9 (diff) | |
| download | rust-5ab19676ed25ce52769b06a2fc7319b93d6c64dd.tar.gz rust-5ab19676ed25ce52769b06a2fc7319b93d6c64dd.zip | |
Remove extra indirection in LitKind::ByteStr
Diffstat (limited to 'compiler/rustc_builtin_macros/src')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/source_util.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_builtin_macros/src/source_util.rs b/compiler/rustc_builtin_macros/src/source_util.rs index 70753208af3..f76bbd83819 100644 --- a/compiler/rustc_builtin_macros/src/source_util.rs +++ b/compiler/rustc_builtin_macros/src/source_util.rs @@ -13,8 +13,6 @@ use rustc_span::{self, Pos, Span}; use smallvec::SmallVec; use std::rc::Rc; -use rustc_data_structures::sync::Lrc; - // These macros all relate to the file system; they either return // the column/row/filename of the expression, or they include // a given file into the current one. @@ -216,7 +214,7 @@ pub fn expand_include_bytes( } }; match cx.source_map().load_binary_file(&file) { - Ok(bytes) => base::MacEager::expr(cx.expr_lit(sp, ast::LitKind::ByteStr(Lrc::new(bytes)))), + Ok(bytes) => base::MacEager::expr(cx.expr_lit(sp, ast::LitKind::ByteStr(bytes.into()))), Err(e) => { cx.span_err(sp, &format!("couldn't read {}: {}", file.display(), e)); DummyResult::any(sp) |
