You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we check that when you instantiate a struct or trait you supply the right number of parameters, but we don't check that they have the right kind (i.e., type vs lifetime). I added an (ignored) test check_struct_kinds that demonstrates this. It'd be nice to fix this.
To fix it, one would go into chalk-rust/src/lower/mod.rs and look for places where we check the number of parameters, e.g.:
if args.len() != info.addl_parameter_kinds.len(){bail!("wrong number of parameters for associated type (expected {}, got {})",
info.addl_parameter_kinds.len(), args.len())}
and adapt those to also check that the kinds in args match the kinds of info.addl_parameter_kinds (in that particular case).
The text was updated successfully, but these errors were encountered:
Currently we check that when you instantiate a struct or trait you supply the right number of parameters, but we don't check that they have the right kind (i.e., type vs lifetime). I added an (ignored) test
check_struct_kinds
that demonstrates this. It'd be nice to fix this.To fix it, one would go into
chalk-rust/src/lower/mod.rs
and look for places where we check the number of parameters, e.g.:and adapt those to also check that the
kinds
inargs
match the kinds ofinfo.addl_parameter_kinds
(in that particular case).The text was updated successfully, but these errors were encountered: