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
Running cargo test on my machine produces the following output:
error: cannot find macro `println` in this scope
--> src/lib.rs:3238:9
|
3238 | println!("{:?}", decoded);
| ^^^^^^^
error[E0412]: cannot find type `String` in this scope
--> src/lib.rs:3248:28
|
3248 | .collect::<String>();
| ^^^^^^ not found in this scope
|
help: you might be missing a type parameter
|
3242 | fn check<String>(input: &str, encoding: &'static Encoding) {
| ++++++++
error[E0599]: no method named `decode_without_bom_handling` found for reference `&encoding_rs::Encoding` in the current scope
--> src/lib.rs:3237:32
|
3237 | let (decoded, _) = enc.decode_without_bom_handling(bytes);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: there is a method with a similar name: `new_decoder_without_bom_handling`
error[E0599]: no method named `encode` found for reference `&'static encoding_rs::Encoding` in the current scope
--> src/lib.rs:3249:22
|
3249 | encoding.encode(&orthographic)
| ^^^^^^ help: there is a method with a similar name: `new_encoder`
error[E0599]: no method named `encode` found for reference `&'static encoding_rs::Encoding` in the current scope
--> src/lib.rs:3251:22
|
3251 | encoding.encode(input)
| ^^^^^^ help: there is a method with a similar name: `new_encoder`
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> src/lib.rs:3244:14
|
3244 | let (bytes, _, _) = if encoding == WINDOWS_1258 {
| ^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u8]`
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3645:21
|
3645 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3655:21
|
3655 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3665:21
|
3665 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3675:21
|
3675 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3685:21
|
3685 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3695:21
|
3695 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3705:21
|
3705 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3715:21
|
3715 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3725:21
|
3725 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3735:21
|
3735 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3745:21
|
3745 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3755:21
|
3755 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3765:21
|
3765 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3775:21
|
3775 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3785:21
|
3785 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3795:21
|
3795 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3805:21
|
3805 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3815:21
|
3815 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3825:21
|
3825 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3835:21
|
3835 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3845:21
|
3845 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/lib.rs:3855:21
|
3855 | let mut v = Vec::new();
| ^^^ use of undeclared type `Vec`
Some errors have detailed explanations: E0277, E0412, E0433, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `chardetng` (lib test) due to 28 previous errors
There are three kinds of errors
String and Vec are not imported because the crate is nostd. It's easy to import them in the tests mod
println! doesn't work for the same reason, but I believe that code can just be removed
Several of the encoding_rs functions require the alloc feature. I'm not sure how to fix those.
The text was updated successfully, but these errors were encountered:
Running
cargo test
on my machine produces the following output:There are three kinds of errors
alloc
feature. I'm not sure how to fix those.The text was updated successfully, but these errors were encountered: