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
With the current HEAD of master (commit 505572b), when I install rust to my home directory and symlink rustc in $HOME/bin (which is on my $PATH), I get the following error:
$ ./configure --prefix=$HOME/opt/rust && make install
# elided
$ echo 'fn main() {}' > t.rs
$ RUST_LOG=rustc::metadata rustc t.rs
using sysroot = /Users/bnoordhuis
resolving extern mod stmt. ident: @"std" path_opt: Some((@"std#0.10-pre", CookedStr))
filesearch: searching additional lib search paths [0u]
filesearch: searching target lib path
searching /Users/bnoordhuis/lib/rustlib/x86_64-apple-darwin/lib
is /Users/bnoordhuis/src/rust/.rust/lib/x86_64-apple-darwin in visited_dirs? false
searching /Users/bnoordhuis/src/rust/.rust/lib/x86_64-apple-darwin
is /Users/bnoordhuis/src/rust/lib/x86_64-apple-darwin in visited_dirs? false
searching /Users/bnoordhuis/src/rust/lib/x86_64-apple-darwin
t.rs:1:1: 1:1 error: can't find crate for `std`
t.rs:1 fn main() {}
^
Invoking rustc as $HOME/opt/rust/bin/rustc fixes it as does linking with -L$HOME/opt/rust/lib/rustlib/x86_64-apple-darwin/lib.
I suspect that rustc is looking for the libraries relative to dirname(argv[0]). That should probably be dirname(realpath(argv[0])).
The text was updated successfully, but these errors were encountered:
`unused_io_amount` captures `Ok(_)`s
Partial rewrite of `unused_io_amount` to lint over `Ok(_)` and `Ok(..)`.
Moved the check to `check_block` to simplify context checking for expressions and allow us to check only some expressions.
For match (expr, arms) we emit a lint for io ops used on `expr` when an arm is `Ok(_)|Ok(..)`. Also considers the cases when there are guards in the arms and `if let Ok(_) = ...` cases.
For `Ok(_)` and `Ok(..)` it emits a note indicating where the value is ignored.
changelog: False Negatives [`unused_io_amount`]: Extended `unused_io_amount` to catch `Ok(_)`s in `If let` and match exprs.
Closesrust-lang#11713
r? `@giraffate`
With the current HEAD of master (commit 505572b), when I install rust to my home directory and symlink rustc in $HOME/bin (which is on my $PATH), I get the following error:
Invoking rustc as $HOME/opt/rust/bin/rustc fixes it as does linking with -L$HOME/opt/rust/lib/rustlib/x86_64-apple-darwin/lib.
I suspect that rustc is looking for the libraries relative to dirname(argv[0]). That should probably be dirname(realpath(argv[0])).
The text was updated successfully, but these errors were encountered: