We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
// main.rs extern crate foo; use foo::Foo; fn main() { ().bar(5); }
// foo.rs pub trait Foo { type Input=usize; fn bar(&self, _: Self::Input) {} } impl Foo for () {}
This causes a ICE:
$ rustc foo.rs --crate-type lib && rustc main.rs --extern foo=libfoo.rlib main.rs:5:5: 5:14 error: internal compiler error: cat_expr Errd main.rs:5 ().bar(5); ^~~~~~~~~ note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports thread 'rustc' panicked at 'Box<Any>', src/libsyntax\diagnostic.rs:176
If the trait is defined in the same crate it compiles without error.
$ rustc --version --verbose rustc 1.3.0-dev (c1b8bd2d6 2015-06-28) binary: rustc commit-hash: c1b8bd2d6fd4a00522635112d3f7b28501552a65 commit-date: 2015-06-28 host: x86_64-pc-windows-gnu release: 1.3.0-dev
Backtrace:
1: 0x6f47a235 - sys::backtrace::write::h211dbb4bd6be973b5Cs 2: 0x6f48385c - rt::unwind::register::h4693906be8813b77JAw 3: 0x6f44570f - rt::unwind::begin_unwind_inner::h814f62215c9372bfSxw 4: 0x703710fb - diagnostic::SpanHandler::span_bug::h6cdd59c3e6e257dfO4A 5: 0x703710b3 - diagnostic::SpanHandler::span_bug::h6cdd59c3e6e257dfO4A 6: 0x23c579a - session::Session::abort_if_errors::h725710f82abb4c311Fs 7: 0x6d31fb65 - check::check_item_types::h5ff15bd0334d8c5ePGn 8: 0x6d3d9bf2 - check_crate::hef15b03eccc64e04w0C 9: 0x616a8b49 - driver::assign_node_ids_and_map::hb8bf19530013da614Da 10: 0x616a6f94 - driver::assign_node_ids_and_map::hb8bf19530013da614Da 11: 0x616a1489 - driver::assign_node_ids_and_map::hb8bf19530013da614Da 12: 0x61682a66 - driver::compile_input::h99144611d4621d8bTba 13: 0x6176484d - run_compiler::haae1b27de58cc46ew7b 14: 0x617624d5 - run::h9b75af55a20c8851c7b 15: 0x61761e19 - run::h9b75af55a20c8851c7b 16: 0x6f4be5bc - rust_try 17: 0x6f4be599 - rust_try 18: 0x6f46d475 - rt::unwind::try::inner_try::ha4237d2b9396aba5Ltw 19: 0x61761fd7 - run::h9b75af55a20c8851c7b 20: 0x6f48150e - sys::process::Command::cwd::h505045109e6a418daiv 21: 0x778259cd - BaseThreadInitThunk
The text was updated successfully, but these errors were encountered:
Actually encode default associated types
cebb118
Fixes rust-lang#26636
Auto merge of #26686 - arielb1:associated-type-defaults-actually-work…
dc309d7
…, r=eddyb Fixes #26636. r? @eddyb
No branches or pull requests
This causes a ICE:
If the trait is defined in the same crate it compiles without error.
Meta
Backtrace:
The text was updated successfully, but these errors were encountered: