Skip to content
New issue

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

ICE: 'rustc' panicked at 'assertion failed: !substs.has_regions_escaping_depth(0)' #34751

Closed
petrochenkov opened this issue Jul 10, 2016 · 1 comment

Comments

@petrochenkov
Copy link
Contributor

commented Jul 10, 2016

Code:

use std::marker::PhantomData;

fn f<'a>(PhantomData::<&'a u8>: PhantomData<&'a u8>) {}

fn main() {}

ICEs on stable/beta/nightly.

Backtrace:

#0  0x000000006e55e727 in rust_panic ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\std-f53fb285.dll
#1  0x000000006e544e2c in std::panicking::rust_panic_with_hook::hff406a2d53fd3a8a ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\std-f53fb285.dll
#2  0x0000000067a81464 in std::panicking::begin_panic::h7a5a31993347e9ec ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_typeck-f53fb285.dll
#3  0x0000000067b02537 in rustc_typeck::check::FnCtxt::instantiate_value_path::hd4af43121728875c ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_typeck-f53fb285.dll
#4  0x0000000067ab2dba in rustc_typeck::check::_match::_$LT$impl$u20$check..FnCtxt$LT$$u27$a$C$$u20$$u27$gcx$C$$u20$$u27$tcx$GT$$GT$::check_pat::h5874e11e18e036cd ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_typeck-f53fb285.dll
#5  0x0000000067aabf61 in rustc_typeck::check::check_fn::hedf1b94becbdc550 ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_typeck-f53fb285.dll
#6  0x0000000067aa1d89 in rustc_typeck::check::check_bare_fn::haac232c6a78527e7 ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_typeck-f53fb285.dll
#7  0x0000000067a9d25f in rustc_typeck::check::check_item_body::hca9847fe73b73821 ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_typeck-f53fb285.dll
#8  0x0000000067a94672 in rustc_typeck::check::check_item_bodies::h0129b02cf3aee3c1 ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_typeck-f53fb285.dll
#9  0x0000000067a892e2 in rustc_typeck::check_crate::hf9d573c002b16fbd ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_typeck-f53fb285.dll
#10 0x000000006ac97e25 in rustc_driver::driver::phase_3_run_analysis_passes::_$u7b$$u7b$closure$u7d$$u7d$::hab5b4af6b2e2861f ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_driver-f53fb285.dll
#11 0x000000006ac95d56 in rustc::ty::context::TyCtxt::create_and_enter::hc30a91872bbf912b ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_driver-f53fb285.dll
#12 0x000000006ac5a782 in rustc_driver::driver::compile_input::h2d1b58b831f06a86 ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_driver-f53fb285.dll
#13 0x000000006ac4697d in rustc_driver::run_compiler::h833483649bdaa9c3 ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_driver-f53fb285.dll
#14 0x000000006ac438ba in std::panicking::try::call::hf1c34f6ae15d2786 ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_driver-f53fb285.dll
#15 0x000000006e58f6f9 in __rust_maybe_catch_panic ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\std-f53fb285.dll
#16 0x000000006ac443b4 in _$LT$F$u20$as$u20$std..boxed..FnBox$LT$A$GT$$GT$::call_box::h7d06daf297860d37 ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\rustc_driver-f53fb285.dll
#17 0x000000006e57d32a in std::sys::thread::Thread::new::thread_start::h150ac04d84605902 ()
   from C:\msys64\home\rust\x86_64-pc-windows-gnu\stage1\bin\std-f53fb285.dll
#18 0x00000000770659bd in KERNEL32!BaseThreadInitThunk ()
   from C:\Windows\system32\kernel32.dll
#19 0x000000007729a2e1 in ntdll!RtlUserThreadStart ()
   from C:\Windows\SYSTEM32\ntdll.dll
#20 0x0000000000000000 in ?? ()

@apasel422 apasel422 added the I-ICE label Jul 10, 2016

@petrochenkov

This comment has been minimized.

Copy link
Contributor Author

commented Feb 19, 2017

Fixed in 1.16.0, needs test.

rustc 1.16.0-beta.2 (bc15d5281 2017-02-16)
warning: function is never used: `f`, #[warn(dead_code)] on by default
 --> <anon>:3:1
  |
3 | fn f<'a>(PhantomData::<&'a u8>: PhantomData<&'a u8>) {}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@petrochenkov petrochenkov added E-needstest and removed I-ICE labels Feb 19, 2017

@petrochenkov petrochenkov added the E-easy label Mar 1, 2017

bors added a commit that referenced this issue Mar 6, 2017
Auto merge of #40276 - topecongiro:add-test, r=petrochenkov
Add missing tests for 'E-needstest' labeled issues

This PR adds missing tests for issue #35988, #19712, ~~#18627~~, #24947, #28600 and #34751.

@bors bors closed this in #40276 Mar 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.