bloznelis/kbt

Failing to compile: error[E0283]: type annotations needed

Closed this issue · 5 comments

Compiling from cargo install kbt kbt = "2.0.6" and from this cloned repo yields:

error[E0283]: type annotations needed
  --> src\view.rs:42:10
   |
42 |         .constraints(make_row_constraints(row_keys).as_ref())
   |          ^^^^^^^^^^^                                ------ type must be known at 
this point
   |          |
   |          cannot infer type of the type parameter `C` declared on the method `constraints`
   |
   = note: multiple `impl`s satisfying `Vec<Constraint>: AsRef<_>` found in the `alloc` crate:
           - impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
             where A: Allocator;
           - impl<T, A> AsRef<[T]> for Vec<T, A>
             where A: Allocator;
help: consider specifying the generic argument
   |
42 |         .constraints::<&T>(make_row_constraints(row_keys).as_ref())
   |                     ++++++

For more information about this error, try `rustc --explain E0283`.
error: could not compile `kbt` (bin "kbt") due to previous error

Which rustc version are you using?

Which rustc version are you using?

@bloznelis
rustc 1.75.0 (82e1608df 2023-12-21)
cargo 1.75.0 (1d8b05cdd 2023-11-20)
Windows 10

rustup default stable                                                
info: using existing install for 'stable-x86_64-pc-windows-msvc'                          
info: default toolchain set to 'stable-x86_64-pc-windows-msvc'                                                                                                                        

    stable-x86_64-pc-windows-msvc unchanged - rustc 1.75.0 (82e1608df 2023-12-21)

Thanks, I was able to reproduce it. Will fix soon.

Should be fixed in the latest master @sloganking. Thanks for reporting.

Thanks the new version compiles for me now!