You are not logged in.

#1 2024-08-12 12:38:02

y_ekta
Member
Registered: 2024-08-12
Posts: 1

I can't download eww

an error when trying to download Eww using yay in Arch Linux. and I get the following error message

   Compiling time v0.3.34
   Compiling chrono v0.4.26
   Compiling jaq-interpret v1.2.1
error[E0282]: type annotations needed for `Box<_>`
  --> /home/yekta/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.34/src/format_description/parse/mod.rs:83:9
   |
83 |     let items = format_items
   |         ^^^^^
...
86 |     Ok(items.into())
   |              ---- type must be known at this point
   |
help: consider giving `items` an explicit type, where the placeholders `_` are specified
   |
83 |     let items: Box<_> = format_items
   |              ++++++++

   Compiling anstream v0.6.12
For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
==> HATA: build() içinde bir hata oluştu.
    Çıkılıyor...
 -> yapılırken hata: eww-exit status 4
 -> İstenen paketler yüklenemedi. Manüel müdahale gerekli:
eww - exit status 4
[yekta@arch ~]$

For more information about this error, try `rustc --explain E0282:

The compiler could not infer a type and asked for a type annotation.

Erroneous code example:

let x = Vec::new();

This error indicates that type inference did not result in one unique possible type, and extra information is required. In most cases this
can be provided by adding a type annotation. Sometimes you need to specify a generic type parameter manually.

In the example above, type Vec has a type parameter T. When calling Vec::new, barring any other later usage of the variable x that allows
the compiler to infer what type T is, the compiler needs to be told what it is.

The type can be specified on the variable:

let x: Vec<i32> = Vec::new();

The type can also be specified in the path of the expression:

let x = Vec::<i32>::new();

In cases with more complex types, it is not necessary to annotate the full type. Once the ambiguity is resolved, the compiler can infer the
rest:

let x: Vec<_> = "hello".chars().rev().collect();

Another way to provide the compiler with enough information, is to specify the generic type parameter:

let x = "hello".chars().rev().collect::<Vec<char>>();

Again, you need not specify the full type if the compiler can infer it:

let x = "hello".chars().rev().collect::<Vec<_>>();

Apart from a method or function with a generic type parameter, this error can occur when a type parameter of a struct or trait cannot be
inferred. In that case it is not always possible to use a type annotation, because all candidates have the same return type. For instance:

struct Foo<T> {
    num: T,
}

impl<T> Foo<T> {
    fn bar() -> i32 {
        0
    }

    fn baz() {
        let number = Foo::bar();
    }
}

This will fail because the compiler does not know which instance of Foo to call bar on. Change Foo::bar() to Foo::<T>::bar() to resolve the
error.

As the methods I tried, I updated the system and tried to download it from github and compile it (same error)
I'm using translation and I'm a bit new to Arch

Offline

#2 2024-08-12 12:52:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: I can't download eww

Please do not post excerpts of output.  Post the complete command and output.

But in this case, before you do so, go read the AUR comments on the eww packages as a similar-looking problem is highlighted there with a simple solution.

Last edited by Trilby (2024-08-12 13:47:00)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2024-08-12 13:02:44

cryptearth
Member
Registered: 2024-02-03
Posts: 2,167

Re: I can't download eww

funny how Rust is supposed to be the next super language but it fails where Java failed 20 years ago *popcorn emoji

Offline

Board footer

Powered by FluxBB