Change:
Hey everybody :) I was trying to test matrix*vector in aljabar crate by running "cargo test" on: and got this: Not sure if it's a known issue or not but if there's anything else you need from me please let me know :)
version:
verbose trace:
It would help if you can reduce the problem to a minimal reproducer without the crate. (Also note that ICEs are common for .)
Not sure if i can manage that. Could be over my head.
there is a minimal example here:

Discussion:
EncodedMetadata, ForeignModule}; use rustc::hir::def::CtorKind; use rustc::hir::def_id::{CrateNum, CRATE_DEF_INDEX, DefIndex, DefId, LocalDefId, LOCAL_CRATE}; <del> use rustc::hir::GenericParamKind; </del> <ins> use rustc::hir::{GenericParamKind, AnonConst}; </ins> use rustc::hir::map::definitions::DefPathTable; use rustc_data_structures::fingerprint::Fingerprint; use rustc_index::vec::IndexVec;

intravisit::walk_expr(self, ex); self.encode_info_for_expr(ex); } <ins> fn visit_anon_const(&mut self, c: &'tcx AnonConst) { intravisit::walk_anon_const(self, c); let def_id = self.tcx.hir().local_def_id(c.hir_id); self.record(def_id, EncodeContext::encode_info_for_anon_const, def_id); } </ins> fn visit_item(&mut self, item: &'tcx hir::Item) { intravisit::walk_item(self, item); let def_id = self.tcx.hir().local_def_id(item.hir_id);

EncodeContext::encode_info_for_foreign_item, (def_id, ni)); } <del> fn visit_variant(&mut self, v: &'tcx hir::Variant, g: &'tcx hir::Generics, id: hir::HirId) { intravisit::walk_variant(self, v, g, id); if let Some(ref discr) = v.disr_expr { let def_id = self.tcx.hir().local_def_id(discr.hir_id); self.record(def_id, EncodeContext::encode_info_for_anon_const, def_id); } } </del> fn visit_generics(&mut self, generics: &'tcx hir::Generics) { intravisit::walk_generics(self, generics); self.encode_info_for_generics(generics); } <del> fn visit_ty(&mut self, ty: &'tcx hir::Ty) { intravisit::walk_ty(self, ty); self.encode_info_for_ty(ty); } </del> fn visit_macro_def(&mut self, macro_def: &'tcx hir::MacroDef) { let def_id = self.tcx.hir().local_def_id(macro_def.hir_id); self.record(def_id, EncodeContext::encode_info_for_macro_def, macro_def);

} } <del> fn encode_info_for_ty(&mut self, ty: &hir::Ty) { match ty.kind { hir::TyKind::Array(_, ref length) => { let def_id = self.tcx.hir().local_def_id(length.hir_id); self.record(def_id, EncodeContext::encode_info_for_anon_const, def_id); } _ => {} } } </del> fn encode_info_for_expr(&mut self, expr: &hir::Expr) { match expr.kind { hir::ExprKind::Closure(..) => {

<ins> #![feature(const_generics)] pub struct Struct<const N: usize>(pub [u8; N]); pub type Alias = Struct<2>; pub fn function(value: Struct<3>) -> u8 { value.0[0] } </ins>

<ins> // aux-build:const_generic_lib.rs extern crate const_generic_lib; fn main() { let _ = const_generic_lib::function(const_generic_lib::Struct([0u8, 1u8])); //~^ ERROR mismatched types let _: const_generic_lib::Alias = const_generic_lib::Struct([0u8, 1u8, 2u8]); //~^ ERROR mismatched types } </ins>

<ins> error[E0308]: mismatched types --> $DIR/const-argument-cross-crate-mismatch.rs:6:41 | LL |     let _ = const_generic_lib::function(const_generic_lib::Struct([0u8, 1u8])); |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `3usize`, found `2usize` | = note: expected type `const_generic_lib::Struct<3usize>` found type `const_generic_lib::Struct<_: usize>` error[E0308]: mismatched types --> $DIR/const-argument-cross-crate-mismatch.rs:8:39 | LL |     let _: const_generic_lib::Alias = const_generic_lib::Struct([0u8, 1u8, 2u8]); |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `2usize`, found `3usize` | = note: expected type `const_generic_lib::Struct<2usize>` found type `const_generic_lib::Struct<_: usize>` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`. </ins>

<ins> // run-pass // aux-build:const_generic_lib.rs extern crate const_generic_lib; struct Container(const_generic_lib::Alias); fn main() { let res = const_generic_lib::function(const_generic_lib::Struct([14u8, 1u8, 2u8])); assert_eq!(res, 14u8); let _ = Container(const_generic_lib::Struct([0u8, 1u8])); } </ins>