From ea055bac535ad590cb27d581e4df7b62e405c2d0 Mon Sep 17 00:00:00 2001 From: Konrad Borowski Date: Mon, 13 Jan 2020 09:36:10 +0100 Subject: [PATCH] Add ICE for rust-lang/rust#59191 --- ices/59191.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ices/59191.sh diff --git a/ices/59191.sh b/ices/59191.sh new file mode 100644 index 00000000..aee4da7f --- /dev/null +++ b/ices/59191.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +tmp="$(mktemp -d)" + +if [[ ! $tmp || ! -d $tmp ]] +then + echo "Could not create temporary directory" + exit 1 +fi + +cleanup() { + rm -r "$tmp" +} + +trap cleanup EXIT + +cd "$tmp" + +rustc --crate-type proc-macro - < TokenStream { + let mut ts = TokenStream::new(); + ts.extend(vec![ + TokenTree::Ident(Ident::new("fn", Span::call_site())), + TokenTree::Ident(Ident::new("main", Span::call_site())), + TokenTree::Group(Group::new(Delimiter::Parenthesis, TokenStream::new())), + TokenTree::Group(Group::new(Delimiter::Brace, input)), + ]); + ts +} +END + +rustc --extern no_main=librust_out.so - <