We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using a macro argument (e.g. $x) inside of quote_expr! causes an internal compiler error.
#![feature(quote)] fn main() { macro_rules! foo { ($bar:expr) => {{ quote_expr!(cx, { $bar }) }} } foo!(0); }
rustc --version --verbose:
rustc --version --verbose
rustc 1.5.0-nightly (32a8567 2015-10-05) binary: rustc commit-hash: 32a8567 commit-date: 2015-10-05 host: x86_64-unknown-linux-gnu release: 1.5.0-nightly
Backtrace:
1: 0x7f99dd582940 - sys::backtrace::tracing::imp::write::he27ef2eb40e30753Plt 2: 0x7f99dd589215 - panicking::log_panic::::closure.39293 3: 0x7f99dd588c85 - panicking::log_panic::h20a17353a34447751lx 4: 0x7f99dd54d783 - sys_common::unwind::begin_unwind_inner::hf876a8bedc1a7d89gds 5: 0x7f99d72f3e3f - sys_common::unwind::begin_unwind::begin_unwind::h8566091144643397121 6: 0x7f99d75e3346 - ext::quote::expr_mk_token::h739fb902b08199ffVPe 7: 0x7f99d75e55eb - ext::quote::statements_mk_tt::hc13e258339eab598x3e 8: 0x7f99d75e88e0 - iter::::next::next::h11015572762128041720 9: 0x7f99d75e8148 - vec::::from_iter::from_iter::h13593900259474011105 10: 0x7f99d75e47e0 - ext::quote::statements_mk_tt::hc13e258339eab598x3e 11: 0x7f99d75df3bf - ext::quote::statements_mk_tts::ha204cd8774c6b5cbPff 12: 0x7f99d75dcf39 - ext::quote::expand_tts::h9307c2288d757f70Kgf 13: 0x7f99d75de3dc - ext::quote::expand_parse_call::h5e17b10e57da8b04rjf 14: 0x7f99d74d4d9d - ext::quote::expand_quote_expr::h46e9f6ebc9a4485azFe 15: 0x7f99d74d82f8 - ext::base::::expand::h16087092572269147898 16: 0x7f99d753a46b - ext::expand::expand_expr::::closure.68518 17: 0x7f99d7536ebf - ext::expand::expand_expr::h14fbac08b20b87c28mb 18: 0x7f99d757d9be - ext::expand::expand_block_elts::::closure.69190 19: 0x7f99d7546fe3 - ext::expand::expand_block_elts::h8d61523b3ef4a0eaVec 20: 0x7f99d757d578 - ext::expand::expand_block::h65394bbf166baee8gec 21: 0x7f99d75424fa - fold::noop_fold_expr::h7291925385286886789 22: 0x7f99d7537147 - ext::expand::expand_expr::::closure.68518 23: 0x7f99d7536ebf - ext::expand::expand_expr::h14fbac08b20b87c28mb 24: 0x7f99d7577b88 - fold::noop_fold_stmt::h12973173759275708851 25: 0x7f99d755a968 - ext::expand::expand_stmt::hd9da59f648bb2e0513b 26: 0x7f99d755d223 - iter::::next::next::h14693761281653209511 27: 0x7f99d755cc67 - util::small_vector::::from_iter::h2230188101519163904 28: 0x7f99d755bc1c - ext::expand::expand_stmt::hd9da59f648bb2e0513b 29: 0x7f99d757e87e - ext::expand::expand_block_elts::::::closure.69195 30: 0x7f99d757e61d - iter::::next::next::h7445701304088993935 31: 0x7f99d757dcdf - vec::::from_iter::from_iter::h1124164702553681919 32: 0x7f99d757d8dc - ext::expand::expand_block_elts::::closure.69190 33: 0x7f99d7546fe3 - ext::expand::expand_block_elts::h8d61523b3ef4a0eaVec 34: 0x7f99d757d578 - ext::expand::expand_block::h65394bbf166baee8gec 35: 0x7f99d7546981 - ext::expand::expand_and_rename_fn_decl_and_block::h0d444361d4f5f425XCc 36: 0x7f99d754c399 - ext::expand::expand_item_underscore::hc4243a869f3a877bGSb 37: 0x7f99d759d98e - fold::noop_fold_item_simple::h8462865063037887524 38: 0x7f99d759d4f0 - fold::noop_fold_item::h5328529649720349753 39: 0x7f99d754a650 - ext::expand::expand_annotatable::hcdfa58fbdd2db5e45oc 40: 0x7f99d7547178 - ext::expand::expand_item::h33ee80d897456d7c5Rb 41: 0x7f99d7552291 - iter::::next::next::h1430176632510595140 42: 0x7f99d7551e1e - vec::::from_iter::from_iter::h11440913854378754314 43: 0x7f99d7551b33 - fold::noop_fold_mod::h9501230011530116417 44: 0x7f99d754cc79 - ext::expand::expand_item_underscore::hc4243a869f3a877bGSb 45: 0x7f99d759d98e - fold::noop_fold_item_simple::h8462865063037887524 46: 0x7f99d759d4f0 - fold::noop_fold_item::h5328529649720349753 47: 0x7f99d754b709 - ext::expand::expand_annotatable::hcdfa58fbdd2db5e45oc 48: 0x7f99d7547178 - ext::expand::expand_item::h33ee80d897456d7c5Rb 49: 0x7f99d75a6c5f - ext::expand::expand_crate::h9eb355faa0bd8654MNc 50: 0x7f99dda8faec - driver::phase_2_configure_and_expand::::closure.27382 51: 0x7f99dda22b8d - driver::phase_2_configure_and_expand::h8ccfec5c5aca214aAua 52: 0x7f99dda10883 - driver::compile_input::h7f85a10f04a664a63ba 53: 0x7f99ddb6b19b - run_compiler::haabf54047e5bdb33wsc 54: 0x7f99ddb68a26 - boxed::::call_box::call_box::h4754854141470810202 55: 0x7f99ddb68334 - sys_common::unwind::try::try_fn::try_fn::h3587750331620889526 56: 0x7f99dd580668 - __rust_try 57: 0x7f99dd574deb - sys_common::unwind::try::inner_try::hbe46f56ef602f07cO9r 58: 0x7f99ddb684ce - boxed::::call_box::call_box::h8143133644679331252 59: 0x7f99dd587ce3 - sys::thread::::new::thread_start::h13325138c3b56c4cdEw 60: 0x7f99d6bec181 - start_thread 61: 0x7f99dd20547c - __clone 62: 0x0 -
The text was updated successfully, but these errors were encountered:
I tested to build this as part of @steveklabnik list of ICE list.
On my version of Rust (rustc 1.4.0 (8ab8581 2015-10-27)) I don't get the issue so I wonder what the repro steps are?
I grabbed the repro above and switched to bugreport branch and built the code using cargo. So I wonder if there are some more steps here?
Sorry, something went wrong.
Sorry, I failed to mention that you have to build the regex_macros subcrate.
The code still causes an ICE as of rustc 1.5.0-nightly (32a8567 2015-10-05).
OK. I've generated a simple testcase which reproduces this bug.
No branches or pull requests
Using a macro argument (e.g. $x) inside of quote_expr! causes an internal compiler error.
Testcase
Meta
rustc --version --verbose
:rustc 1.5.0-nightly (32a8567 2015-10-05)
binary: rustc
commit-hash: 32a8567
commit-date: 2015-10-05
host: x86_64-unknown-linux-gnu
release: 1.5.0-nightly
Backtrace:
1: 0x7f99dd582940 - sys::backtrace::tracing::imp::write::he27ef2eb40e30753Plt
2: 0x7f99dd589215 - panicking::log_panic::::closure.39293
3: 0x7f99dd588c85 - panicking::log_panic::h20a17353a34447751lx
4: 0x7f99dd54d783 - sys_common::unwind::begin_unwind_inner::hf876a8bedc1a7d89gds
5: 0x7f99d72f3e3f - sys_common::unwind::begin_unwind::begin_unwind::h8566091144643397121
6: 0x7f99d75e3346 - ext::quote::expr_mk_token::h739fb902b08199ffVPe
7: 0x7f99d75e55eb - ext::quote::statements_mk_tt::hc13e258339eab598x3e
8: 0x7f99d75e88e0 - iter::::next::next::h11015572762128041720
9: 0x7f99d75e8148 - vec::::from_iter::from_iter::h13593900259474011105
10: 0x7f99d75e47e0 - ext::quote::statements_mk_tt::hc13e258339eab598x3e
11: 0x7f99d75df3bf - ext::quote::statements_mk_tts::ha204cd8774c6b5cbPff
12: 0x7f99d75dcf39 - ext::quote::expand_tts::h9307c2288d757f70Kgf
13: 0x7f99d75de3dc - ext::quote::expand_parse_call::h5e17b10e57da8b04rjf
14: 0x7f99d74d4d9d - ext::quote::expand_quote_expr::h46e9f6ebc9a4485azFe
15: 0x7f99d74d82f8 - ext::base::::expand::h16087092572269147898
16: 0x7f99d753a46b - ext::expand::expand_expr::::closure.68518
17: 0x7f99d7536ebf - ext::expand::expand_expr::h14fbac08b20b87c28mb
18: 0x7f99d757d9be - ext::expand::expand_block_elts::::closure.69190
19: 0x7f99d7546fe3 - ext::expand::expand_block_elts::h8d61523b3ef4a0eaVec
20: 0x7f99d757d578 - ext::expand::expand_block::h65394bbf166baee8gec
21: 0x7f99d75424fa - fold::noop_fold_expr::h7291925385286886789
22: 0x7f99d7537147 - ext::expand::expand_expr::::closure.68518
23: 0x7f99d7536ebf - ext::expand::expand_expr::h14fbac08b20b87c28mb
24: 0x7f99d7577b88 - fold::noop_fold_stmt::h12973173759275708851
25: 0x7f99d755a968 - ext::expand::expand_stmt::hd9da59f648bb2e0513b
26: 0x7f99d755d223 - iter::::next::next::h14693761281653209511
27: 0x7f99d755cc67 - util::small_vector::::from_iter::h2230188101519163904
28: 0x7f99d755bc1c - ext::expand::expand_stmt::hd9da59f648bb2e0513b
29: 0x7f99d757e87e - ext::expand::expand_block_elts::::::closure.69195
30: 0x7f99d757e61d - iter::::next::next::h7445701304088993935
31: 0x7f99d757dcdf - vec::::from_iter::from_iter::h1124164702553681919
32: 0x7f99d757d8dc - ext::expand::expand_block_elts::::closure.69190
33: 0x7f99d7546fe3 - ext::expand::expand_block_elts::h8d61523b3ef4a0eaVec
34: 0x7f99d757d578 - ext::expand::expand_block::h65394bbf166baee8gec
35: 0x7f99d7546981 - ext::expand::expand_and_rename_fn_decl_and_block::h0d444361d4f5f425XCc
36: 0x7f99d754c399 - ext::expand::expand_item_underscore::hc4243a869f3a877bGSb
37: 0x7f99d759d98e - fold::noop_fold_item_simple::h8462865063037887524
38: 0x7f99d759d4f0 - fold::noop_fold_item::h5328529649720349753
39: 0x7f99d754a650 - ext::expand::expand_annotatable::hcdfa58fbdd2db5e45oc
40: 0x7f99d7547178 - ext::expand::expand_item::h33ee80d897456d7c5Rb
41: 0x7f99d7552291 - iter::::next::next::h1430176632510595140
42: 0x7f99d7551e1e - vec::::from_iter::from_iter::h11440913854378754314
43: 0x7f99d7551b33 - fold::noop_fold_mod::h9501230011530116417
44: 0x7f99d754cc79 - ext::expand::expand_item_underscore::hc4243a869f3a877bGSb
45: 0x7f99d759d98e - fold::noop_fold_item_simple::h8462865063037887524
46: 0x7f99d759d4f0 - fold::noop_fold_item::h5328529649720349753
47: 0x7f99d754b709 - ext::expand::expand_annotatable::hcdfa58fbdd2db5e45oc
48: 0x7f99d7547178 - ext::expand::expand_item::h33ee80d897456d7c5Rb
49: 0x7f99d75a6c5f - ext::expand::expand_crate::h9eb355faa0bd8654MNc
50: 0x7f99dda8faec - driver::phase_2_configure_and_expand::::closure.27382
51: 0x7f99dda22b8d - driver::phase_2_configure_and_expand::h8ccfec5c5aca214aAua
52: 0x7f99dda10883 - driver::compile_input::h7f85a10f04a664a63ba
53: 0x7f99ddb6b19b - run_compiler::haabf54047e5bdb33wsc
54: 0x7f99ddb68a26 - boxed::::call_box::call_box::h4754854141470810202
55: 0x7f99ddb68334 - sys_common::unwind::try::try_fn::try_fn::h3587750331620889526
56: 0x7f99dd580668 - __rust_try
57: 0x7f99dd574deb - sys_common::unwind::try::inner_try::hbe46f56ef602f07cO9r
58: 0x7f99ddb684ce - boxed::::call_box::call_box::h8143133644679331252
59: 0x7f99dd587ce3 - sys::thread::::new::thread_start::h13325138c3b56c4cdEw
60: 0x7f99d6bec181 - start_thread
61: 0x7f99dd20547c - __clone
62: 0x0 -
The text was updated successfully, but these errors were encountered: