-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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: Type parameter out of range when substituting in region 'a (space=FnSpace, index=0) #18232
Comments
After commenting out everything what somehow uses |
Having the same issue. |
Here is so far smallest piece of code which causes it: #![allow(dead_code)]
struct Cursor<'a>;
trait CursorNavigator {
fn init_cursor<'a, 'b:'a>(&'a self, cursor: &mut Cursor<'b>) -> bool;
}
struct SimpleNavigator;
impl CursorNavigator for SimpleNavigator {
fn init_cursor<'a, 'b: 'a>(&'a self, _cursor: &mut Cursor<'b>) -> bool {
false
}
}
fn main() {
let mut c = Cursor;
let n = SimpleNavigator;
n.init_cursor(&mut c); // <-------------------- fails on resolving this method call
} |
So it seems the only thing which crashes it is a notion that Unfortunately there is no workaround it my case as if I remove this obligation I get compile errors in other parts. |
@nikomatsakis is there anything else I can provide to help fixing it? |
Sorry, catching up on github notifications and only just saw this. |
The reduced test case certainly helps a lot. |
Hello, I get a similar error
with the following code: extern crate test;
trait Foo<'a> {
fn foo(bar: &'a Bar) -> Self;
}
struct Bar;
struct Baz<'a> {
bar: &'a Bar,
}
impl <'a> Foo<'a> for Baz<'a> {
fn foo(bar: &'a Bar) -> Baz<'a> { Baz { bar: bar } }
}
impl Bar {
fn foo<'a, T: Foo<'a>>(&'a self) -> T { Foo::foo(self) }
}
fn main() {
let bar = Bar;
let baz: Baz = bar.foo();
test::black_box(baz.bar);
} I hope it helps. Regards, |
@nikomatsakis any estimations on this issue? There is a tons of useful stuff in nightly and it is a bit pity to stay on 2 week old version just because one of deps produced ICE. |
On Thu, Nov 06, 2014 at 01:04:45AM -0800, Valerii Hiora wrote:
Hi, sorry, I've been busy pushing on new features, I plan to take some |
OK, so, I figured out the fix. I will attach a patch on this pending PR: #18694 |
ohh, it finally works! 👍 |
Closes rust-lang#5988. Closes rust-lang#10176. Closes rust-lang#10456. Closes rust-lang#12744. Closes rust-lang#13264. Closes rust-lang#13324. Closes rust-lang#14182. Closes rust-lang#15381. Closes rust-lang#15444. Closes rust-lang#15480. Closes rust-lang#15756. Closes rust-lang#16822. Closes rust-lang#16966. Closes rust-lang#17351. Closes rust-lang#17503. Closes rust-lang#17545. Closes rust-lang#17771. Closes rust-lang#17816. Closes rust-lang#17897. Closes rust-lang#17905. Closes rust-lang#18188. Closes rust-lang#18232. Closes rust-lang#18345. Closes rust-lang#18389. Closes rust-lang#18400. Closes rust-lang#18502. Closes rust-lang#18611. Closes rust-lang#18783. Closes rust-lang#19009. Closes rust-lang#19081. Closes rust-lang#19098. Closes rust-lang#19127. Closes rust-lang#19135.
Closes rust-lang#5988. Closes rust-lang#10176. Closes rust-lang#10456. Closes rust-lang#12744. Closes rust-lang#13264. Closes rust-lang#13324. Closes rust-lang#14182. Closes rust-lang#15381. Closes rust-lang#15444. Closes rust-lang#15480. Closes rust-lang#15756. Closes rust-lang#16822. Closes rust-lang#16966. Closes rust-lang#17351. Closes rust-lang#17503. Closes rust-lang#17545. Closes rust-lang#17771. Closes rust-lang#17816. Closes rust-lang#17897. Closes rust-lang#17905. Closes rust-lang#18188. Closes rust-lang#18232. Closes rust-lang#18345. Closes rust-lang#18389. Closes rust-lang#18400. Closes rust-lang#18502. Closes rust-lang#18611. Closes rust-lang#18783. Closes rust-lang#19009. Closes rust-lang#19081. Closes rust-lang#19098. Closes rust-lang#19127. Closes rust-lang#19135.
Closes #5988. Closes #10176. Closes #10456. Closes #12744. Closes #13264. Closes #13324. Closes #14182. Closes #15381. Closes #15444. Closes #15480. Closes #15756. Closes #16822. Closes #16966. Closes #17351. Closes #17503. Closes #17545. Closes #17771. Closes #17816. Closes #17897. Closes #17905. Closes #18188. Closes #18232. Closes #18345. Closes #18389. Closes #18400. Closes #18502. Closes #18611. Closes #18783. Closes #19009. Closes #19081. Closes #19098. Closes #19127. Closes #19135.
Unfortunately I've failed to understand what exactly causes it as reported 'a core::NativeTransaction is used just in a couple of places and looks completely innocent.
I believe it started after #18121 landed.
Here is a backtrace:
The text was updated successfully, but these errors were encountered: