Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP, EXPERIMENTAL] Update to libtest 0.0.2 #62829

Closed
wants to merge 12 commits into from
18 changes: 12 additions & 6 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,16 @@ dependencies = [
"vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "libtest"
version = "0.0.2"
source = "git+https://github.com/gnzlbg/libtest?branch=clippy_ci#1f13f7dd286fd16c76bd61ddcbe162fca9f9d9d2"
dependencies = [
"getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
"termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "libz-sys"
version = "1.0.25"
Expand Down Expand Up @@ -3697,10 +3707,6 @@ dependencies = [
"utf-8 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "term"
version = "0.0.0"

[[package]]
name = "term"
version = "0.4.6"
Expand Down Expand Up @@ -3741,9 +3747,8 @@ dependencies = [
name = "test"
version = "0.0.0"
dependencies = [
"getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"libtest 0.0.2 (git+https://github.com/gnzlbg/libtest?branch=clippy_ci)",
"proc_macro 0.0.0",
"term 0.0.0",
]

[[package]]
Expand Down Expand Up @@ -4431,6 +4436,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum libgit2-sys 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "941a41e23f77323b8c9d2ee118aec9ee39dfc176078c18b4757d3bad049d9ff7"
"checksum libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4"
"checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d"
"checksum libtest 0.0.2 (git+https://github.com/gnzlbg/libtest?branch=clippy_ci)" = "<none>"
"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
Expand Down
11 changes: 7 additions & 4 deletions src/librustc/middle/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,15 @@ impl<'tcx> Index<'tcx> {
// while maintaining the invariant that all sysroot crates are unstable
// by default and are unable to be used.
if tcx.sess.opts.debugging_opts.force_unstable_if_unmarked {
let reason = "this crate is being loaded from the sysroot, an \
unstable location; did you mean to load this crate \
from crates.io via `Cargo.toml` instead?";
let reason = format!(
"crate \"{}\" is being loaded from the sysroot, an \
unstable location; did you mean to load this crate \
from crates.io via `Cargo.toml` instead?",
tcx.crate_name(LOCAL_CRATE)
);
let stability = tcx.intern_stability(Stability {
level: attr::StabilityLevel::Unstable {
reason: Some(Symbol::intern(reason)),
reason: Some(Symbol::intern(&reason)),
issue: 27812,
},
feature: sym::rustc_private,
Expand Down
16 changes: 8 additions & 8 deletions src/librustdoc/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -745,20 +745,20 @@ impl Tester for Collector {
&cratename,
&filename,
line,
cfgs,
libs,
cg,
externs,
cfgs.clone(),
libs.clone(),
cg.clone(),
externs.clone(),
config.should_panic,
config.no_run,
config.test_harness,
config.compile_fail,
config.error_codes,
config.error_codes.clone(),
&opts,
maybe_sysroot,
linker,
maybe_sysroot.clone(),
linker.clone(),
edition,
persist_doctests
persist_doctests.clone()
);

if let Err(err) = res {
Expand Down
3 changes: 1 addition & 2 deletions src/libtest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ path = "lib.rs"
crate-type = ["dylib", "rlib"]

[dependencies]
getopts = "0.2.19"
term = { path = "../libterm" }
libtest = { version = "0.0.2", git = "https://github.com/gnzlbg/libtest", branch = "clippy_ci", features = ["unstable"] }

# not actually used but needed to always have proc_macro in the sysroot
proc_macro = { path = "../libproc_macro" }
Loading