Leverage Cargo workspaces in rustbuild
This is a continuation of https://github.com/rust-lang/rust/pull/36032 which implements the change to use `cargo metadata` to learn about the crate graph.
Prevent accidentally running 'make install' as sudo.
r? @alexcrichton
I missed this in the previous PR, but this seems to work. It should probably go in a rollup, but I don't know how to do those. :/
Avoid some `pat_to_string` calls.
`ty_of_method_or_bare_fn` currently calls `pat_to_string` even when it
doesn't need to. Fixing this avoids hundreds of large allocations (e.g.
171,600 bytes, in `mk_printer`) in several of rustc-benchmarks.
This updates the commit to use workspaces to use `cargo metadata` instead of
hardcoded lists about what to test. This should help us be resilient to updates
in the future on behalf of the crate DAG and minimize the amount of files that
need to be touched.
This involves hacking the code used to run cargo test on various
packages, because it reads Cargo.lock to determine which packages should
be tested. This change implements a blacklist, since that will catch new
crates when they are added in the future.
std: Minor cleanup to libtest
* Don't spawn two threads for all tests, just one now that `catch_unwind` is
stable.
* Remove usage of the unstable `box` keyword
* Remove usage of the unstable `FnBox` trait
rustc: Rename rustc_macro to proc_macro
This commit blanket renames the `rustc_macro` infrastructure to `proc_macro`,
which reflects the general consensus of #35900. A follow up PR to Cargo will be
required to purge the `rustc-macro` name as well.
`ty_of_method_or_bare_fn` currently calls `pat_to_string` even when it
doesn't need to. Fixing this avoids hundreds of large allocations (e.g.
171,600 bytes, in `mk_printer`) in several of the rustc-benchmarks.
Test Case for Incr. Comp. Hash for traits #36681.
Fixes#36681
Part of #36350
Currently, the following tests fail:
Unsafe modifier
Extern modifier
Extern c to rust-intrinsic
Trait unsafety
Change type of method parameter (&i32 => &mut i32)
Mode of self parameter
r? @michaelwoerister
rustbuild: Add install target. #34675
It just prints to the screen currently.
r? @alexcrichton
I'm working on the next commit to actually have it install.
This commit blanket renames the `rustc_macro` infrastructure to `proc_macro`,
which reflects the general consensus of #35900. A follow up PR to Cargo will be
required to purge the `rustc-macro` name as well.
* Don't spawn two threads for all tests, just one now that `catch_unwind` is
stable.
* Remove usage of the unstable `box` keyword
* Remove usage of the unstable `FnBox` trait