Closed vikas027 closed 5 years ago
Same on Docker x86_84 !
Same on Debian 9.
Fixed by #106 and published in 0.4.1
Hey @nicklan ,
Still can't compile on OSX
🍺 ~$ cargo -V
cargo 1.36.0
🍺 ~$ cargo install click
Updating crates.io index
Downloaded click v0.4.1
Downloaded 1 crate (60.1 KB) in 8.04s
Installing click v0.4.1
Downloaded chrono v0.4.7
Downloaded atomicwrites v0.2.3
Downloaded hyper v0.10.16
Downloaded serde_derive v1.0.94
Downloaded serde v1.0.94
Downloaded serde_json v1.0.40
Downloaded serde_yaml v0.8.9
Downloaded byteorder v1.3.2
Downloaded atty v0.2.12
Downloaded ctrlc v3.1.3
Downloaded bitflags v1.1.0
Downloaded libc v0.2.59
Downloaded log v0.4.7
Downloaded cc v1.0.37
Downloaded cfg-if v0.1.9
Downloaded memchr v2.2.1
Downloaded utf8-ranges v1.0.3
Downloaded nix v0.13.1
Downloaded unicode-segmentation v1.3.0
Downloaded nix v0.14.1
Downloaded remove_dir_all v0.5.2
Downloaded num-integer v0.1.41
Downloaded num-traits v0.2.8
Downloaded nix v0.11.1
Downloaded httparse v1.3.4
Downloaded smallvec v0.6.10
Downloaded proc-macro2 v0.4.30
Downloaded quote v0.6.13
Downloaded num_cpus v1.10.1
Downloaded itoa v0.4.4
Downloaded ryu v1.0.0
Downloaded dtoa v0.4.4
Downloaded autocfg v0.1.4
Downloaded syn v0.15.39
Compiling bitflags v1.1.0
Compiling log v0.4.7
Compiling libc v0.2.59
Compiling cc v1.0.37
Compiling nix v0.13.1
Compiling version_check v0.1.5
Compiling winapi v0.3.7
Compiling proc-macro2 v0.4.30
Compiling autocfg v0.1.4
Compiling smallvec v0.6.10
Compiling cfg-if v0.1.9
Compiling byteorder v1.3.2
Compiling matches v0.1.8
Compiling void v1.0.2
Compiling httparse v1.3.4
Compiling untrusted v0.6.2
Compiling memchr v2.2.1
Compiling unicode-xid v0.1.0
Compiling safemem v0.3.0
Compiling syn v0.15.39
Compiling nix v0.11.1
Compiling serde v1.0.94
Compiling percent-encoding v1.0.1
Compiling nix v0.14.1
Compiling ryu v1.0.0
Compiling unicode-width v0.1.5
Compiling typeable v0.1.2
Compiling bitflags v0.7.0
Compiling linked-hash-map v0.5.2
Compiling lazycell v1.2.1
Compiling regex v0.2.11
Compiling rustc-serialize v0.3.24
Compiling lazy_static v1.3.0
Compiling ucd-util v0.1.3
Compiling language-tags v0.2.2
Compiling traitobject v0.1.0
Compiling remove_dir_all v0.5.2
Compiling itoa v0.4.4
Compiling strsim v0.8.0
Compiling dtoa v0.4.4
Compiling term v0.4.6
Compiling utf8parse v0.1.1
Compiling unicode-segmentation v1.3.0
Compiling quick-error v1.2.2
Compiling lazy_static v0.2.11
Compiling ansi_term v0.11.0
Compiling encode_unicode v0.3.5
Compiling nom v2.2.1
Compiling utf8-ranges v1.0.3
Compiling vec_map v0.8.1
Compiling ansi_term v0.9.0
Compiling unicode-bidi v0.3.4
Compiling unicode-normalization v0.1.8
Compiling unicase v1.4.2
Compiling num-traits v0.2.8
Compiling num-integer v0.1.41
Compiling textwrap v0.11.0
Compiling thread_local v0.3.6
Compiling yaml-rust v0.4.3
Compiling regex-syntax v0.5.6
Compiling humantime v1.2.0
Compiling log v0.3.9
Compiling idna v0.1.5
Compiling memchr v1.0.2
Compiling num_cpus v1.10.1
Compiling time v0.1.42
Compiling rand v0.4.6
Compiling atty v0.2.12
Compiling dirs v1.0.5
Compiling nix v0.8.1
Compiling ring v0.13.5
Compiling base64 v0.9.3
Compiling base64 v0.5.2
Compiling shared_child v0.3.3
Compiling aho-corasick v0.6.10
Compiling mime v0.2.6
Compiling nom v3.2.1
Compiling csv v0.15.0
Compiling tempdir v0.3.7
Compiling clap v2.33.0
Compiling quote v0.6.13
Compiling os_pipe v0.8.1
Compiling os_pipe v0.5.1
Compiling rustyline v3.0.0
Compiling serde_yaml v0.8.9
Compiling serde_json v1.0.40
error[E0283]: type annotations required: cannot resolve `std::string::String: std::convert::AsRef<_>`
--> /Users/vikas/.cargo/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/lib.rs:655:43
|
655 | editor.add_history_entry(line.as_ref());
| ^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0283`.
error: Could not compile `rustyline`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `click v0.4.1`, intermediate artifacts can be found at `/var/folders/r8/sppjg0tx2j9d0gnf9_9bplt00000gn/T/cargo-installOFyFik`
Caused by:
build failed
🍺 ~$
🍺 ~$ rustc --explain E0283
This error occurs when the compiler doesn't have enough information
to unambiguously choose an implementation.
For example:
trait Generator {
fn create() -> u32;
}
struct Impl;
impl Generator for Impl {
fn create() -> u32 { 1 }
}
struct AnotherImpl;
impl Generator for AnotherImpl {
fn create() -> u32 { 2 }
}
fn main() {
let cont: u32 = Generator::create();
// error, impossible to choose one of Generator trait implementation
// Should it be Impl or AnotherImpl, maybe something else?
}
To resolve this error use the concrete type:
trait Generator {
fn create() -> u32;
}
struct AnotherImpl;
impl Generator for AnotherImpl {
fn create() -> u32 { 2 }
}
fn main() {
let gen1 = AnotherImpl::create();
// if there are multiple methods with same name (different traits)
let gen2 = <AnotherImpl as Generator>::create();
}
🍺 ~$
Environment
OS X Version: 10.14.3 (18D109) Cargo Version: 1.34.0 Rust Version: 1.34.0 Click Version: 0.4.0
Error