Skip to content

Commit cf5788d

Browse files
committed
Rename header -> directives
compiletest has confusingly two terminology to refer to the same concept -- "headers" and "directives". To make this more self-consistent and less confusing, stick with "directives" only. This commit **intentionally** tries to be limited to move-only (modulo some key usage reference renames) to help git history.
1 parent 085c247 commit cf5788d

File tree

12 files changed

+12
-12
lines changed

12 files changed

+12
-12
lines changed

src/tools/compiletest/src/header.rs renamed to src/tools/compiletest/src/directives.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ use crate::common::{Config, Debugger, FailMode, Mode, PassMode};
1313
use crate::debuggers::{extract_cdb_version, extract_gdb_version};
1414
use crate::errors::ErrorKind;
1515
use crate::executor::{CollectedTestDesc, ShouldPanic};
16-
use crate::header::auxiliary::{AuxProps, parse_and_update_aux};
17-
use crate::header::needs::CachedNeedsConditions;
16+
use crate::directives::auxiliary::{AuxProps, parse_and_update_aux};
17+
use crate::directives::needs::CachedNeedsConditions;
1818
use crate::help;
1919
use crate::util::static_regex;
2020

src/tools/compiletest/src/header/cfg.rs renamed to src/tools/compiletest/src/directives/cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::collections::HashSet;
22

33
use crate::common::{CompareMode, Config, Debugger};
4-
use crate::header::IgnoreDecision;
4+
use crate::directives::IgnoreDecision;
55

66
const EXTRA_ARCHS: &[&str] = &["spirv"];
77

src/tools/compiletest/src/header/needs.rs renamed to src/tools/compiletest/src/directives/needs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::common::{Config, KNOWN_CRATE_TYPES, KNOWN_TARGET_HAS_ATOMIC_WIDTHS, Sanitizer};
2-
use crate::header::{IgnoreDecision, llvm_has_libzstd};
2+
use crate::directives::{IgnoreDecision, llvm_has_libzstd};
33

44
pub(super) fn handle_needs(
55
cache: &CachedNeedsConditions,

src/tools/compiletest/src/header/tests.rs renamed to src/tools/compiletest/src/directives/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn make_test_description<R: Read>(
1919
) -> CollectedTestDesc {
2020
let cache = HeadersCache::load(config);
2121
let mut poisoned = false;
22-
let test = crate::header::make_test_description(
22+
let test = crate::directives::make_test_description(
2323
config,
2424
&cache,
2525
name,

src/tools/compiletest/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mod debuggers;
1414
pub mod diagnostics;
1515
pub mod errors;
1616
mod executor;
17-
pub mod header;
17+
pub mod directives;
1818
mod json;
1919
mod raise_fd_limit;
2020
mod read2;
@@ -37,13 +37,13 @@ use rayon::iter::{ParallelBridge, ParallelIterator};
3737
use tracing::debug;
3838
use walkdir::WalkDir;
3939

40-
use self::header::{EarlyProps, make_test_description};
40+
use self::directives::{EarlyProps, make_test_description};
4141
use crate::common::{
4242
CompareMode, Config, Debugger, Mode, PassMode, TestPaths, UI_EXTENSIONS, expected_output_path,
4343
output_base_dir, output_relative_path,
4444
};
4545
use crate::executor::{CollectedTest, ColorConfig, OutputFormat};
46-
use crate::header::HeadersCache;
46+
use crate::directives::HeadersCache;
4747
use crate::util::logv;
4848

4949
/// Creates the `Config` instance for this invocation of compiletest.
@@ -254,8 +254,8 @@ pub fn parse_config(args: Vec<String>) -> Config {
254254
Some(x) => panic!("argument for --color must be auto, always, or never, but found `{}`", x),
255255
};
256256
let llvm_version =
257-
matches.opt_str("llvm-version").as_deref().map(header::extract_llvm_version).or_else(
258-
|| header::extract_llvm_version_from_binary(&matches.opt_str("llvm-filecheck")?),
257+
matches.opt_str("llvm-version").as_deref().map(directives::extract_llvm_version).or_else(
258+
|| directives::extract_llvm_version_from_binary(&matches.opt_str("llvm-filecheck")?),
259259
);
260260

261261
let run_ignored = matches.opt_present("ignored");

src/tools/compiletest/src/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use crate::common::{
2424
};
2525
use crate::compute_diff::{DiffLine, make_diff, write_diff, write_filtered_diff};
2626
use crate::errors::{Error, ErrorKind, load_errors};
27-
use crate::header::TestProps;
27+
use crate::directives::TestProps;
2828
use crate::read2::{Truncated, read2_abbreviated};
2929
use crate::util::{Utf8PathBufExt, add_dylib_path, logv, static_regex};
3030
use crate::{ColorConfig, help, json, stamp_file_path, warning};

src/tools/rustdoc-gui-test/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::sync::Arc;
44
use std::{env, fs};
55

66
use build_helper::util::try_run;
7-
use compiletest::header::TestProps;
7+
use compiletest::directives::TestProps;
88
use config::Config;
99

1010
mod config;

0 commit comments

Comments
 (0)