Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cbab5cd

Browse files
committedNov 12, 2021
allow deprecations where necessary
1 parent 2f0c0d4 commit cbab5cd

File tree

13 files changed

+14
-0
lines changed

13 files changed

+14
-0
lines changed
 

‎compiler/rustc_feature/src/tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use super::UnstableFeatures;
22

33
#[test]
4+
#[allow(deprecated, deprecated_in_future)]
45
fn rustc_bootstrap_parsing() {
56
let is_bootstrap = |env, krate| {
67
std::env::set_var("RUSTC_BOOTSTRAP", env);

‎compiler/rustc_interface/src/passes.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ fn pre_expansion_lint(
257257
/// syntax expansion, secondary `cfg` expansion, synthesis of a test
258258
/// harness if one is to be provided, injection of a dependency on the
259259
/// standard library and prelude, and name resolution.
260+
#[allow(deprecated, deprecated_in_future)]
260261
pub fn configure_and_expand(
261262
sess: &Session,
262263
lint_store: &LintStore,

‎library/std/src/process/tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ fn test_add_to_env() {
260260

261261
#[test]
262262
#[cfg_attr(target_os = "vxworks", ignore)]
263+
#[allow(deprecated, deprecated_in_future)]
263264
fn test_capture_env_at_spawn() {
264265
use crate::env;
265266

‎library/std/src/sys/windows/process/tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ fn test_make_command_line() {
7373
// On Windows, environment args are case preserving but comparisons are case-insensitive.
7474
// See: #85242
7575
#[test]
76+
#[allow(deprecated, deprecated_in_future)]
7677
fn windows_env_unicode_case() {
7778
let test_cases = [
7879
("ä", "Ä"),

‎library/std/src/sys_common/process.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ impl CommandEnv {
4040
}
4141

4242
// Apply these changes directly to the current environment
43+
#[allow(deprecated, deprecated_in_future)]
4344
pub fn apply(&self) {
4445
if self.clear {
4546
for (k, _) in env::vars_os() {

‎library/std/tests/env.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(deprecated, deprecated_in_future)]
2+
13
use std::env::*;
24
use std::ffi::{OsStr, OsString};
35

‎library/test/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ pub fn test_main_static(tests: &[&TestDescAndFn]) {
151151
///
152152
/// This is the entry point for the main function generated by `rustc --test`
153153
/// when panic=abort.
154+
#[allow(deprecated, deprecated_in_future)]
154155
pub fn test_main_static_abort(tests: &[&TestDescAndFn]) {
155156
// If we're being run in SpawnedSecondary mode, run the test here. run_test
156157
// will then exit the process.

‎library/test/src/term/terminfo/searcher/tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use super::*;
22

33
#[test]
44
#[ignore = "buildbots don't have ncurses installed and I can't mock everything I need"]
5+
#[allow(deprecated, deprecated_in_future)]
56
fn test_get_dbpath_for_term() {
67
// woefully inadequate test coverage
78
// note: current tests won't work with non-standard terminfo hierarchies (e.g., macOS's)

‎src/build_helper/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pub fn tracked_env_var_os<K: AsRef<OsStr> + Display>(key: K) -> Option<OsString>
4646
// the one we want to use. As such, we restore the environment to what bootstrap saw. This isn't
4747
// perfect -- we might actually want to see something from Cargo's added library paths -- but
4848
// for now it works.
49+
#[allow(deprecated, deprecated_in_future)]
4950
pub fn restore_library_path() {
5051
let key = tracked_env_var_os("REAL_LIBRARY_PATH_VAR").expect("REAL_LIBRARY_PATH_VAR");
5152
if let Some(env) = tracked_env_var_os("REAL_LIBRARY_PATH") {

‎src/test/ui/command/command-exec.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use std::env;
1212
use std::os::unix::process::CommandExt;
1313
use std::process::Command;
1414

15+
#[allow(deprecated, deprecated_in_future)]
1516
fn main() {
1617
let mut args = env::args();
1718
let me = args.next().unwrap();

‎src/test/ui/process/process-envs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub fn env_cmd() -> Command {
2525
cmd
2626
}
2727

28+
#[allow(deprecated, deprecated_in_future)]
2829
fn main() {
2930
// save original environment
3031
let old_env = env::var_os("RUN_TEST_NEW_ENV");

‎src/test/ui/process/process-remove-from-env.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub fn env_cmd() -> Command {
2424
cmd
2525
}
2626

27+
#[allow(deprecated, deprecated_in_future)]
2728
fn main() {
2829
// save original environment
2930
let old_env = env::var_os("RUN_TEST_NEW_ENV");

‎src/test/ui/std-backtrace.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ fn main() {
2424
}
2525
}
2626

27+
#[allow(deprecated, deprecated_in_future)]
2728
fn runtest(me: &str) {
2829
env::remove_var("RUST_BACKTRACE");
2930
env::remove_var("RUST_LIB_BACKTRACE");

0 commit comments

Comments
 (0)
Please sign in to comment.