Skip to content

Commit 1af256f

Browse files
committed
targets: move target specs to spec/targets
Signed-off-by: David Wood <david@davidtw.co>
1 parent 76aa83e commit 1af256f

File tree

231 files changed

+26
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+26
-26
lines changed

compiler/rustc_target/src/spec/aarch64_fuchsia.rs

Lines changed: 0 additions & 1 deletion
This file was deleted.

compiler/rustc_target/src/spec/base/apple/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::{
1+
use crate::spec::targets::{
22
aarch64_apple_darwin, aarch64_apple_ios_sim, aarch64_apple_watchos_sim, i686_apple_darwin,
33
x86_64_apple_darwin, x86_64_apple_ios, x86_64_apple_tvos, x86_64_apple_watchos_sim,
44
};

compiler/rustc_target/src/spec/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,14 +1408,16 @@ impl fmt::Display for StackProtector {
14081408

14091409
macro_rules! supported_targets {
14101410
( $(($triple:literal, $module:ident),)+ ) => {
1411-
$(mod $module;)+
1411+
mod targets {
1412+
$(pub(crate) mod $module;)+
1413+
}
14121414

14131415
/// List of supported targets
14141416
pub const TARGETS: &[&str] = &[$($triple),+];
14151417

14161418
fn load_builtin(target: &str) -> Option<Target> {
14171419
let mut t = match target {
1418-
$( $triple => $module::target(), )+
1420+
$( $triple => targets::$module::target(), )+
14191421
_ => return None,
14201422
};
14211423
t.is_builtin = true;
@@ -1431,7 +1433,7 @@ macro_rules! supported_targets {
14311433
$(
14321434
#[test] // `#[test]`
14331435
fn $module() {
1434-
tests_impl::test_target(super::$module::target());
1436+
tests_impl::test_target(crate::spec::targets::$module::target());
14351437
}
14361438
)+
14371439
}

0 commit comments

Comments
 (0)