These are chat archives for rust-lang/rust

Dec 2017
Dec 28 2017 02:04
why does the insert here result in a second mutable borrow?
    if let Some(ref mut list) = compatibility_list.get_mut(&v[i].0) {
    } else {
      compatibility_list.insert(v[i].0, vec![v[i].0]);
Noah Weninger
Dec 28 2017 02:14
The borrow from get_mut sticks around for the entire if-else block due to limitations in the borrow checker. If you are using nightly, enabling non-lexical lifetimes by adding #![feature(nll)] to the crate root should get it to compile.
Dec 28 2017 02:16

thank you! in this case i wound up going with a different feature gate and

      .and_modify(|list| list.push(v[i].0))

but your tip will come in handy

as this also bit me in a different context
Hans W. Uhlig
Dec 28 2017 16:48
yeah… rustup is broken now
andrew bernard
Dec 28 2017 19:57
hi. im trying to install rust on Ubuntu using the WSL for windows x64. i keep getting this output:
failed to run custom build command for `openssl-sys v0.9.23`
process didn't exit successfully: `/mnt/c/repos/personal/rusoto/target/debug/build/openssl-sys-e9fe3c6b80745ee1/build-script-build` (exit cod
e: 101)
--- stdout
run pkg_config fail: "`\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"` did not exit successfully: exit code: 1\n--- stderr\nPackage opens
sl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openssl.pc\'\nto the PKG_CONFIG_PATH enviro
nment variable\nNo package \'openssl\' found\n"

--- stderr
thread 'main' panicked at '

Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
compilation process.
Hans W. Uhlig
Dec 28 2017 20:01
is there anywhere to download a static binary version of the compiled rust without using rustup?
specifically linux
nevermin I think I found it
Ed Page
Dec 28 2017 22:00
@drexler You probably need to install libssl-dev. If you haven't already, you probably also need build-essential.