Skip to content

Commit 3559324

Browse files
committed
libfourcc: Fix errors arising from the automated ~[T] conversion
1 parent 0c6622a commit 3559324

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/libfourcc/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ struct Ident {
131131
}
132132

133133
fn parse_tts(cx: &ExtCtxt, tts: &[ast::TokenTree]) -> (@ast::Expr, Option<Ident>) {
134-
let p = &mut parse::new_parser_from_tts(cx.parse_sess(), cx.cfg(), tts.to_owned());
134+
let p = &mut parse::new_parser_from_tts(cx.parse_sess(),
135+
cx.cfg(),
136+
tts.iter()
137+
.map(|x| (*x).clone())
138+
.collect());
135139
let ex = p.parse_expr();
136140
let id = if p.token == token::EOF {
137141
None
@@ -151,7 +155,7 @@ fn parse_tts(cx: &ExtCtxt, tts: &[ast::TokenTree]) -> (@ast::Expr, Option<Ident>
151155
fn target_endian_little(cx: &ExtCtxt, sp: Span) -> bool {
152156
let meta = cx.meta_name_value(sp, InternedString::new("target_endian"),
153157
ast::LitStr(InternedString::new("little"), ast::CookedStr));
154-
contains(cx.cfg(), meta)
158+
contains(cx.cfg().as_slice(), meta)
155159
}
156160

157161
// FIXME (10872): This is required to prevent an LLVM assert on Windows

0 commit comments

Comments
 (0)