diff options
| author | bors <bors@rust-lang.org> | 2023-11-08 18:33:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-08 18:33:23 +0000 |
| commit | 90fdc1fc270fef7d1a999207f1da29b41da70dac (patch) | |
| tree | c68b49e977a935d09c92c0eaaddd5209cfd32c39 | |
| parent | 341efb10174bdd22912aae487917c9213255b20f (diff) | |
| parent | 9d3c80248b955749a9a391c987bd4e1429e2a15b (diff) | |
| download | rust-90fdc1fc270fef7d1a999207f1da29b41da70dac.tar.gz rust-90fdc1fc270fef7d1a999207f1da29b41da70dac.zip | |
Auto merge of #117716 - GuillaumeGomez:rollup-83gnhll, r=GuillaumeGomez
Rollup of 5 pull requests Successful merges: - #117263 (handle the case when the change-id isn't found) - #117282 (Recover from incorrectly ordered/duplicated function keywords) - #117679 (tests/rustdoc-json: Avoid needless use of `no_core` and `lang_items`) - #117702 (target: move base and target specifications) - #117713 (Add test for reexported hidden item with `--document-hidden-items`) r? `@ghost` `@rustbot` modify labels: rollup
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 40 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/aarch64_fuchsia.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/abi/mod.rs (renamed from compiler/rustc_target/src/spec/abi.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/avr_unknown_gnu_atmega328.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/aix.rs (renamed from compiler/rustc_target/src/spec/aix_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/android.rs (renamed from compiler/rustc_target/src/spec/android_base.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/apple/mod.rs (renamed from compiler/rustc_target/src/spec/apple_base.rs) | 6 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/apple/tests.rs (renamed from compiler/rustc_target/src/spec/apple/tests.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/avr_gnu.rs (renamed from compiler/rustc_target/src/spec/avr_gnu_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/bpf.rs (renamed from compiler/rustc_target/src/spec/bpf_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/dragonfly.rs (renamed from compiler/rustc_target/src/spec/dragonfly_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/freebsd.rs (renamed from compiler/rustc_target/src/spec/freebsd_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/fuchsia.rs (renamed from compiler/rustc_target/src/spec/fuchsia_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/haiku.rs (renamed from compiler/rustc_target/src/spec/haiku_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/hermit.rs (renamed from compiler/rustc_target/src/spec/hermit_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/hurd.rs (renamed from compiler/rustc_target/src/spec/hurd_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/hurd_gnu.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/illumos.rs (renamed from compiler/rustc_target/src/spec/illumos_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/l4re.rs (renamed from compiler/rustc_target/src/spec/l4re_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/linux.rs (renamed from compiler/rustc_target/src/spec/linux_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/linux_gnu.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/linux_musl.rs (renamed from compiler/rustc_target/src/spec/linux_musl_base.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/linux_ohos.rs (renamed from compiler/rustc_target/src/spec/linux_ohos_base.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/linux_uclibc.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/mod.rs | 37 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/msvc.rs (renamed from compiler/rustc_target/src/spec/msvc_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/netbsd.rs (renamed from compiler/rustc_target/src/spec/netbsd_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/nto_qnx.rs (renamed from compiler/rustc_target/src/spec/nto_qnx_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/openbsd.rs (renamed from compiler/rustc_target/src/spec/openbsd_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/redox.rs (renamed from compiler/rustc_target/src/spec/redox_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/solaris.rs (renamed from compiler/rustc_target/src/spec/solaris_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/solid.rs (renamed from compiler/rustc_target/src/spec/solid_base.rs) | 3 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/teeos.rs (renamed from compiler/rustc_target/src/spec/teeos_base.rs) | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/thumb.rs (renamed from compiler/rustc_target/src/spec/thumb_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/uefi_msvc.rs (renamed from compiler/rustc_target/src/spec/uefi_msvc_base.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/unikraft_linux_musl.rs (renamed from compiler/rustc_target/src/spec/unikraft_linux_musl_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/vxworks.rs (renamed from compiler/rustc_target/src/spec/vxworks_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/wasm.rs (renamed from compiler/rustc_target/src/spec/wasm_base.rs) | 8 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/windows_gnu.rs (renamed from compiler/rustc_target/src/spec/windows_gnu_base.rs) | 10 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/windows_gnullvm.rs (renamed from compiler/rustc_target/src/spec/windows_gnullvm_base.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/windows_msvc.rs (renamed from compiler/rustc_target/src/spec/windows_msvc_base.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/windows_uwp_gnu.rs (renamed from compiler/rustc_target/src/spec/windows_uwp_gnu_base.rs) | 6 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/windows_uwp_msvc.rs (renamed from compiler/rustc_target/src/spec/windows_uwp_msvc_base.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/hurd_gnu_base.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/linux_gnu_base.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/linux_uclibc_base.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/mod.rs | 54 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_apple_darwin.rs (renamed from compiler/rustc_target/src/spec/aarch64_apple_darwin.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_apple_ios.rs (renamed from compiler/rustc_target/src/spec/aarch64_apple_ios.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_apple_ios_macabi.rs (renamed from compiler/rustc_target/src/spec/aarch64_apple_ios_macabi.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_apple_ios_sim.rs (renamed from compiler/rustc_target/src/spec/aarch64_apple_ios_sim.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_apple_tvos.rs (renamed from compiler/rustc_target/src/spec/aarch64_apple_tvos.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_apple_tvos_sim.rs (renamed from compiler/rustc_target/src/spec/aarch64_apple_tvos_sim.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_apple_watchos_sim.rs (renamed from compiler/rustc_target/src/spec/aarch64_apple_watchos_sim.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/aarch64_be_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu_ilp32.rs (renamed from compiler/rustc_target/src/spec/aarch64_be_unknown_linux_gnu_ilp32.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_be_unknown_netbsd.rs (renamed from compiler/rustc_target/src/spec/aarch64_be_unknown_netbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_fuchsia.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_kmc_solid_asp3.rs (renamed from compiler/rustc_target/src/spec/aarch64_kmc_solid_asp3.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_linux_android.rs (renamed from compiler/rustc_target/src/spec/aarch64_linux_android.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_nintendo_switch_freestanding.rs (renamed from compiler/rustc_target/src/spec/aarch64_nintendo_switch_freestanding.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_nintendo_switch_freestanding_linker_script.ld (renamed from compiler/rustc_target/src/spec/aarch64_nintendo_switch_freestanding_linker_script.ld) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_pc_windows_gnullvm.rs (renamed from compiler/rustc_target/src/spec/aarch64_pc_windows_gnullvm.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_pc_windows_msvc.rs (renamed from compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_freebsd.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_fuchsia.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_hermit.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu_ilp32.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu_ilp32.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_musl.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_linux_ohos.rs) | 7 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_netbsd.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_none.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_none.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_nto_qnx_710.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_nto_qnx_710.rs) | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_openbsd.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_redox.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_redox.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_teeos.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_teeos.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs (renamed from compiler/rustc_target/src/spec/aarch64_unknown_uefi.rs) | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_uwp_windows_msvc.rs (renamed from compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/aarch64_wrs_vxworks.rs (renamed from compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/arm64_32_apple_watchos.rs (renamed from compiler/rustc_target/src/spec/arm64_32_apple_watchos.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/arm_linux_androideabi.rs (renamed from compiler/rustc_target/src/spec/arm_linux_androideabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabi.rs (renamed from compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabihf.rs (renamed from compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabi.rs (renamed from compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabihf.rs (renamed from compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armeb_unknown_linux_gnueabi.rs (renamed from compiler/rustc_target/src/spec/armeb_unknown_linux_gnueabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs (renamed from compiler/rustc_target/src/spec/armebv7r_none_eabi.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs (renamed from compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv4t_none_eabi.rs (renamed from compiler/rustc_target/src/spec/armv4t_none_eabi.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv4t_unknown_linux_gnueabi.rs (renamed from compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv5te_none_eabi.rs (renamed from compiler/rustc_target/src/spec/armv5te_none_eabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_gnueabi.rs (renamed from compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_musleabi.rs (renamed from compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_uclibceabi.rs (renamed from compiler/rustc_target/src/spec/armv5te_unknown_linux_uclibceabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv6_unknown_freebsd.rs (renamed from compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv6_unknown_netbsd_eabihf.rs (renamed from compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv6k_nintendo_3ds.rs (renamed from compiler/rustc_target/src/spec/armv6k_nintendo_3ds.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7_linux_androideabi.rs (renamed from compiler/rustc_target/src/spec/armv7_linux_androideabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7_sony_vita_newlibeabihf.rs (renamed from compiler/rustc_target/src/spec/armv7_sony_vita_newlibeabihf.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7_unknown_freebsd.rs (renamed from compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabi.rs (renamed from compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabihf.rs (renamed from compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabi.rs (renamed from compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabihf.rs (renamed from compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7_unknown_linux_ohos.rs (renamed from compiler/rustc_target/src/spec/armv7_unknown_linux_ohos.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabi.rs (renamed from compiler/rustc_target/src/spec/armv7_unknown_linux_uclibceabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabihf.rs (renamed from compiler/rustc_target/src/spec/armv7_unknown_linux_uclibceabihf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7_unknown_netbsd_eabihf.rs (renamed from compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7_wrs_vxworks_eabihf.rs (renamed from compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabi.rs (renamed from compiler/rustc_target/src/spec/armv7a_kmc_solid_asp3_eabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabihf.rs (renamed from compiler/rustc_target/src/spec/armv7a_kmc_solid_asp3_eabihf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7a_none_eabi.rs (renamed from compiler/rustc_target/src/spec/armv7a_none_eabi.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7a_none_eabihf.rs (renamed from compiler/rustc_target/src/spec/armv7a_none_eabihf.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7k_apple_watchos.rs (renamed from compiler/rustc_target/src/spec/armv7k_apple_watchos.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs (renamed from compiler/rustc_target/src/spec/armv7r_none_eabi.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7r_none_eabihf.rs (renamed from compiler/rustc_target/src/spec/armv7r_none_eabihf.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/armv7s_apple_ios.rs (renamed from compiler/rustc_target/src/spec/armv7s_apple_ios.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/asmjs_unknown_emscripten.rs (renamed from compiler/rustc_target/src/spec/asmjs_unknown_emscripten.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/avr_unknown_gnu_atmega328.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/bpfeb_unknown_none.rs (renamed from compiler/rustc_target/src/spec/bpfeb_unknown_none.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/bpfel_unknown_none.rs (renamed from compiler/rustc_target/src/spec/bpfel_unknown_none.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2.rs (renamed from compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2hf.rs (renamed from compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2hf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/hexagon_unknown_linux_musl.rs (renamed from compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i386_apple_ios.rs (renamed from compiler/rustc_target/src/spec/i386_apple_ios.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i386_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/i386_unknown_linux_gnu.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i486_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/i486_unknown_linux_gnu.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i586_pc_nto_qnx700.rs (renamed from compiler/rustc_target/src/spec/i586_pc_nto_qnx700.rs) | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i586_pc_windows_msvc.rs (renamed from compiler/rustc_target/src/spec/i586_pc_windows_msvc.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i586_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/i586_unknown_linux_gnu.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i586_unknown_linux_musl.rs (renamed from compiler/rustc_target/src/spec/i586_unknown_linux_musl.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i586_unknown_netbsd.rs (renamed from compiler/rustc_target/src/spec/i586_unknown_netbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_apple_darwin.rs (renamed from compiler/rustc_target/src/spec/i686_apple_darwin.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_linux_android.rs (renamed from compiler/rustc_target/src/spec/i686_linux_android.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_pc_windows_gnu.rs (renamed from compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_pc_windows_gnullvm.rs (renamed from compiler/rustc_target/src/spec/i686_pc_windows_gnullvm.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_pc_windows_msvc.rs (renamed from compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_unknown_freebsd.rs (renamed from compiler/rustc_target/src/spec/i686_unknown_freebsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_unknown_haiku.rs (renamed from compiler/rustc_target/src/spec/i686_unknown_haiku.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_unknown_hurd_gnu.rs (renamed from compiler/rustc_target/src/spec/i686_unknown_hurd_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_unknown_linux_musl.rs (renamed from compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_unknown_netbsd.rs (renamed from compiler/rustc_target/src/spec/i686_unknown_netbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_unknown_openbsd.rs (renamed from compiler/rustc_target/src/spec/i686_unknown_openbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_unknown_uefi.rs (renamed from compiler/rustc_target/src/spec/i686_unknown_uefi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_uwp_windows_gnu.rs (renamed from compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_uwp_windows_msvc.rs (renamed from compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_wrs_vxworks.rs (renamed from compiler/rustc_target/src/spec/i686_wrs_vxworks.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/loongarch64_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs (renamed from compiler/rustc_target/src/spec/loongarch64_unknown_none.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs (renamed from compiler/rustc_target/src/spec/loongarch64_unknown_none_softfloat.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/m68k_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/m68k_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs (renamed from compiler/rustc_target/src/spec/mips64_openwrt_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mips64_unknown_linux_gnuabi64.rs (renamed from compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mips64_unknown_linux_muslabi64.rs (renamed from compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_gnuabi64.rs (renamed from compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_muslabi64.rs (renamed from compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mips_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mips_unknown_linux_musl.rs (renamed from compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mips_unknown_linux_uclibc.rs (renamed from compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mipsel_sony_psp.rs (renamed from compiler/rustc_target/src/spec/mipsel_sony_psp.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mipsel_sony_psp_linker_script.ld (renamed from compiler/rustc_target/src/spec/mipsel_sony_psp_linker_script.ld) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mipsel_sony_psx.rs (renamed from compiler/rustc_target/src/spec/mipsel_sony_psx.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_musl.rs (renamed from compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_uclibc.rs (renamed from compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mipsel_unknown_netbsd.rs (renamed from compiler/rustc_target/src/spec/mipsel_unknown_netbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mipsel_unknown_none.rs (renamed from compiler/rustc_target/src/spec/mipsel_unknown_none.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mipsisa32r6_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mipsisa32r6el_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mipsisa64r6_unknown_linux_gnuabi64.rs (renamed from compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/mipsisa64r6el_unknown_linux_gnuabi64.rs (renamed from compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/msp430_none_elf.rs (renamed from compiler/rustc_target/src/spec/msp430_none_elf.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/nvptx64_nvidia_cuda.rs (renamed from compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc64_ibm_aix.rs (renamed from compiler/rustc_target/src/spec/powerpc64_ibm_aix.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc64_unknown_freebsd.rs (renamed from compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_musl.rs (renamed from compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc64_unknown_openbsd.rs (renamed from compiler/rustc_target/src/spec/powerpc64_unknown_openbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc64_wrs_vxworks.rs (renamed from compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc64le_unknown_freebsd.rs (renamed from compiler/rustc_target/src/spec/powerpc64le_unknown_freebsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_musl.rs (renamed from compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc_unknown_freebsd.rs (renamed from compiler/rustc_target/src/spec/powerpc_unknown_freebsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnuspe.rs (renamed from compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_musl.rs (renamed from compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc_unknown_netbsd.rs (renamed from compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc_unknown_openbsd.rs (renamed from compiler/rustc_target/src/spec/powerpc_unknown_openbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks.rs (renamed from compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks_spe.rs (renamed from compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs (renamed from compiler/rustc_target/src/spec/riscv32gc_unknown_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv32i_unknown_none_elf.rs (renamed from compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv32im_unknown_none_elf.rs (renamed from compiler/rustc_target/src/spec/riscv32im_unknown_none_elf.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv32imac_esp_espidf.rs (renamed from compiler/rustc_target/src/spec/riscv32imac_esp_espidf.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv32imac_unknown_none_elf.rs (renamed from compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv32imac_unknown_xous_elf.rs (renamed from compiler/rustc_target/src/spec/riscv32imac_unknown_xous_elf.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv32imc_esp_espidf.rs (renamed from compiler/rustc_target/src/spec/riscv32imc_esp_espidf.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv32imc_unknown_none_elf.rs (renamed from compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs (renamed from compiler/rustc_target/src/spec/riscv64_linux_android.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv64gc_unknown_freebsd.rs (renamed from compiler/rustc_target/src/spec/riscv64gc_unknown_freebsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv64gc_unknown_fuchsia.rs (renamed from compiler/rustc_target/src/spec/riscv64gc_unknown_fuchsia.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv64gc_unknown_hermit.rs (renamed from compiler/rustc_target/src/spec/riscv64gc_unknown_hermit.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs (renamed from compiler/rustc_target/src/spec/riscv64gc_unknown_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv64gc_unknown_netbsd.rs (renamed from compiler/rustc_target/src/spec/riscv64gc_unknown_netbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv64gc_unknown_none_elf.rs (renamed from compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs) | 3 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv64gc_unknown_openbsd.rs (renamed from compiler/rustc_target/src/spec/riscv64gc_unknown_openbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/riscv64imac_unknown_none_elf.rs (renamed from compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/s390x_unknown_linux_musl.rs (renamed from compiler/rustc_target/src/spec/s390x_unknown_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/sparc64_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/sparc64_unknown_netbsd.rs (renamed from compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/sparc64_unknown_openbsd.rs (renamed from compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/sparc_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/sparc_unknown_none_elf.rs (renamed from compiler/rustc_target/src/spec/sparc_unknown_none_elf.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/sparcv9_sun_solaris.rs (renamed from compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv4t_none_eabi.rs (renamed from compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv5te_none_eabi.rs (renamed from compiler/rustc_target/src/spec/thumbv5te_none_eabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv6m_none_eabi.rs (renamed from compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv7a_pc_windows_msvc.rs (renamed from compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv7a_uwp_windows_msvc.rs (renamed from compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv7em_none_eabi.rs (renamed from compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv7em_none_eabihf.rs (renamed from compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv7m_none_eabi.rs (renamed from compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv7neon_linux_androideabi.rs (renamed from compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_gnueabihf.rs (renamed from compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_musleabihf.rs (renamed from compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv8m_base_none_eabi.rs (renamed from compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabi.rs (renamed from compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabihf.rs (renamed from compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/wasm32_unknown_emscripten.rs (renamed from compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs) | 7 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/wasm32_unknown_unknown.rs (renamed from compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/wasm32_wasi.rs (renamed from compiler/rustc_target/src/spec/wasm32_wasi.rs) | 8 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/wasm32_wasi_preview1_threads.rs (renamed from compiler/rustc_target/src/spec/wasm32_wasi_preview1_threads.rs) | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/wasm64_unknown_unknown.rs (renamed from compiler/rustc_target/src/spec/wasm64_unknown_unknown.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs (renamed from compiler/rustc_target/src/spec/x86_64_apple_darwin.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_apple_ios.rs (renamed from compiler/rustc_target/src/spec/x86_64_apple_ios.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_apple_ios_macabi.rs (renamed from compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_apple_tvos.rs (renamed from compiler/rustc_target/src/spec/x86_64_apple_tvos.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_apple_watchos_sim.rs (renamed from compiler/rustc_target/src/spec/x86_64_apple_watchos_sim.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_fortanix_unknown_sgx.rs (renamed from compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_fuchsia.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_linux_android.rs (renamed from compiler/rustc_target/src/spec/x86_64_linux_android.rs) | 6 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_pc_nto_qnx710.rs (renamed from compiler/rustc_target/src/spec/x86_64_pc_nto_qnx710.rs) | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_pc_solaris.rs (renamed from compiler/rustc_target/src/spec/x86_64_pc_solaris.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnu.rs (renamed from compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnullvm.rs (renamed from compiler/rustc_target/src/spec/x86_64_pc_windows_gnullvm.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_pc_windows_msvc.rs (renamed from compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_sun_solaris.rs (renamed from compiler/rustc_target/src/spec/x86_64_sun_solaris.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unikraft_linux_musl.rs (renamed from compiler/rustc_target/src/spec/x86_64_unikraft_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_dragonfly.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_freebsd.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_fuchsia.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_fuchsia.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_haiku.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_hermit.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_illumos.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_l4re_uclibc.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnux32.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_musl.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_ohos.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_linux_ohos.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_netbsd.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs) | 6 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_none.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_openbsd.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_redox.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_redox.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs (renamed from compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs) | 7 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_gnu.rs (renamed from compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_msvc.rs (renamed from compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_wrs_vxworks.rs (renamed from compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs) | 4 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64h_apple_darwin.rs (renamed from compiler/rustc_target/src/spec/x86_64h_apple_darwin.rs) | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/x86_64_fuchsia.rs | 1 | ||||
| -rw-r--r-- | src/bootstrap/src/bin/main.rs | 40 | ||||
| -rw-r--r-- | src/bootstrap/src/lib.rs | 24 | ||||
| -rw-r--r-- | tests/rustdoc-json/doc_hidden_failure.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/enums/field_hidden.rs | 6 | ||||
| -rw-r--r-- | tests/rustdoc-json/enums/kind.rs | 6 | ||||
| -rw-r--r-- | tests/rustdoc-json/enums/tuple_fields_hidden.rs | 6 | ||||
| -rw-r--r-- | tests/rustdoc-json/enums/use_glob.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/enums/use_variant.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/fn_pointer/generics.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/fns/extern_c_variadic.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/fns/generic_args.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/fns/generic_returns.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/fns/generics.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/generic-associated-types/gats.rs | 9 | ||||
| -rw-r--r-- | tests/rustdoc-json/glob_import.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/impls/impl_item_visibility.rs | 7 | ||||
| -rw-r--r-- | tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs | 6 | ||||
| -rw-r--r-- | tests/rustdoc-json/impls/impl_item_visibility_show_private.rs | 6 | ||||
| -rw-r--r-- | tests/rustdoc-json/impls/import_from_private.rs | 14 | ||||
| -rw-r--r-- | tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-2.rs | 8 | ||||
| -rw-r--r-- | tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id.rs | 12 | ||||
| -rw-r--r-- | tests/rustdoc-json/impls/local_for_local.rs | 5 | ||||
| -rw-r--r-- | tests/rustdoc-json/impls/local_for_local_primitive.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc-json/lifetime/longest.rs | 9 | ||||
| -rw-r--r-- | tests/rustdoc-json/lifetime/outlives.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/methods/abi.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc-json/non_lifetime_binders.rs | 11 | ||||
| -rw-r--r-- | tests/rustdoc-json/primitives/primitive_overloading.rs | 6 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/export_extern_crate_as_self.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/glob_collision.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/glob_extern.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/glob_private.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/in_root_and_mod.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/in_root_and_mod_pub.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/macro.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/mod_not_included.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/private_twice_one_inline.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/private_two_names.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/pub_use_doc_hidden.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/reexport_of_hidden.rs | 10 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/rename_private.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/rename_public.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/same_name_different_types.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/simple_private.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/simple_public.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/return_private.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/stripped_modules.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-json/traits/implementors.rs | 29 | ||||
| -rw-r--r-- | tests/rustdoc-json/traits/private_supertrait.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc-json/traits/supertrait.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc-json/type/inherent_associated_type.rs | 2 | ||||
| -rw-r--r-- | tests/ui/async-await/no-async-const.rs | 1 | ||||
| -rw-r--r-- | tests/ui/async-await/no-async-const.stderr | 11 | ||||
| -rw-r--r-- | tests/ui/async-await/no-unsafe-async.rs | 2 | ||||
| -rw-r--r-- | tests/ui/async-await/no-unsafe-async.stderr | 5 | ||||
| -rw-r--r-- | tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs | 5 | ||||
| -rw-r--r-- | tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.stderr | 11 | ||||
| -rw-r--r-- | tests/ui/parser/issues/issue-87217-keyword-order/recovery.rs | 22 | ||||
| -rw-r--r-- | tests/ui/parser/issues/issue-87217-keyword-order/recovery.stderr | 28 | ||||
| -rw-r--r-- | tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs | 5 | ||||
| -rw-r--r-- | tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.stderr | 11 | ||||
| -rw-r--r-- | tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs | 2 | ||||
| -rw-r--r-- | tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs | 2 | ||||
| -rw-r--r-- | tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs | 2 |
341 files changed, 706 insertions, 712 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index 65d41ea19fd..801860c2123 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -2401,22 +2401,39 @@ impl<'a> Parser<'a> { Misplaced(Span), } + // We may be able to recover + let mut recover_constness = constness; + let mut recover_asyncness = asyncness; + let mut recover_unsafety = unsafety; // This will allow the machine fix to directly place the keyword in the correct place or to indicate // that the keyword is already present and the second instance should be removed. let wrong_kw = if self.check_keyword(kw::Const) { match constness { Const::Yes(sp) => Some(WrongKw::Duplicated(sp)), - Const::No => Some(WrongKw::Misplaced(async_start_sp)), + Const::No => { + recover_constness = Const::Yes(self.token.span); + Some(WrongKw::Misplaced(async_start_sp)) + } } } else if self.check_keyword(kw::Async) { match asyncness { Async::Yes { span, .. } => Some(WrongKw::Duplicated(span)), - Async::No => Some(WrongKw::Misplaced(unsafe_start_sp)), + Async::No => { + recover_asyncness = Async::Yes { + span: self.token.span, + closure_id: DUMMY_NODE_ID, + return_impl_trait_id: DUMMY_NODE_ID, + }; + Some(WrongKw::Misplaced(unsafe_start_sp)) + } } } else if self.check_keyword(kw::Unsafe) { match unsafety { Unsafe::Yes(sp) => Some(WrongKw::Duplicated(sp)), - Unsafe::No => Some(WrongKw::Misplaced(ext_start_sp)), + Unsafe::No => { + recover_unsafety = Unsafe::Yes(self.token.span); + Some(WrongKw::Misplaced(ext_start_sp)) + } } } else { None @@ -2486,6 +2503,23 @@ impl<'a> Parser<'a> { } } } + + if wrong_kw.is_some() + && self.may_recover() + && self.look_ahead(1, |tok| tok.is_keyword_case(kw::Fn, case)) + { + // Advance past the misplaced keyword and `fn` + self.bump(); + self.bump(); + err.emit(); + return Ok(FnHeader { + constness: recover_constness, + unsafety: recover_unsafety, + asyncness: recover_asyncness, + ext, + }); + } + return Err(err); } } diff --git a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs deleted file mode 100644 index ddecbb1a8c4..00000000000 --- a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs +++ /dev/null @@ -1 +0,0 @@ -pub use crate::spec::aarch64_unknown_fuchsia::target; diff --git a/compiler/rustc_target/src/spec/abi.rs b/compiler/rustc_target/src/spec/abi/mod.rs index 4c1f0c01a04..4c1f0c01a04 100644 --- a/compiler/rustc_target/src/spec/abi.rs +++ b/compiler/rustc_target/src/spec/abi/mod.rs diff --git a/compiler/rustc_target/src/spec/avr_unknown_gnu_atmega328.rs b/compiler/rustc_target/src/spec/avr_unknown_gnu_atmega328.rs deleted file mode 100644 index 6c16b03cc28..00000000000 --- a/compiler/rustc_target/src/spec/avr_unknown_gnu_atmega328.rs +++ /dev/null @@ -1,5 +0,0 @@ -use crate::spec::Target; - -pub fn target() -> Target { - super::avr_gnu_base::target("atmega328", "-mmcu=atmega328") -} diff --git a/compiler/rustc_target/src/spec/aix_base.rs b/compiler/rustc_target/src/spec/base/aix.rs index c71c4ba2cc9..c71c4ba2cc9 100644 --- a/compiler/rustc_target/src/spec/aix_base.rs +++ b/compiler/rustc_target/src/spec/base/aix.rs diff --git a/compiler/rustc_target/src/spec/android_base.rs b/compiler/rustc_target/src/spec/base/android.rs index 9c1df1a0677..af15c16a5a9 100644 --- a/compiler/rustc_target/src/spec/android_base.rs +++ b/compiler/rustc_target/src/spec/base/android.rs @@ -1,7 +1,7 @@ -use crate::spec::{SanitizerSet, TargetOptions}; +use crate::spec::{base, SanitizerSet, TargetOptions}; pub fn opts() -> TargetOptions { - let mut base = super::linux_base::opts(); + let mut base = base::linux::opts(); base.os = "android".into(); base.is_like_android = true; base.default_dwarf_version = 2; diff --git a/compiler/rustc_target/src/spec/apple_base.rs b/compiler/rustc_target/src/spec/base/apple/mod.rs index 7a666eea437..99e64503e25 100644 --- a/compiler/rustc_target/src/spec/apple_base.rs +++ b/compiler/rustc_target/src/spec/base/apple/mod.rs @@ -1,10 +1,10 @@ use std::{borrow::Cow, env}; +use crate::spec::{add_link_args, add_link_args_iter}; use crate::spec::{cvs, Cc, DebuginfoKind, FramePointer, LinkArgs}; use crate::spec::{LinkerFlavor, Lld, SplitDebuginfo, StaticCow, Target, TargetOptions}; #[cfg(test)] -#[path = "apple/tests.rs"] mod tests; use Arch::*; @@ -102,13 +102,13 @@ fn pre_link_args(os: &'static str, arch: Arch, abi: &'static str) -> LinkArgs { LinkerFlavor::Darwin(Cc::No, Lld::No), &["-arch", arch, "-platform_version"], ); - super::add_link_args_iter( + add_link_args_iter( &mut args, LinkerFlavor::Darwin(Cc::No, Lld::No), [platform_name, platform_version.clone(), platform_version].into_iter(), ); if abi != "macabi" { - super::add_link_args(&mut args, LinkerFlavor::Darwin(Cc::Yes, Lld::No), &["-arch", arch]); + add_link_args(&mut args, LinkerFlavor::Darwin(Cc::Yes, Lld::No), &["-arch", arch]); } args diff --git a/compiler/rustc_target/src/spec/apple/tests.rs b/compiler/rustc_target/src/spec/base/apple/tests.rs index 3b23ddadcc4..f13058ebc82 100644 --- a/compiler/rustc_target/src/spec/apple/tests.rs +++ b/compiler/rustc_target/src/spec/base/apple/tests.rs @@ -1,4 +1,4 @@ -use crate::spec::{ +use crate::spec::targets::{ aarch64_apple_darwin, aarch64_apple_ios_sim, aarch64_apple_watchos_sim, i686_apple_darwin, x86_64_apple_darwin, x86_64_apple_ios, x86_64_apple_tvos, x86_64_apple_watchos_sim, }; diff --git a/compiler/rustc_target/src/spec/avr_gnu_base.rs b/compiler/rustc_target/src/spec/base/avr_gnu.rs index cd324c94bbe..cd324c94bbe 100644 --- a/compiler/rustc_target/src/spec/avr_gnu_base.rs +++ b/compiler/rustc_target/src/spec/base/avr_gnu.rs diff --git a/compiler/rustc_target/src/spec/bpf_base.rs b/compiler/rustc_target/src/spec/base/bpf.rs index 4d03747d016..4d03747d016 100644 --- a/compiler/rustc_target/src/spec/bpf_base.rs +++ b/compiler/rustc_target/src/spec/base/bpf.rs diff --git a/compiler/rustc_target/src/spec/dragonfly_base.rs b/compiler/rustc_target/src/spec/base/dragonfly.rs index de2be781796..de2be781796 100644 --- a/compiler/rustc_target/src/spec/dragonfly_base.rs +++ b/compiler/rustc_target/src/spec/base/dragonfly.rs diff --git a/compiler/rustc_target/src/spec/freebsd_base.rs b/compiler/rustc_target/src/spec/base/freebsd.rs index 8c141aaaec3..8c141aaaec3 100644 --- a/compiler/rustc_target/src/spec/freebsd_base.rs +++ b/compiler/rustc_target/src/spec/base/freebsd.rs diff --git a/compiler/rustc_target/src/spec/fuchsia_base.rs b/compiler/rustc_target/src/spec/base/fuchsia.rs index 4c2775850d1..4c2775850d1 100644 --- a/compiler/rustc_target/src/spec/fuchsia_base.rs +++ b/compiler/rustc_target/src/spec/base/fuchsia.rs diff --git a/compiler/rustc_target/src/spec/haiku_base.rs b/compiler/rustc_target/src/spec/base/haiku.rs index 8ab874410aa..8ab874410aa 100644 --- a/compiler/rustc_target/src/spec/haiku_base.rs +++ b/compiler/rustc_target/src/spec/base/haiku.rs diff --git a/compiler/rustc_target/src/spec/hermit_base.rs b/compiler/rustc_target/src/spec/base/hermit.rs index c6e98fc1a11..c6e98fc1a11 100644 --- a/compiler/rustc_target/src/spec/hermit_base.rs +++ b/compiler/rustc_target/src/spec/base/hermit.rs diff --git a/compiler/rustc_target/src/spec/hurd_base.rs b/compiler/rustc_target/src/spec/base/hurd.rs index 76f8223c0e4..76f8223c0e4 100644 --- a/compiler/rustc_target/src/spec/hurd_base.rs +++ b/compiler/rustc_target/src/spec/base/hurd.rs diff --git a/compiler/rustc_target/src/spec/base/hurd_gnu.rs b/compiler/rustc_target/src/spec/base/hurd_gnu.rs new file mode 100644 index 00000000000..3501dbdea1b --- /dev/null +++ b/compiler/rustc_target/src/spec/base/hurd_gnu.rs @@ -0,0 +1,5 @@ +use crate::spec::{base, TargetOptions}; + +pub fn opts() -> TargetOptions { + TargetOptions { env: "gnu".into(), ..base::hurd::opts() } +} diff --git a/compiler/rustc_target/src/spec/illumos_base.rs b/compiler/rustc_target/src/spec/base/illumos.rs index e63e789752b..e63e789752b 100644 --- a/compiler/rustc_target/src/spec/illumos_base.rs +++ b/compiler/rustc_target/src/spec/base/illumos.rs diff --git a/compiler/rustc_target/src/spec/l4re_base.rs b/compiler/rustc_target/src/spec/base/l4re.rs index 3a4d83fad17..3a4d83fad17 100644 --- a/compiler/rustc_target/src/spec/l4re_base.rs +++ b/compiler/rustc_target/src/spec/base/l4re.rs diff --git a/compiler/rustc_target/src/spec/linux_base.rs b/compiler/rustc_target/src/spec/base/linux.rs index df8e848124a..df8e848124a 100644 --- a/compiler/rustc_target/src/spec/linux_base.rs +++ b/compiler/rustc_target/src/spec/base/linux.rs diff --git a/compiler/rustc_target/src/spec/base/linux_gnu.rs b/compiler/rustc_target/src/spec/base/linux_gnu.rs new file mode 100644 index 00000000000..3491277c440 --- /dev/null +++ b/compiler/rustc_target/src/spec/base/linux_gnu.rs @@ -0,0 +1,5 @@ +use crate::spec::{base, TargetOptions}; + +pub fn opts() -> TargetOptions { + TargetOptions { env: "gnu".into(), ..base::linux::opts() } +} diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/base/linux_musl.rs index b698bcbcef6..5117cadbee0 100644 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs +++ b/compiler/rustc_target/src/spec/base/linux_musl.rs @@ -1,8 +1,8 @@ use crate::spec::crt_objects; -use crate::spec::{LinkSelfContainedDefault, TargetOptions}; +use crate::spec::{base, LinkSelfContainedDefault, TargetOptions}; pub fn opts() -> TargetOptions { - let mut base = super::linux_base::opts(); + let mut base = base::linux::opts(); base.env = "musl".into(); base.pre_link_objects_self_contained = crt_objects::pre_musl_self_contained(); diff --git a/compiler/rustc_target/src/spec/linux_ohos_base.rs b/compiler/rustc_target/src/spec/base/linux_ohos.rs index 4ad4c837336..273e6a98dd4 100644 --- a/compiler/rustc_target/src/spec/linux_ohos_base.rs +++ b/compiler/rustc_target/src/spec/base/linux_ohos.rs @@ -1,7 +1,7 @@ -use crate::spec::TargetOptions; +use crate::spec::{base, TargetOptions}; pub fn opts() -> TargetOptions { - let mut base = super::linux_base::opts(); + let mut base = base::linux::opts(); base.env = "ohos".into(); base.crt_static_default = false; diff --git a/compiler/rustc_target/src/spec/base/linux_uclibc.rs b/compiler/rustc_target/src/spec/base/linux_uclibc.rs new file mode 100644 index 00000000000..540344e9e94 --- /dev/null +++ b/compiler/rustc_target/src/spec/base/linux_uclibc.rs @@ -0,0 +1,5 @@ +use crate::spec::{base, TargetOptions}; + +pub fn opts() -> TargetOptions { + TargetOptions { env: "uclibc".into(), ..base::linux::opts() } +} diff --git a/compiler/rustc_target/src/spec/base/mod.rs b/compiler/rustc_target/src/spec/base/mod.rs new file mode 100644 index 00000000000..d137aaa5358 --- /dev/null +++ b/compiler/rustc_target/src/spec/base/mod.rs @@ -0,0 +1,37 @@ +pub(crate) mod aix; +pub(crate) mod android; +pub(crate) mod apple; +pub(crate) mod avr_gnu; +pub(crate) mod bpf; +pub(crate) mod dragonfly; +pub(crate) mod freebsd; +pub(crate) mod fuchsia; +pub(crate) mod haiku; +pub(crate) mod hermit; +pub(crate) mod hurd; +pub(crate) mod hurd_gnu; +pub(crate) mod illumos; +pub(crate) mod l4re; +pub(crate) mod linux; +pub(crate) mod linux_gnu; +pub(crate) mod linux_musl; +pub(crate) mod linux_ohos; +pub(crate) mod linux_uclibc; +pub(crate) mod msvc; +pub(crate) mod netbsd; +pub(crate) mod nto_qnx; +pub(crate) mod openbsd; +pub(crate) mod redox; +pub(crate) mod solaris; +pub(crate) mod solid; +pub(crate) mod teeos; +pub(crate) mod thumb; +pub(crate) mod uefi_msvc; +pub(crate) mod unikraft_linux_musl; +pub(crate) mod vxworks; +pub(crate) mod wasm; +pub(crate) mod windows_gnu; +pub(crate) mod windows_gnullvm; +pub(crate) mod windows_msvc; +pub(crate) mod windows_uwp_gnu; +pub(crate) mod windows_uwp_msvc; diff --git a/compiler/rustc_target/src/spec/msvc_base.rs b/compiler/rustc_target/src/spec/base/msvc.rs index efe949a4e90..efe949a4e90 100644 --- a/compiler/rustc_target/src/spec/msvc_base.rs +++ b/compiler/rustc_target/src/spec/base/msvc.rs diff --git a/compiler/rustc_target/src/spec/netbsd_base.rs b/compiler/rustc_target/src/spec/base/netbsd.rs index be94ea23465..be94ea23465 100644 --- a/compiler/rustc_target/src/spec/netbsd_base.rs +++ b/compiler/rustc_target/src/spec/base/netbsd.rs diff --git a/compiler/rustc_target/src/spec/nto_qnx_base.rs b/compiler/rustc_target/src/spec/base/nto_qnx.rs index f1405e9b446..f1405e9b446 100644 --- a/compiler/rustc_target/src/spec/nto_qnx_base.rs +++ b/compiler/rustc_target/src/spec/base/nto_qnx.rs diff --git a/compiler/rustc_target/src/spec/openbsd_base.rs b/compiler/rustc_target/src/spec/base/openbsd.rs index e7db14e05a4..e7db14e05a4 100644 --- a/compiler/rustc_target/src/spec/openbsd_base.rs +++ b/compiler/rustc_target/src/spec/base/openbsd.rs diff --git a/compiler/rustc_target/src/spec/redox_base.rs b/compiler/rustc_target/src/spec/base/redox.rs index 468fe478549..468fe478549 100644 --- a/compiler/rustc_target/src/spec/redox_base.rs +++ b/compiler/rustc_target/src/spec/base/redox.rs diff --git a/compiler/rustc_target/src/spec/solaris_base.rs b/compiler/rustc_target/src/spec/base/solaris.rs index f97cdb4fb28..f97cdb4fb28 100644 --- a/compiler/rustc_target/src/spec/solaris_base.rs +++ b/compiler/rustc_target/src/spec/base/solaris.rs diff --git a/compiler/rustc_target/src/spec/solid_base.rs b/compiler/rustc_target/src/spec/base/solid.rs index eaf72b7616c..ce4a8869001 100644 --- a/compiler/rustc_target/src/spec/solid_base.rs +++ b/compiler/rustc_target/src/spec/base/solid.rs @@ -1,5 +1,4 @@ -use super::FramePointer; -use crate::spec::TargetOptions; +use crate::spec::{FramePointer, TargetOptions}; pub fn opts(kernel: &str) -> TargetOptions { TargetOptions { diff --git a/compiler/rustc_target/src/spec/teeos_base.rs b/compiler/rustc_target/src/spec/base/teeos.rs index 1bc71bab016..38d0a6d7314 100644 --- a/compiler/rustc_target/src/spec/teeos_base.rs +++ b/compiler/rustc_target/src/spec/base/teeos.rs @@ -1,12 +1,11 @@ -use super::{Cc, LinkerFlavor, Lld, PanicStrategy}; -use crate::spec::{RelroLevel, TargetOptions}; +use crate::spec::{add_link_args, Cc, LinkerFlavor, Lld, PanicStrategy, RelroLevel, TargetOptions}; pub fn opts() -> TargetOptions { let lld_args = &["-zmax-page-size=4096", "-znow", "-ztext", "--execute-only"]; let cc_args = &["-Wl,-zmax-page-size=4096", "-Wl,-znow", "-Wl,-ztext", "-mexecute-only"]; let mut pre_link_args = TargetOptions::link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), lld_args); - super::add_link_args(&mut pre_link_args, LinkerFlavor::Gnu(Cc::Yes, Lld::No), cc_args); + add_link_args(&mut pre_link_args, LinkerFlavor::Gnu(Cc::Yes, Lld::No), cc_args); TargetOptions { os: "teeos".into(), diff --git a/compiler/rustc_target/src/spec/thumb_base.rs b/compiler/rustc_target/src/spec/base/thumb.rs index 0decfecb4cd..0decfecb4cd 100644 --- a/compiler/rustc_target/src/spec/thumb_base.rs +++ b/compiler/rustc_target/src/spec/base/thumb.rs diff --git a/compiler/rustc_target/src/spec/uefi_msvc_base.rs b/compiler/rustc_target/src/spec/base/uefi_msvc.rs index a50a55ad7e0..e8acd6078e2 100644 --- a/compiler/rustc_target/src/spec/uefi_msvc_base.rs +++ b/compiler/rustc_target/src/spec/base/uefi_msvc.rs @@ -9,10 +9,10 @@ // the timer-interrupt. Device-drivers are required to use polling-based models. Furthermore, all // code runs in the same environment, no process separation is supported. -use crate::spec::{LinkerFlavor, Lld, PanicStrategy, StackProbeType, TargetOptions}; +use crate::spec::{base, LinkerFlavor, Lld, PanicStrategy, StackProbeType, TargetOptions}; pub fn opts() -> TargetOptions { - let mut base = super::msvc_base::opts(); + let mut base = base::msvc::opts(); base.add_pre_link_args( LinkerFlavor::Msvc(Lld::No), diff --git a/compiler/rustc_target/src/spec/unikraft_linux_musl_base.rs b/compiler/rustc_target/src/spec/base/unikraft_linux_musl.rs index 9ccd0a1e7ca..9ccd0a1e7ca 100644 --- a/compiler/rustc_target/src/spec/unikraft_linux_musl_base.rs +++ b/compiler/rustc_target/src/spec/base/unikraft_linux_musl.rs diff --git a/compiler/rustc_target/src/spec/vxworks_base.rs b/compiler/rustc_target/src/spec/base/vxworks.rs index aa4784b63e7..aa4784b63e7 100644 --- a/compiler/rustc_target/src/spec/vxworks_base.rs +++ b/compiler/rustc_target/src/spec/base/vxworks.rs diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/base/wasm.rs index 82a3afeae31..87ade9e58cf 100644 --- a/compiler/rustc_target/src/spec/wasm_base.rs +++ b/compiler/rustc_target/src/spec/base/wasm.rs @@ -1,5 +1,7 @@ -use super::LinkSelfContainedDefault; -use super::{cvs, Cc, LinkerFlavor, PanicStrategy, RelocModel, TargetOptions, TlsModel}; +use crate::spec::{ + add_link_args, cvs, Cc, LinkSelfContainedDefault, LinkerFlavor, PanicStrategy, RelocModel, + TargetOptions, TlsModel, +}; pub fn options() -> TargetOptions { macro_rules! args { @@ -50,7 +52,7 @@ pub fn options() -> TargetOptions { } let mut pre_link_args = TargetOptions::link_args(LinkerFlavor::WasmLld(Cc::No), args!("")); - super::add_link_args(&mut pre_link_args, LinkerFlavor::WasmLld(Cc::Yes), args!("-Wl,")); + add_link_args(&mut pre_link_args, LinkerFlavor::WasmLld(Cc::Yes), args!("-Wl,")); TargetOptions { is_like_wasm: true, diff --git a/compiler/rustc_target/src/spec/windows_gnu_base.rs b/compiler/rustc_target/src/spec/base/windows_gnu.rs index b84e0fc0783..25f02dc1451 100644 --- a/compiler/rustc_target/src/spec/windows_gnu_base.rs +++ b/compiler/rustc_target/src/spec/base/windows_gnu.rs @@ -1,5 +1,5 @@ -use crate::spec::crt_objects; use crate::spec::LinkSelfContainedDefault; +use crate::spec::{add_link_args, crt_objects}; use crate::spec::{cvs, Cc, DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo, TargetOptions}; use std::borrow::Cow; @@ -13,7 +13,7 @@ pub fn opts() -> TargetOptions { "--disable-auto-image-base", ], ); - super::add_link_args( + add_link_args( &mut pre_link_args, LinkerFlavor::Gnu(Cc::Yes, Lld::No), &[ @@ -45,14 +45,14 @@ pub fn opts() -> TargetOptions { ]; let mut late_link_args = TargetOptions::link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), mingw_libs); - super::add_link_args(&mut late_link_args, LinkerFlavor::Gnu(Cc::Yes, Lld::No), mingw_libs); + add_link_args(&mut late_link_args, LinkerFlavor::Gnu(Cc::Yes, Lld::No), mingw_libs); // If any of our crates are dynamically linked then we need to use // the shared libgcc_s-dw2-1.dll. This is required to support // unwinding across DLL boundaries. let dynamic_unwind_libs = &["-lgcc_s"]; let mut late_link_args_dynamic = TargetOptions::link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), dynamic_unwind_libs); - super::add_link_args( + add_link_args( &mut late_link_args_dynamic, LinkerFlavor::Gnu(Cc::Yes, Lld::No), dynamic_unwind_libs, @@ -65,7 +65,7 @@ pub fn opts() -> TargetOptions { let static_unwind_libs = &["-lgcc_eh", "-l:libpthread.a"]; let mut late_link_args_static = TargetOptions::link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), static_unwind_libs); - super::add_link_args( + add_link_args( &mut late_link_args_static, LinkerFlavor::Gnu(Cc::Yes, Lld::No), static_unwind_libs, diff --git a/compiler/rustc_target/src/spec/windows_gnullvm_base.rs b/compiler/rustc_target/src/spec/base/windows_gnullvm.rs index b1d8e2be5a6..b1d8e2be5a6 100644 --- a/compiler/rustc_target/src/spec/windows_gnullvm_base.rs +++ b/compiler/rustc_target/src/spec/base/windows_gnullvm.rs diff --git a/compiler/rustc_target/src/spec/windows_msvc_base.rs b/compiler/rustc_target/src/spec/base/windows_msvc.rs index 21062c337d8..e3cf9757219 100644 --- a/compiler/rustc_target/src/spec/windows_msvc_base.rs +++ b/compiler/rustc_target/src/spec/base/windows_msvc.rs @@ -1,7 +1,7 @@ -use crate::spec::{cvs, TargetOptions}; +use crate::spec::{base, cvs, TargetOptions}; pub fn opts() -> TargetOptions { - let base = super::msvc_base::opts(); + let base = base::msvc::opts(); TargetOptions { os: "windows".into(), diff --git a/compiler/rustc_target/src/spec/windows_uwp_gnu_base.rs b/compiler/rustc_target/src/spec/base/windows_uwp_gnu.rs index f30c33d997e..17256e18e24 100644 --- a/compiler/rustc_target/src/spec/windows_uwp_gnu_base.rs +++ b/compiler/rustc_target/src/spec/base/windows_uwp_gnu.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkArgs, LinkerFlavor, Lld, TargetOptions}; +use crate::spec::{add_link_args, base, Cc, LinkArgs, LinkerFlavor, Lld, TargetOptions}; pub fn opts() -> TargetOptions { - let base = super::windows_gnu_base::opts(); + let base = base::windows_gnu::opts(); // FIXME: This should be updated for the exception machinery changes from #67502 // and inherit from `windows_gnu_base`, at least partially. @@ -17,7 +17,7 @@ pub fn opts() -> TargetOptions { ]; let mut late_link_args = TargetOptions::link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), mingw_libs); - super::add_link_args(&mut late_link_args, LinkerFlavor::Gnu(Cc::Yes, Lld::No), mingw_libs); + add_link_args(&mut late_link_args, LinkerFlavor::Gnu(Cc::Yes, Lld::No), mingw_libs); // Reset the flags back to empty until the FIXME above is addressed. let late_link_args_dynamic = LinkArgs::new(); let late_link_args_static = LinkArgs::new(); diff --git a/compiler/rustc_target/src/spec/windows_uwp_msvc_base.rs b/compiler/rustc_target/src/spec/base/windows_uwp_msvc.rs index 8c942c59dd0..59a76167125 100644 --- a/compiler/rustc_target/src/spec/windows_uwp_msvc_base.rs +++ b/compiler/rustc_target/src/spec/base/windows_uwp_msvc.rs @@ -1,7 +1,7 @@ -use crate::spec::{LinkerFlavor, Lld, TargetOptions}; +use crate::spec::{base, LinkerFlavor, Lld, TargetOptions}; pub fn opts() -> TargetOptions { - let mut opts = super::windows_msvc_base::opts(); + let mut opts = base::windows_msvc::opts(); opts.abi = "uwp".into(); opts.vendor = "uwp".into(); diff --git a/compiler/rustc_target/src/spec/hurd_gnu_base.rs b/compiler/rustc_target/src/spec/hurd_gnu_base.rs deleted file mode 100644 index b9cf26d9380..00000000000 --- a/compiler/rustc_target/src/spec/hurd_gnu_base.rs +++ /dev/null @@ -1,5 +0,0 @@ -use crate::spec::TargetOptions; - -pub fn opts() -> TargetOptions { - TargetOptions { env: "gnu".into(), ..super::hurd_base::opts() } -} diff --git a/compiler/rustc_target/src/spec/linux_gnu_base.rs b/compiler/rustc_target/src/spec/linux_gnu_base.rs deleted file mode 100644 index 8d6b3f18512..00000000000 --- a/compiler/rustc_target/src/spec/linux_gnu_base.rs +++ /dev/null @@ -1,5 +0,0 @@ -use crate::spec::TargetOptions; - -pub fn opts() -> TargetOptions { - TargetOptions { env: "gnu".into(), ..super::linux_base::opts() } -} diff --git a/compiler/rustc_target/src/spec/linux_uclibc_base.rs b/compiler/rustc_target/src/spec/linux_uclibc_base.rs deleted file mode 100644 index 4ba480ffecf..00000000000 --- a/compiler/rustc_target/src/spec/linux_uclibc_base.rs +++ /dev/null @@ -1,5 +0,0 @@ -use crate::spec::TargetOptions; - -pub fn opts() -> TargetOptions { - TargetOptions { env: "uclibc".into(), ..super::linux_base::opts() } -} diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 48ca5fcf3ad..f04799482c8 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -57,47 +57,11 @@ use rustc_macros::HashStable_Generic; pub mod abi; pub mod crt_objects; -mod aix_base; -mod android_base; -mod apple_base; -pub use apple_base::deployment_target as current_apple_deployment_target; -pub use apple_base::platform as current_apple_platform; -pub use apple_base::sdk_version as current_apple_sdk_version; -mod avr_gnu_base; -pub use avr_gnu_base::ef_avr_arch; -mod bpf_base; -mod dragonfly_base; -mod freebsd_base; -mod fuchsia_base; -mod haiku_base; -mod hermit_base; -mod hurd_base; -mod hurd_gnu_base; -mod illumos_base; -mod l4re_base; -mod linux_base; -mod linux_gnu_base; -mod linux_musl_base; -mod linux_ohos_base; -mod linux_uclibc_base; -mod msvc_base; -mod netbsd_base; -mod nto_qnx_base; -mod openbsd_base; -mod redox_base; -mod solaris_base; -mod solid_base; -mod teeos_base; -mod thumb_base; -mod uefi_msvc_base; -mod unikraft_linux_musl_base; -mod vxworks_base; -mod wasm_base; -mod windows_gnu_base; -mod windows_gnullvm_base; -mod windows_msvc_base; -mod windows_uwp_gnu_base; -mod windows_uwp_msvc_base; +mod base; +pub use base::apple::deployment_target as current_apple_deployment_target; +pub use base::apple::platform as current_apple_platform; +pub use base::apple::sdk_version as current_apple_sdk_version; +pub use base::avr_gnu::ef_avr_arch; /// Linker is called through a C/C++ compiler. #[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)] @@ -1444,14 +1408,16 @@ impl fmt::Display for StackProtector { macro_rules! supported_targets { ( $(($triple:literal, $module:ident),)+ ) => { - $(mod $module;)+ + mod targets { + $(pub(crate) mod $module;)+ + } /// List of supported targets pub const TARGETS: &[&str] = &[$($triple),+]; fn load_builtin(target: &str) -> Option<Target> { let mut t = match target { - $( $triple => $module::target(), )+ + $( $triple => targets::$module::target(), )+ _ => return None, }; t.is_builtin = true; @@ -1467,7 +1433,7 @@ macro_rules! supported_targets { $( #[test] // `#[test]` fn $module() { - tests_impl::test_target(super::$module::target()); + tests_impl::test_target(crate::spec::targets::$module::target()); } )+ } diff --git a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_darwin.rs index 9ac73235141..8e6c00b1255 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_darwin.rs @@ -1,4 +1,4 @@ -use super::apple_base::{macos_llvm_target, opts, Arch}; +use crate::spec::base::apple::{macos_llvm_target, opts, Arch}; use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_ios.rs index e9edfd2877b..9fc5b5de466 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_ios.rs @@ -1,4 +1,4 @@ -use super::apple_base::{ios_llvm_target, opts, Arch}; +use crate::spec::base::apple::{ios_llvm_target, opts, Arch}; use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/aarch64_apple_ios_macabi.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_ios_macabi.rs index b29ab14e7f2..0172a3a9c2e 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_ios_macabi.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_ios_macabi.rs @@ -1,4 +1,4 @@ -use super::apple_base::{opts, Arch}; +use crate::spec::base::apple::{opts, Arch}; use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/aarch64_apple_ios_sim.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_ios_sim.rs index 6e2d62b6e08..602a687779e 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_ios_sim.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_ios_sim.rs @@ -1,4 +1,4 @@ -use super::apple_base::{ios_sim_llvm_target, opts, Arch}; +use crate::spec::base::apple::{ios_sim_llvm_target, opts, Arch}; use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_tvos.rs index f7cdfa71c4b..a1a31935509 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_tvos.rs @@ -1,4 +1,4 @@ -use super::apple_base::{opts, tvos_llvm_target, Arch}; +use crate::spec::base::apple::{opts, tvos_llvm_target, Arch}; use crate::spec::{FramePointer, Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/aarch64_apple_tvos_sim.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_tvos_sim.rs index 909a52a5097..7b0bbb28e47 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_tvos_sim.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_tvos_sim.rs @@ -1,4 +1,4 @@ -use super::apple_base::{opts, tvos_sim_llvm_target, Arch}; +use crate::spec::base::apple::{opts, tvos_sim_llvm_target, Arch}; use crate::spec::{FramePointer, Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/aarch64_apple_watchos_sim.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_watchos_sim.rs index e4af4127c22..014560d2278 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_watchos_sim.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_watchos_sim.rs @@ -1,4 +1,4 @@ -use super::apple_base::{opts, watchos_sim_llvm_target, Arch}; +use crate::spec::base::apple::{opts, watchos_sim_llvm_target, Arch}; use crate::spec::{FramePointer, Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/aarch64_be_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu.rs index b84783c0a40..bbaa870ec2e 100644 --- a/compiler/rustc_target/src/spec/aarch64_be_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu.rs @@ -1,5 +1,5 @@ use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -12,7 +12,7 @@ pub fn target() -> Target { max_atomic_width: Some(128), mcount: "\u{1}_mcount".into(), endian: Endian::Big, - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_be_unknown_linux_gnu_ilp32.rs b/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu_ilp32.rs index a24e0119f25..7536e507b3d 100644 --- a/compiler/rustc_target/src/spec/aarch64_be_unknown_linux_gnu_ilp32.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu_ilp32.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); + let mut base = base::linux_gnu::opts(); base.max_atomic_width = Some(128); Target { diff --git a/compiler/rustc_target/src/spec/aarch64_be_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_netbsd.rs index 98ae05974aa..21de8a71a0d 100644 --- a/compiler/rustc_target/src/spec/aarch64_be_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_netbsd.rs @@ -1,5 +1,5 @@ use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -11,7 +11,7 @@ pub fn target() -> Target { mcount: "__mcount".into(), max_atomic_width: Some(128), endian: Endian::Big, - ..super::netbsd_base::opts() + ..base::netbsd::opts() }, } } diff --git a/compiler/rustc_target/src/spec/targets/aarch64_fuchsia.rs b/compiler/rustc_target/src/spec/targets/aarch64_fuchsia.rs new file mode 100644 index 00000000000..3668db912bb --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/aarch64_fuchsia.rs @@ -0,0 +1 @@ +pub use crate::spec::targets::aarch64_unknown_fuchsia::target; diff --git a/compiler/rustc_target/src/spec/aarch64_kmc_solid_asp3.rs b/compiler/rustc_target/src/spec/targets/aarch64_kmc_solid_asp3.rs index 437fd601580..e5e22fd1ee2 100644 --- a/compiler/rustc_target/src/spec/aarch64_kmc_solid_asp3.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_kmc_solid_asp3.rs @@ -1,7 +1,7 @@ -use super::{RelocModel, Target, TargetOptions}; +use crate::spec::{base, RelocModel, Target, TargetOptions}; pub fn target() -> Target { - let base = super::solid_base::opts("asp3"); + let base = base::solid::opts("asp3"); Target { llvm_target: "aarch64-unknown-none".into(), pointer_width: 64, diff --git a/compiler/rustc_target/src/spec/aarch64_linux_android.rs b/compiler/rustc_target/src/spec/targets/aarch64_linux_android.rs index 071b727b35c..7c6fed7ab99 100644 --- a/compiler/rustc_target/src/spec/aarch64_linux_android.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_linux_android.rs @@ -1,4 +1,4 @@ -use crate::spec::{SanitizerSet, Target, TargetOptions}; +use crate::spec::{base, SanitizerSet, Target, TargetOptions}; // See https://developer.android.com/ndk/guides/abis.html#arm64-v8a // for target ABI requirements. @@ -20,7 +20,7 @@ pub fn target() -> Target { | SanitizerSet::SHADOWCALLSTACK | SanitizerSet::ADDRESS, supports_xray: true, - ..super::android_base::opts() + ..base::android::opts() }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_nintendo_switch_freestanding.rs b/compiler/rustc_target/src/spec/targets/aarch64_nintendo_switch_freestanding.rs index e271bdc8a01..02fcc2bb43e 100644 --- a/compiler/rustc_target/src/spec/aarch64_nintendo_switch_freestanding.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_nintendo_switch_freestanding.rs @@ -1,4 +1,4 @@ -use super::{Cc, LinkerFlavor, Lld, PanicStrategy, RelroLevel, Target, TargetOptions}; +use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelroLevel, Target, TargetOptions}; const LINKER_SCRIPT: &str = include_str!("./aarch64_nintendo_switch_freestanding_linker_script.ld"); diff --git a/compiler/rustc_target/src/spec/aarch64_nintendo_switch_freestanding_linker_script.ld b/compiler/rustc_target/src/spec/targets/aarch64_nintendo_switch_freestanding_linker_script.ld index f3441e65937..f3441e65937 100644 --- a/compiler/rustc_target/src/spec/aarch64_nintendo_switch_freestanding_linker_script.ld +++ b/compiler/rustc_target/src/spec/targets/aarch64_nintendo_switch_freestanding_linker_script.ld diff --git a/compiler/rustc_target/src/spec/aarch64_pc_windows_gnullvm.rs b/compiler/rustc_target/src/spec/targets/aarch64_pc_windows_gnullvm.rs index cf1d7ca1158..1ea73814282 100644 --- a/compiler/rustc_target/src/spec/aarch64_pc_windows_gnullvm.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_pc_windows_gnullvm.rs @@ -1,7 +1,7 @@ -use crate::spec::Target; +use crate::spec::{base, Target}; pub fn target() -> Target { - let mut base = super::windows_gnullvm_base::opts(); + let mut base = base::windows_gnullvm::opts(); base.max_atomic_width = Some(128); base.features = "+v8a,+neon,+fp-armv8".into(); base.linker = Some("aarch64-w64-mingw32-clang".into()); diff --git a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/aarch64_pc_windows_msvc.rs index 56b76bc7ada..cbd1329726a 100644 --- a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_pc_windows_msvc.rs @@ -1,7 +1,7 @@ -use crate::spec::Target; +use crate::spec::{base, Target}; pub fn target() -> Target { - let mut base = super::windows_msvc_base::opts(); + let mut base = base::windows_msvc::opts(); base.max_atomic_width = Some(128); base.features = "+v8a,+neon,+fp-armv8".into(); diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_freebsd.rs index 84fa9814bbe..0f95984a31f 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_freebsd.rs @@ -1,4 +1,4 @@ -use crate::spec::{SanitizerSet, Target, TargetOptions}; +use crate::spec::{base, SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { | SanitizerSet::CFI | SanitizerSet::MEMORY | SanitizerSet::THREAD, - ..super::freebsd_base::opts() + ..base::freebsd::opts() }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_fuchsia.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs index a5683fa7348..cacc6ea235a 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_fuchsia.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs @@ -1,4 +1,4 @@ -use crate::spec::{SanitizerSet, Target, TargetOptions}; +use crate::spec::{base, SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -12,7 +12,7 @@ pub fn target() -> Target { supported_sanitizers: SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::SHADOWCALLSTACK, - ..super::fuchsia_base::opts() + ..base::fuchsia::opts() }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_hermit.rs index 2414867be55..3839e0b9c46 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_hermit.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -9,7 +9,7 @@ pub fn target() -> Target { options: TargetOptions { features: "+v8a,+strict-align,+neon,+fp-armv8".into(), max_atomic_width: Some(128), - ..super::hermit_base::opts() + ..base::hermit::opts() }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs index da246089440..c0b07db3818 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{SanitizerSet, Target, TargetOptions}; +use crate::spec::{base, SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -18,7 +18,7 @@ pub fn target() -> Target { | SanitizerSet::THREAD | SanitizerSet::HWADDRESS, supports_xray: true, - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu_ilp32.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu_ilp32.rs index ad9df53c2b7..d4c6271b241 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu_ilp32.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu_ilp32.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -11,7 +11,7 @@ pub fn target() -> Target { features: "+v8a,+outline-atomics".into(), max_atomic_width: Some(128), mcount: "\u{1}_mcount".into(), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_musl.rs index 523eb6bd2fe..364df677e44 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_musl.rs @@ -1,7 +1,7 @@ -use crate::spec::{SanitizerSet, Target, TargetOptions}; +use crate::spec::{base, SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_musl_base::opts(); + let mut base = base::linux_musl::opts(); base.max_atomic_width = Some(128); base.supports_xray = true; base.features = "+v8a".into(); diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_ohos.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs index c8f3db00e01..5f3bef63aa6 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_ohos.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs @@ -1,9 +1,8 @@ -use crate::spec::{Target, TargetOptions}; - -use super::SanitizerSet; +use crate::spec::SanitizerSet; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_ohos_base::opts(); + let mut base = base::linux_ohos::opts(); base.max_atomic_width = Some(128); Target { diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_netbsd.rs index a58b64d3d03..3194d16ff47 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_netbsd.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -10,7 +10,7 @@ pub fn target() -> Target { features: "+v8a".into(), mcount: "__mcount".into(), max_atomic_width: Some(128), - ..super::netbsd_base::opts() + ..base::netbsd::opts() }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none.rs index be27302f7f5..88fa6d5a762 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none.rs @@ -6,7 +6,7 @@ // // For example, `-C target-cpu=cortex-a53`. -use super::{ +use crate::spec::{ Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, SanitizerSet, Target, TargetOptions, }; diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs index 9dfa1f268ac..48b79b0b9ba 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs @@ -6,7 +6,7 @@ // // For example, `-C target-cpu=cortex-a53`. -use super::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions}; +use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions}; pub fn target() -> Target { let opts = TargetOptions { diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_nto_qnx_710.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_nto_qnx_710.rs index 630642dcd33..aeeaab3af32 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_nto_qnx_710.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_nto_qnx_710.rs @@ -1,5 +1,4 @@ -use super::nto_qnx_base; -use crate::spec::{Cc, LinkerFlavor, Lld, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -24,7 +23,7 @@ pub fn target() -> Target { &["-Vgcc_ntoaarch64le_cxx"], ), env: "nto71".into(), - ..nto_qnx_base::opts() + ..base::nto_qnx::opts() }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_openbsd.rs index 224e31af24f..e3f5aafc7d4 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_openbsd.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -9,7 +9,7 @@ pub fn target() -> Target { options: TargetOptions { features: "+v8a".into(), max_atomic_width: Some(128), - ..super::openbsd_base::opts() + ..base::openbsd::opts() }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_redox.rs index 5650162cdbc..de875e29ffd 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_redox.rs @@ -1,7 +1,7 @@ -use crate::spec::Target; +use crate::spec::{base, Target}; pub fn target() -> Target { - let mut base = super::redox_base::opts(); + let mut base = base::redox::opts(); base.max_atomic_width = Some(128); base.features = "+v8a".into(); diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_teeos.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_teeos.rs index 64a7dc681c8..eec2668d487 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_teeos.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_teeos.rs @@ -1,7 +1,7 @@ -use crate::spec::Target; +use crate::spec::{base, Target}; pub fn target() -> Target { - let mut base = super::teeos_base::opts(); + let mut base = base::teeos::opts(); base.features = "+strict-align,+neon,+fp-armv8".into(); base.max_atomic_width = Some(128); base.linker = Some("aarch64-linux-gnu-ld".into()); diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_uefi.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs index 82fb015569d..9ed6ed2651f 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs @@ -1,11 +1,10 @@ // This defines the aarch64 target for UEFI systems as described in the UEFI specification. See the // uefi-base module for generic UEFI options. -use super::uefi_msvc_base; -use crate::spec::{LinkerFlavor, Lld, Target}; +use crate::spec::{base, LinkerFlavor, Lld, Target}; pub fn target() -> Target { - let mut base = uefi_msvc_base::opts(); + let mut base = base::uefi_msvc::opts(); base.max_atomic_width = Some(128); base.add_pre_link_args(LinkerFlavor::Msvc(Lld::No), &["/machine:arm64"]); diff --git a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/aarch64_uwp_windows_msvc.rs index d39442d9177..c64b2c7d113 100644 --- a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_uwp_windows_msvc.rs @@ -1,7 +1,7 @@ -use crate::spec::Target; +use crate::spec::{base, Target}; pub fn target() -> Target { - let mut base = super::windows_uwp_msvc_base::opts(); + let mut base = base::windows_uwp_msvc::opts(); base.max_atomic_width = Some(128); base.features = "+v8a".into(); diff --git a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/targets/aarch64_wrs_vxworks.rs index 7e2af4c7a6a..29f61d85778 100644 --- a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_wrs_vxworks.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -9,7 +9,7 @@ pub fn target() -> Target { options: TargetOptions { features: "+v8a".into(), max_atomic_width: Some(128), - ..super::vxworks_base::opts() + ..base::vxworks::opts() }, } } diff --git a/compiler/rustc_target/src/spec/arm64_32_apple_watchos.rs b/compiler/rustc_target/src/spec/targets/arm64_32_apple_watchos.rs index c757ed45e47..9931b7b866c 100644 --- a/compiler/rustc_target/src/spec/arm64_32_apple_watchos.rs +++ b/compiler/rustc_target/src/spec/targets/arm64_32_apple_watchos.rs @@ -1,4 +1,4 @@ -use super::apple_base::{opts, Arch}; +use crate::spec::base::apple::{opts, Arch}; use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs b/compiler/rustc_target/src/spec/targets/arm_linux_androideabi.rs index bbf1fa315ab..43b27b414d8 100644 --- a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/targets/arm_linux_androideabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{SanitizerSet, Target, TargetOptions}; +use crate::spec::{base, SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -12,7 +12,7 @@ pub fn target() -> Target { features: "+strict-align,+v5te".into(), supported_sanitizers: SanitizerSet::ADDRESS, max_atomic_width: Some(32), - ..super::android_base::opts() + ..base::android::opts() }, } } diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabi.rs index 400030ca0c6..e4fa54c4b75 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -12,7 +12,7 @@ pub fn target() -> Target { max_atomic_width: Some(64), mcount: "\u{1}__gnu_mcount_nc".into(), llvm_mcount_intrinsic: Some("llvm.arm.gnu.eabi.mcount".into()), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabihf.rs index 6228fb15a83..f379ea35ecb 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -12,7 +12,7 @@ pub fn target() -> Target { max_atomic_width: Some(64), mcount: "\u{1}__gnu_mcount_nc".into(), llvm_mcount_intrinsic: Some("llvm.arm.gnu.eabi.mcount".into()), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabi.rs index 3ef441d6a60..f3d5ff89244 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -16,7 +16,7 @@ pub fn target() -> Target { features: "+strict-align,+v6".into(), max_atomic_width: Some(64), mcount: "\u{1}mcount".into(), - ..super::linux_musl_base::opts() + ..base::linux_musl::opts() }, } } diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabihf.rs index eb6660d4c28..f3e366d5993 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -16,7 +16,7 @@ pub fn target() -> Target { features: "+strict-align,+v6,+vfp2,-d32".into(), max_atomic_width: Some(64), mcount: "\u{1}mcount".into(), - ..super::linux_musl_base::opts() + ..base::linux_musl::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armeb_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/targets/armeb_unknown_linux_gnueabi.rs index 1d66515a72e..07c7e1c5845 100644 --- a/compiler/rustc_target/src/spec/armeb_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/targets/armeb_unknown_linux_gnueabi.rs @@ -1,5 +1,5 @@ use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -14,7 +14,7 @@ pub fn target() -> Target { max_atomic_width: Some(64), mcount: "\u{1}__gnu_mcount_nc".into(), llvm_mcount_intrinsic: Some("llvm.arm.gnu.eabi.mcount".into()), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs index 446efa90d09..446efa90d09 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs index 0c9e99ff84b..0c9e99ff84b 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs diff --git a/compiler/rustc_target/src/spec/armv4t_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armv4t_none_eabi.rs index 44fdd3178af..44fdd3178af 100644 --- a/compiler/rustc_target/src/spec/armv4t_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv4t_none_eabi.rs diff --git a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/targets/armv4t_unknown_linux_gnueabi.rs index cffebcc9581..5ab753c3d61 100644 --- a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv4t_unknown_linux_gnueabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -14,7 +14,7 @@ pub fn target() -> Target { mcount: "\u{1}__gnu_mcount_nc".into(), llvm_mcount_intrinsic: Some("llvm.arm.gnu.eabi.mcount".into()), has_thumb_interworking: true, - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv5te_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armv5te_none_eabi.rs index dfd27b65474..5e23efecdbe 100644 --- a/compiler/rustc_target/src/spec/armv5te_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv5te_none_eabi.rs @@ -1,6 +1,6 @@ //! Targets the ARMv5TE, with code as `a32` code by default. -use crate::spec::{cvs, FramePointer, Target, TargetOptions}; +use crate::spec::{base, cvs, FramePointer, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -35,7 +35,7 @@ pub fn target() -> Target { atomic_cas: false, has_thumb_interworking: true, - ..super::thumb_base::opts() + ..base::thumb::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_gnueabi.rs index b940563102b..7155ab289c0 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_gnueabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { max_atomic_width: Some(32), mcount: "\u{1}__gnu_mcount_nc".into(), has_thumb_interworking: true, - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_musleabi.rs index 2530971b502..3f25ab2bcc1 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_musleabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -17,7 +17,7 @@ pub fn target() -> Target { max_atomic_width: Some(32), mcount: "\u{1}mcount".into(), has_thumb_interworking: true, - ..super::linux_musl_base::opts() + ..base::linux_musl::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_uclibceabi.rs b/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_uclibceabi.rs index a51be10a3d8..af6e3baa27a 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_uclibceabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_uclibceabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { max_atomic_width: Some(32), mcount: "\u{1}__gnu_mcount_nc".into(), has_thumb_interworking: true, - ..super::linux_uclibc_base::opts() + ..base::linux_uclibc::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/armv6_unknown_freebsd.rs index 4a8aa31576f..22f6ee81055 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/armv6_unknown_freebsd.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -14,7 +14,7 @@ pub fn target() -> Target { max_atomic_width: Some(64), mcount: "\u{1}__gnu_mcount_nc".into(), llvm_mcount_intrinsic: Some("llvm.arm.gnu.eabi.mcount".into()), - ..super::freebsd_base::opts() + ..base::freebsd::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv6_unknown_netbsd_eabihf.rs index 6e26f686fcb..84d9ceac04d 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv6_unknown_netbsd_eabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { features: "+v6,+vfp2,-d32".into(), max_atomic_width: Some(64), mcount: "__mcount".into(), - ..super::netbsd_base::opts() + ..base::netbsd::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv6k_nintendo_3ds.rs b/compiler/rustc_target/src/spec/targets/armv6k_nintendo_3ds.rs index 23f4a5abf77..23f4a5abf77 100644 --- a/compiler/rustc_target/src/spec/armv6k_nintendo_3ds.rs +++ b/compiler/rustc_target/src/spec/targets/armv6k_nintendo_3ds.rs diff --git a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs b/compiler/rustc_target/src/spec/targets/armv7_linux_androideabi.rs index 402e0fd9236..bb3e574e32f 100644 --- a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_linux_androideabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, SanitizerSet, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, SanitizerSet, Target, TargetOptions}; // This target if is for the baseline of the Android v7a ABI // in thumb mode. It's named armv7-* instead of thumbv7-* @@ -9,7 +9,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, SanitizerSet, Target, TargetOptions}; // for target ABI requirements. pub fn target() -> Target { - let mut base = super::android_base::opts(); + let mut base = base::android::opts(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-march=armv7-a"]); Target { llvm_target: "armv7-none-linux-android".into(), diff --git a/compiler/rustc_target/src/spec/armv7_sony_vita_newlibeabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_sony_vita_newlibeabihf.rs index 62c93603621..62c93603621 100644 --- a/compiler/rustc_target/src/spec/armv7_sony_vita_newlibeabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_sony_vita_newlibeabihf.rs diff --git a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_freebsd.rs index bc37b62de8e..9f4a432c6fa 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_freebsd.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { features: "+v7,+vfp3,-d32,+thumb2,-neon".into(), max_atomic_width: Some(64), mcount: "\u{1}__gnu_mcount_nc".into(), - ..super::freebsd_base::opts() + ..base::freebsd::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabi.rs index 73ae212a7a6..ad9fd773b8b 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; // This target is for glibc Linux on ARMv7 without thumb-mode, NEON or // hardfloat. @@ -15,7 +15,7 @@ pub fn target() -> Target { max_atomic_width: Some(64), mcount: "\u{1}__gnu_mcount_nc".into(), llvm_mcount_intrinsic: Some("llvm.arm.gnu.eabi.mcount".into()), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabihf.rs index e39ea49a003..aad7977d504 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; // This target is for glibc Linux on ARMv7 without NEON or // thumb-mode. See the thumbv7neon variant for enabling both. @@ -15,7 +15,7 @@ pub fn target() -> Target { features: "+v7,+vfp3,-d32,+thumb2,-neon".into(), max_atomic_width: Some(64), mcount: "\u{1}__gnu_mcount_nc".into(), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabi.rs index 7dae8577396..7f30a5ad7d7 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; // This target is for musl Linux on ARMv7 without thumb-mode, NEON or // hardfloat. @@ -20,7 +20,7 @@ pub fn target() -> Target { features: "+v7,+thumb2,+soft-float,-neon".into(), max_atomic_width: Some(64), mcount: "\u{1}mcount".into(), - ..super::linux_musl_base::opts() + ..base::linux_musl::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabihf.rs index ba83964bf58..ec5c6419f63 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; // This target is for musl Linux on ARMv7 without thumb-mode or NEON. @@ -19,7 +19,7 @@ pub fn target() -> Target { features: "+v7,+vfp3,-d32,+thumb2,-neon".into(), max_atomic_width: Some(64), mcount: "\u{1}mcount".into(), - ..super::linux_musl_base::opts() + ..base::linux_musl::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_ohos.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_ohos.rs index e9b0bda68ef..9f2ac541ddc 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_ohos.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_ohos.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; // This target is for OpenHarmony on ARMv7 Linux with thumb-mode, but no NEON or // hardfloat. @@ -18,7 +18,7 @@ pub fn target() -> Target { features: "+v7,+thumb2,+soft-float,-neon".into(), max_atomic_width: Some(64), mcount: "\u{1}mcount".into(), - ..super::linux_ohos_base::opts() + ..base::linux_ohos::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_uclibceabi.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabi.rs index 171f67070d5..212c80718f0 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_uclibceabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabi.rs @@ -1,10 +1,10 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; // This target is for uclibc Linux on ARMv7 without NEON, // thumb-mode or hardfloat. pub fn target() -> Target { - let base = super::linux_uclibc_base::opts(); + let base = base::linux_uclibc::opts(); Target { llvm_target: "armv7-unknown-linux-gnueabi".into(), pointer_width: 32, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_uclibceabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabihf.rs index d3e95a6573d..f760ad9e79c 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_uclibceabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabihf.rs @@ -1,10 +1,10 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; // This target is for uclibc Linux on ARMv7 without NEON or // thumb-mode. See the thumbv7neon variant for enabling both. pub fn target() -> Target { - let base = super::linux_uclibc_base::opts(); + let base = base::linux_uclibc::opts(); Target { llvm_target: "armv7-unknown-linux-gnueabihf".into(), pointer_width: 32, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_netbsd_eabihf.rs index c89ae248398..e5518c6daec 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_netbsd_eabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { features: "+v7,+vfp3,-d32,+thumb2,-neon".into(), max_atomic_width: Some(64), mcount: "__mcount".into(), - ..super::netbsd_base::opts() + ..base::netbsd::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_wrs_vxworks_eabihf.rs index c1ab90172e2..0b4e64307d2 100644 --- a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_wrs_vxworks_eabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -11,7 +11,7 @@ pub fn target() -> Target { // Info about features at https://wiki.debian.org/ArmHardFloatPort features: "+v7,+vfp3,-d32,+thumb2,-neon".into(), max_atomic_width: Some(64), - ..super::vxworks_base::opts() + ..base::vxworks::opts() }, } } diff --git a/compiler/rustc_target/src/spec/armv7a_kmc_solid_asp3_eabi.rs b/compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabi.rs index b49dc650bd0..57d40d54c44 100644 --- a/compiler/rustc_target/src/spec/armv7a_kmc_solid_asp3_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabi.rs @@ -1,7 +1,7 @@ -use super::{RelocModel, Target, TargetOptions}; +use crate::spec::{base, RelocModel, Target, TargetOptions}; pub fn target() -> Target { - let base = super::solid_base::opts("asp3"); + let base = base::solid::opts("asp3"); Target { llvm_target: "armv7a-none-eabi".into(), pointer_width: 32, diff --git a/compiler/rustc_target/src/spec/armv7a_kmc_solid_asp3_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabihf.rs index 7d30238e8ab..3d21213c5ff 100644 --- a/compiler/rustc_target/src/spec/armv7a_kmc_solid_asp3_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabihf.rs @@ -1,7 +1,7 @@ -use super::{RelocModel, Target, TargetOptions}; +use crate::spec::{base, RelocModel, Target, TargetOptions}; pub fn target() -> Target { - let base = super::solid_base::opts("asp3"); + let base = base::solid::opts("asp3"); Target { llvm_target: "armv7a-none-eabihf".into(), pointer_width: 32, diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armv7a_none_eabi.rs index d59de86a230..c5b61427e69 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7a_none_eabi.rs @@ -14,7 +14,7 @@ // - `relocation-model` set to `static`; also no PIE, no relro and no dynamic // linking. rationale: matches `thumb` targets -use super::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions}; +use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions}; pub fn target() -> Target { let opts = TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv7a_none_eabihf.rs index c134f3e0907..ba3caad6a97 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7a_none_eabihf.rs @@ -5,7 +5,7 @@ // changes (list in `armv7a_none_eabi.rs`) to bring it closer to the bare-metal // `thumb` & `aarch64` targets. -use super::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions}; +use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions}; pub fn target() -> Target { let opts = TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv7k_apple_watchos.rs b/compiler/rustc_target/src/spec/targets/armv7k_apple_watchos.rs index 6e1d00d1f6c..751fdcb20f1 100644 --- a/compiler/rustc_target/src/spec/armv7k_apple_watchos.rs +++ b/compiler/rustc_target/src/spec/targets/armv7k_apple_watchos.rs @@ -1,4 +1,4 @@ -use super::apple_base::{opts, Arch}; +use crate::spec::base::apple::{opts, Arch}; use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs index 68b2527985a..68b2527985a 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv7r_none_eabihf.rs index 909765a310f..909765a310f 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7r_none_eabihf.rs diff --git a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs b/compiler/rustc_target/src/spec/targets/armv7s_apple_ios.rs index be7f8542c9e..44c624c4ebd 100644 --- a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs +++ b/compiler/rustc_target/src/spec/targets/armv7s_apple_ios.rs @@ -1,4 +1,4 @@ -use super::apple_base::{ios_llvm_target, opts, Arch}; +use crate::spec::base::apple::{ios_llvm_target, opts, Arch}; use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/asmjs_unknown_emscripten.rs b/compiler/rustc_target/src/spec/targets/asmjs_unknown_emscripten.rs index f492c3451a4..e4768c67af5 100644 --- a/compiler/rustc_target/src/spec/asmjs_unknown_emscripten.rs +++ b/compiler/rustc_target/src/spec/targets/asmjs_unknown_emscripten.rs @@ -1,4 +1,4 @@ -use super::{wasm32_unknown_emscripten, LinkerFlavor, Target}; +use crate::spec::{targets::wasm32_unknown_emscripten, LinkerFlavor, Target}; pub fn target() -> Target { let mut target = wasm32_unknown_emscripten::target(); diff --git a/compiler/rustc_target/src/spec/targets/avr_unknown_gnu_atmega328.rs b/compiler/rustc_target/src/spec/targets/avr_unknown_gnu_atmega328.rs new file mode 100644 index 00000000000..bf01413a80a --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/avr_unknown_gnu_atmega328.rs @@ -0,0 +1,5 @@ +use crate::spec::{base, Target}; + +pub fn target() -> Target { + base::avr_gnu::target("atmega328", "-mmcu=atmega328") +} diff --git a/compiler/rustc_target/src/spec/bpfeb_unknown_none.rs b/compiler/rustc_target/src/spec/targets/bpfeb_unknown_none.rs index 174ddfa50bf..91e091e237a 100644 --- a/compiler/rustc_target/src/spec/bpfeb_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/bpfeb_unknown_none.rs @@ -1,5 +1,5 @@ use crate::spec::Target; -use crate::{abi::Endian, spec::bpf_base}; +use crate::{abi::Endian, spec::base}; pub fn target() -> Target { Target { @@ -7,6 +7,6 @@ pub fn target() -> Target { data_layout: "E-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), pointer_width: 64, arch: "bpf".into(), - options: bpf_base::opts(Endian::Big), + options: base::bpf::opts(Endian::Big), } } diff --git a/compiler/rustc_target/src/spec/bpfel_unknown_none.rs b/compiler/rustc_target/src/spec/targets/bpfel_unknown_none.rs index 7625e7b0e48..45ab750ead6 100644 --- a/compiler/rustc_target/src/spec/bpfel_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/bpfel_unknown_none.rs @@ -1,5 +1,5 @@ use crate::spec::Target; -use crate::{abi::Endian, spec::bpf_base}; +use crate::{abi::Endian, spec::base}; pub fn target() -> Target { Target { @@ -7,6 +7,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), pointer_width: 64, arch: "bpf".into(), - options: bpf_base::opts(Endian::Little), + options: base::bpf::opts(Endian::Little), } } diff --git a/compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2.rs b/compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2.rs index 93becd70869..14cd33a260a 100644 --- a/compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2.rs +++ b/compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2.rs @@ -1,4 +1,4 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, Target, TargetOptions}; // This target is for glibc Linux on Csky @@ -14,7 +14,7 @@ pub fn target() -> Target { features: "+2e3,+3e7,+7e10,+cache,+dsp1e2,+dspe60,+e1,+e2,+edsp,+elrw,+hard-tp,+high-registers,+hwdiv,+mp,+mp1e2,+nvic,+trust".into(), late_link_args: TargetOptions::link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-l:libatomic.a"]), max_atomic_width: Some(32), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2hf.rs b/compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2hf.rs index 74518834160..0ce271c601c 100644 --- a/compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2hf.rs +++ b/compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2hf.rs @@ -1,4 +1,4 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, Target, TargetOptions}; // This target is for glibc Linux on Csky @@ -15,7 +15,7 @@ pub fn target() -> Target { features: "+hard-float,+hard-float-abi,+2e3,+3e7,+7e10,+cache,+dsp1e2,+dspe60,+e1,+e2,+edsp,+elrw,+hard-tp,+high-registers,+hwdiv,+mp,+mp1e2,+nvic,+trust".into(), late_link_args: TargetOptions::link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-l:libatomic.a", "-mhard-float"]), max_atomic_width: Some(32), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/hexagon_unknown_linux_musl.rs index 4c6ab5f5ae4..98a5e7abd09 100644 --- a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/hexagon_unknown_linux_musl.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Target}; pub fn target() -> Target { - let mut base = super::linux_musl_base::opts(); + let mut base = base::linux_musl::opts(); base.cpu = "hexagonv60".into(); base.max_atomic_width = Some(32); // FIXME: HVX length defaults are per-CPU diff --git a/compiler/rustc_target/src/spec/i386_apple_ios.rs b/compiler/rustc_target/src/spec/targets/i386_apple_ios.rs index 5819981612e..ed2c990ffa6 100644 --- a/compiler/rustc_target/src/spec/i386_apple_ios.rs +++ b/compiler/rustc_target/src/spec/targets/i386_apple_ios.rs @@ -1,4 +1,4 @@ -use super::apple_base::{ios_sim_llvm_target, opts, Arch}; +use crate::spec::base::apple::{ios_sim_llvm_target, opts, Arch}; use crate::spec::{StackProbeType, Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/i386_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/i386_unknown_linux_gnu.rs index 801a8893399..801a8893399 100644 --- a/compiler/rustc_target/src/spec/i386_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/i386_unknown_linux_gnu.rs diff --git a/compiler/rustc_target/src/spec/i486_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/i486_unknown_linux_gnu.rs index a11fbecc3c3..a11fbecc3c3 100644 --- a/compiler/rustc_target/src/spec/i486_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/i486_unknown_linux_gnu.rs diff --git a/compiler/rustc_target/src/spec/i586_pc_nto_qnx700.rs b/compiler/rustc_target/src/spec/targets/i586_pc_nto_qnx700.rs index 68afa7fe401..06089391623 100644 --- a/compiler/rustc_target/src/spec/i586_pc_nto_qnx700.rs +++ b/compiler/rustc_target/src/spec/targets/i586_pc_nto_qnx700.rs @@ -1,5 +1,4 @@ -use super::nto_qnx_base; -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -18,7 +17,7 @@ pub fn target() -> Target { ), env: "nto70".into(), stack_probes: StackProbeType::X86, - ..nto_qnx_base::opts() + ..base::nto_qnx::opts() }, } } diff --git a/compiler/rustc_target/src/spec/i586_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/i586_pc_windows_msvc.rs index befb0f89f3b..befb0f89f3b 100644 --- a/compiler/rustc_target/src/spec/i586_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/i586_pc_windows_msvc.rs diff --git a/compiler/rustc_target/src/spec/i586_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/i586_unknown_linux_gnu.rs index b699a7af177..b699a7af177 100644 --- a/compiler/rustc_target/src/spec/i586_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/i586_unknown_linux_gnu.rs diff --git a/compiler/rustc_target/src/spec/i586_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/i586_unknown_linux_musl.rs index 55a26eb004a..55a26eb004a 100644 --- a/compiler/rustc_target/src/spec/i586_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/i586_unknown_linux_musl.rs diff --git a/compiler/rustc_target/src/spec/i586_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/i586_unknown_netbsd.rs index 0d8bdc3f89f..8375fa4c0c0 100644 --- a/compiler/rustc_target/src/spec/i586_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/i586_unknown_netbsd.rs @@ -1,7 +1,7 @@ -use crate::spec::{StackProbeType, Target, TargetOptions}; +use crate::spec::{base, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::netbsd_base::opts(); + let mut base = base::netbsd::opts(); base.cpu = "pentium".into(); base.max_atomic_width = Some(64); base.stack_probes = StackProbeType::Call; diff --git a/compiler/rustc_target/src/spec/i686_apple_darwin.rs b/compiler/rustc_target/src/spec/targets/i686_apple_darwin.rs index b5103d15db6..242fe5ed98a 100644 --- a/compiler/rustc_target/src/spec/i686_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/targets/i686_apple_darwin.rs @@ -1,4 +1,4 @@ -use super::apple_base::{macos_llvm_target, opts, Arch}; +use crate::spec::base::apple::{macos_llvm_target, opts, Arch}; use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/i686_linux_android.rs b/compiler/rustc_target/src/spec/targets/i686_linux_android.rs index c7c30c23901..987265598eb 100644 --- a/compiler/rustc_target/src/spec/i686_linux_android.rs +++ b/compiler/rustc_target/src/spec/targets/i686_linux_android.rs @@ -1,10 +1,10 @@ -use crate::spec::{SanitizerSet, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions}; // See https://developer.android.com/ndk/guides/abis.html#x86 // for target ABI requirements. pub fn target() -> Target { - let mut base = super::android_base::opts(); + let mut base = base::android::opts(); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnu.rs index 7a11138754f..8d4a39b5811 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnu.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, Target}; +use crate::spec::{base, Cc, FramePointer, LinkerFlavor, Lld, Target}; pub fn target() -> Target { - let mut base = super::windows_gnu_base::opts(); + let mut base = base::windows_gnu::opts(); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); base.frame_pointer = FramePointer::Always; // Required for backtraces diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_gnullvm.rs b/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnullvm.rs index 3154b512a52..bb410cd8caf 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_gnullvm.rs +++ b/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnullvm.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, Target}; +use crate::spec::{base, Cc, FramePointer, LinkerFlavor, Lld, Target}; pub fn target() -> Target { - let mut base = super::windows_gnullvm_base::opts(); + let mut base = base::windows_gnullvm::opts(); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); base.frame_pointer = FramePointer::Always; // Required for backtraces diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/i686_pc_windows_msvc.rs index db4c00dc697..ba80c23196e 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/i686_pc_windows_msvc.rs @@ -1,7 +1,7 @@ -use crate::spec::{LinkerFlavor, Lld, Target}; +use crate::spec::{base, LinkerFlavor, Lld, Target}; pub fn target() -> Target { - let mut base = super::windows_msvc_base::opts(); + let mut base = base::windows_msvc::opts(); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_freebsd.rs index 35ca78034f1..70aa0b47962 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_freebsd.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::freebsd_base::opts(); + let mut base = base::freebsd::opts(); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32", "-Wl,-znotext"]); diff --git a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_haiku.rs index e6b72336c5c..9715f6c21d9 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_haiku.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::haiku_base::opts(); + let mut base = base::haiku::opts(); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]); diff --git a/compiler/rustc_target/src/spec/i686_unknown_hurd_gnu.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_hurd_gnu.rs index 29f80360138..9102673ef77 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_hurd_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_hurd_gnu.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::hurd_gnu_base::opts(); + let mut base = base::hurd_gnu::opts(); base.cpu = "pentiumpro".into(); base.max_atomic_width = Some(64); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]); diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs index 73e536a7e4d..0ca058b2fd2 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); + let mut base = base::linux_gnu::opts(); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); base.supported_sanitizers = SanitizerSet::ADDRESS; diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_musl.rs index 3825082ba25..ce0df3a7234 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_musl.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, StackProbeType, Target}; +use crate::spec::{base, Cc, FramePointer, LinkerFlavor, Lld, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::linux_musl_base::opts(); + let mut base = base::linux_musl::opts(); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32", "-Wl,-melf_i386"]); diff --git a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_netbsd.rs index b191996c7de..2a3ac5932d3 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_netbsd.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::netbsd_base::opts(); + let mut base = base::netbsd::opts(); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]); diff --git a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_openbsd.rs index 8babe559712..45883542bea 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_openbsd.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::openbsd_base::opts(); + let mut base = base::openbsd::opts(); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32", "-fuse-ld=lld"]); diff --git a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_uefi.rs index a2e42c5e61d..25315e19cdd 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_uefi.rs @@ -5,10 +5,10 @@ // The cdecl ABI is used. It differs from the stdcall or fastcall ABI. // "i686-unknown-windows" is used to get the minimal subset of windows-specific features. -use crate::spec::Target; +use crate::spec::{base, Target}; pub fn target() -> Target { - let mut base = super::uefi_msvc_base::opts(); + let mut base = base::uefi_msvc::opts(); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/targets/i686_uwp_windows_gnu.rs index a3e32569827..ec211a710eb 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/i686_uwp_windows_gnu.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, Target}; +use crate::spec::{base, Cc, FramePointer, LinkerFlavor, Lld, Target}; pub fn target() -> Target { - let mut base = super::windows_uwp_gnu_base::opts(); + let mut base = base::windows_uwp_gnu::opts(); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); base.frame_pointer = FramePointer::Always; // Required for backtraces diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/i686_uwp_windows_msvc.rs index 4c657fe908a..7cca2fc6b9f 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/i686_uwp_windows_msvc.rs @@ -1,7 +1,7 @@ -use crate::spec::Target; +use crate::spec::{base, Target}; pub fn target() -> Target { - let mut base = super::windows_uwp_msvc_base::opts(); + let mut base = base::windows_uwp_msvc::opts(); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs b/compiler/rustc_target/src/spec/targets/i686_wrs_vxworks.rs index b5cfdfcebea..965a895972c 100644 --- a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/targets/i686_wrs_vxworks.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::vxworks_base::opts(); + let mut base = base::vxworks::opts(); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]); diff --git a/compiler/rustc_target/src/spec/loongarch64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs index db8b9c70e67..0f05e7c475a 100644 --- a/compiler/rustc_target/src/spec/loongarch64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -11,7 +11,7 @@ pub fn target() -> Target { features: "+f,+d".into(), llvm_abiname: "lp64d".into(), max_atomic_width: Some(64), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/loongarch64_unknown_none.rs b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs index dbc96d68eae..3b1ea8e206f 100644 --- a/compiler/rustc_target/src/spec/loongarch64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs @@ -1,5 +1,5 @@ -use super::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy, RelocModel}; -use super::{Target, TargetOptions}; +use crate::spec::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy, RelocModel}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { diff --git a/compiler/rustc_target/src/spec/loongarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs index c4d5c7bc44c..ab9300ef9c7 100644 --- a/compiler/rustc_target/src/spec/loongarch64_unknown_none_softfloat.rs +++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs @@ -1,5 +1,5 @@ -use super::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy, RelocModel}; -use super::{Target, TargetOptions}; +use crate::spec::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy, RelocModel}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { diff --git a/compiler/rustc_target/src/spec/m68k_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/m68k_unknown_linux_gnu.rs index 9bcd56bed00..b54f5d753cc 100644 --- a/compiler/rustc_target/src/spec/m68k_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/m68k_unknown_linux_gnu.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); + let mut base = base::linux_gnu::opts(); base.cpu = "M68020".into(); base.max_atomic_width = Some(32); diff --git a/compiler/rustc_target/src/spec/mips64_openwrt_linux_musl.rs b/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs index 3c6ef52c6cd..6191a6dfd41 100644 --- a/compiler/rustc_target/src/spec/mips64_openwrt_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs @@ -1,10 +1,10 @@ /// A target tuple for OpenWrt MIPS64 targets /// use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_musl_base::opts(); + let mut base = base::linux_musl::opts(); base.cpu = "mips64r2".into(); base.features = "+mips64r2,+soft-float".into(); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_gnuabi64.rs index b9df0046b12..e1131f07f26 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_gnuabi64.rs @@ -1,5 +1,5 @@ use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -16,7 +16,7 @@ pub fn target() -> Target { max_atomic_width: Some(64), mcount: "_mcount".into(), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_muslabi64.rs index 465e97a026c..147c1c22476 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_muslabi64.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_musl_base::opts(); + let mut base = base::linux_musl::opts(); base.cpu = "mips64r2".into(); base.features = "+mips64r2".into(); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_gnuabi64.rs index 57ad8c47399..4c612554d20 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_gnuabi64.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -14,7 +14,7 @@ pub fn target() -> Target { max_atomic_width: Some(64), mcount: "_mcount".into(), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_muslabi64.rs index 75575eb7eeb..d60404f0ce5 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_muslabi64.rs @@ -1,7 +1,7 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_musl_base::opts(); + let mut base = base::linux_musl::opts(); base.cpu = "mips64r2".into(); base.features = "+mips64r2".into(); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/mips_unknown_linux_gnu.rs index 8df8b0b4c2c..c49b89bbd46 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/mips_unknown_linux_gnu.rs @@ -1,5 +1,5 @@ use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -14,7 +14,7 @@ pub fn target() -> Target { max_atomic_width: Some(32), mcount: "_mcount".into(), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/mips_unknown_linux_musl.rs index c2846313a9e..92d2d9d84c1 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/mips_unknown_linux_musl.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_musl_base::opts(); + let mut base = base::linux_musl::opts(); base.cpu = "mips32r2".into(); base.features = "+mips32r2,+soft-float".into(); base.max_atomic_width = Some(32); diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/targets/mips_unknown_linux_uclibc.rs index c59bb5fdd22..51df0a974cb 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/targets/mips_unknown_linux_uclibc.rs @@ -1,5 +1,5 @@ use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -14,7 +14,7 @@ pub fn target() -> Target { max_atomic_width: Some(32), mcount: "_mcount".into(), - ..super::linux_uclibc_base::opts() + ..base::linux_uclibc::opts() }, } } diff --git a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs b/compiler/rustc_target/src/spec/targets/mipsel_sony_psp.rs index 75beb91b13a..75beb91b13a 100644 --- a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_sony_psp.rs diff --git a/compiler/rustc_target/src/spec/mipsel_sony_psp_linker_script.ld b/compiler/rustc_target/src/spec/targets/mipsel_sony_psp_linker_script.ld index 9eb35ad9f5d..9eb35ad9f5d 100644 --- a/compiler/rustc_target/src/spec/mipsel_sony_psp_linker_script.ld +++ b/compiler/rustc_target/src/spec/targets/mipsel_sony_psp_linker_script.ld diff --git a/compiler/rustc_target/src/spec/mipsel_sony_psx.rs b/compiler/rustc_target/src/spec/targets/mipsel_sony_psx.rs index 12a66efdd46..12a66efdd46 100644 --- a/compiler/rustc_target/src/spec/mipsel_sony_psx.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_sony_psx.rs diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_gnu.rs index 01346e71a92..c2e482148cd 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { max_atomic_width: Some(32), mcount: "_mcount".into(), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_musl.rs index 0e8f1a2c8e0..5eed050453d 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_musl.rs @@ -1,7 +1,7 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_musl_base::opts(); + let mut base = base::linux_musl::opts(); base.cpu = "mips32r2".into(); base.features = "+mips32r2,+soft-float".into(); base.max_atomic_width = Some(32); diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_uclibc.rs index 8342074586b..77e69119d16 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_uclibc.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { max_atomic_width: Some(32), mcount: "_mcount".into(), - ..super::linux_uclibc_base::opts() + ..base::linux_uclibc::opts() }, } } diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/mipsel_unknown_netbsd.rs index 651358d6422..706a1af3e15 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_unknown_netbsd.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::netbsd_base::opts(); + let mut base = base::netbsd::opts(); base.max_atomic_width = Some(32); base.cpu = "mips32".into(); diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_none.rs b/compiler/rustc_target/src/spec/targets/mipsel_unknown_none.rs index 43b01e7a062..43b01e7a062 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_unknown_none.rs diff --git a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/mipsisa32r6_unknown_linux_gnu.rs index 983a449b006..59783882e18 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/mipsisa32r6_unknown_linux_gnu.rs @@ -1,5 +1,5 @@ use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -14,7 +14,7 @@ pub fn target() -> Target { max_atomic_width: Some(32), mcount: "_mcount".into(), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/mipsisa32r6el_unknown_linux_gnu.rs index ec0facdfb7b..c3d79412e1c 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/mipsisa32r6el_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { max_atomic_width: Some(32), mcount: "_mcount".into(), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/targets/mipsisa64r6_unknown_linux_gnuabi64.rs index 16dd1c416f4..2ae6e7521f9 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/targets/mipsisa64r6_unknown_linux_gnuabi64.rs @@ -1,5 +1,5 @@ use crate::abi::Endian; -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -16,7 +16,7 @@ pub fn target() -> Target { max_atomic_width: Some(64), mcount: "_mcount".into(), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/targets/mipsisa64r6el_unknown_linux_gnuabi64.rs index 8d0a6aa8f51..31637e9f6d0 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/targets/mipsisa64r6el_unknown_linux_gnuabi64.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -14,7 +14,7 @@ pub fn target() -> Target { max_atomic_width: Some(64), mcount: "_mcount".into(), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/msp430_none_elf.rs b/compiler/rustc_target/src/spec/targets/msp430_none_elf.rs index 251fd2a0a7a..251fd2a0a7a 100644 --- a/compiler/rustc_target/src/spec/msp430_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/msp430_none_elf.rs diff --git a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs b/compiler/rustc_target/src/spec/targets/nvptx64_nvidia_cuda.rs index b0582b235b9..b0582b235b9 100644 --- a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs +++ b/compiler/rustc_target/src/spec/targets/nvptx64_nvidia_cuda.rs diff --git a/compiler/rustc_target/src/spec/powerpc64_ibm_aix.rs b/compiler/rustc_target/src/spec/targets/powerpc64_ibm_aix.rs index 4e105a03e28..c512e4c7c48 100644 --- a/compiler/rustc_target/src/spec/powerpc64_ibm_aix.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64_ibm_aix.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Target}; pub fn target() -> Target { - let mut base = super::aix_base::opts(); + let mut base = base::aix::opts(); base.max_atomic_width = Some(64); base.add_pre_link_args( LinkerFlavor::Unix(Cc::No), diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_freebsd.rs index e8fe55a00db..e470ec05eff 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_freebsd.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::freebsd_base::opts(); + let mut base = base::freebsd::opts(); base.cpu = "ppc64".into(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_gnu.rs index 7a0cc539f1a..34e3184d348 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_gnu.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); + let mut base = base::linux_gnu::opts(); base.cpu = "ppc64".into(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_musl.rs index f80b22828c1..e2e707f4a1a 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_musl.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_musl_base::opts(); + let mut base = base::linux_musl::opts(); base.cpu = "ppc64".into(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_openbsd.rs index 3643f7b0c37..ebaeb04be31 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_openbsd.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::openbsd_base::opts(); + let mut base = base::openbsd::opts(); base.cpu = "ppc64".into(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/targets/powerpc64_wrs_vxworks.rs index b0472e64e13..e2085ba7ce3 100644 --- a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64_wrs_vxworks.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::vxworks_base::opts(); + let mut base = base::vxworks::opts(); base.cpu = "ppc64".into(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_freebsd.rs index 342b1cf4f4c..b399d36d8b2 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_freebsd.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::freebsd_base::opts(); + let mut base = base::freebsd::opts(); base.cpu = "ppc64le".into(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_gnu.rs index 815e3d2781c..194c3170e68 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_gnu.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); + let mut base = base::linux_gnu::opts(); base.cpu = "ppc64le".into(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_musl.rs index 0b9b78bcec8..1f53e689598 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_musl.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_musl_base::opts(); + let mut base = base::linux_musl::opts(); base.cpu = "ppc64le".into(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/powerpc_unknown_freebsd.rs index e036f5bdbad..6d094f9a367 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_unknown_freebsd.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::freebsd_base::opts(); + let mut base = base::freebsd::opts(); // Extra hint to linker that we are generating secure-PLT code. base.add_pre_link_args( LinkerFlavor::Gnu(Cc::Yes, Lld::No), diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnu.rs index c8d6f8b9c67..1600698da44 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnu.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); + let mut base = base::linux_gnu::opts(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]); base.max_atomic_width = Some(32); base.stack_probes = StackProbeType::Inline; diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs b/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnuspe.rs index fdaa9d366d9..af0fbfebef2 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnuspe.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); + let mut base = base::linux_gnu::opts(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-mspe"]); base.max_atomic_width = Some(32); base.stack_probes = StackProbeType::Inline; diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_musl.rs index 7fe708cf530..9b0ac4a0fc9 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_musl.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::linux_musl_base::opts(); + let mut base = base::linux_musl::opts(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]); base.max_atomic_width = Some(32); base.stack_probes = StackProbeType::Inline; diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/powerpc_unknown_netbsd.rs index 6f8875ba7b4..bc2e239d9a5 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_unknown_netbsd.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::netbsd_base::opts(); + let mut base = base::netbsd::opts(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]); base.max_atomic_width = Some(32); base.stack_probes = StackProbeType::Inline; diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/powerpc_unknown_openbsd.rs index 280d36698b4..081aaaea249 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_unknown_openbsd.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{StackProbeType, Target}; +use crate::spec::{base, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::openbsd_base::opts(); + let mut base = base::openbsd::opts(); base.endian = Endian::Big; base.max_atomic_width = Some(32); base.stack_probes = StackProbeType::Inline; diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs b/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks.rs index 6f245e6ab62..e8bccc15385 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::vxworks_base::opts(); + let mut base = base::vxworks::opts(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32", "--secure-plt"]); base.max_atomic_width = Some(32); base.stack_probes = StackProbeType::Inline; diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs b/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks_spe.rs index 1d5a5e5c6ac..fa4ef098e03 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks_spe.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::vxworks_base::opts(); + let mut base = base::vxworks::opts(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-mspe", "--secure-plt"]); base.max_atomic_width = Some(32); base.stack_probes = StackProbeType::Inline; diff --git a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs index bffd377bc4a..06e8f183763 100644 --- a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{CodeModel, Target, TargetOptions}; +use crate::spec::{base, CodeModel, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -12,7 +12,7 @@ pub fn target() -> Target { features: "+m,+a,+f,+d,+c".into(), llvm_abiname: "ilp32d".into(), max_atomic_width: Some(32), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs index c9f3acffb77..722703d2384 100644 --- a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs @@ -1,4 +1,4 @@ -use crate::spec::{CodeModel, Target, TargetOptions}; +use crate::spec::{base, CodeModel, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -12,7 +12,7 @@ pub fn target() -> Target { features: "+m,+a,+f,+d,+c".into(), llvm_abiname: "ilp32d".into(), max_atomic_width: Some(32), - ..super::linux_musl_base::opts() + ..base::linux_musl::opts() }, } } diff --git a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32i_unknown_none_elf.rs index 75a65a26849..75a65a26849 100644 --- a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32i_unknown_none_elf.rs diff --git a/compiler/rustc_target/src/spec/riscv32im_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32im_unknown_none_elf.rs index f2242bbe087..f2242bbe087 100644 --- a/compiler/rustc_target/src/spec/riscv32im_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32im_unknown_none_elf.rs diff --git a/compiler/rustc_target/src/spec/riscv32imac_esp_espidf.rs b/compiler/rustc_target/src/spec/targets/riscv32imac_esp_espidf.rs index 25f5c3bc2a6..25f5c3bc2a6 100644 --- a/compiler/rustc_target/src/spec/riscv32imac_esp_espidf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imac_esp_espidf.rs diff --git a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_none_elf.rs index 55c6e4d16e5..55c6e4d16e5 100644 --- a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_none_elf.rs diff --git a/compiler/rustc_target/src/spec/riscv32imac_unknown_xous_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_xous_elf.rs index a263e5d5cde..a263e5d5cde 100644 --- a/compiler/rustc_target/src/spec/riscv32imac_unknown_xous_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_xous_elf.rs diff --git a/compiler/rustc_target/src/spec/riscv32imc_esp_espidf.rs b/compiler/rustc_target/src/spec/targets/riscv32imc_esp_espidf.rs index 3aa9923ee4d..3aa9923ee4d 100644 --- a/compiler/rustc_target/src/spec/riscv32imc_esp_espidf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imc_esp_espidf.rs diff --git a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_none_elf.rs index 01e773fae97..01e773fae97 100644 --- a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_none_elf.rs diff --git a/compiler/rustc_target/src/spec/riscv64_linux_android.rs b/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs index 121237f6ba4..40e447dbb83 100644 --- a/compiler/rustc_target/src/spec/riscv64_linux_android.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs @@ -1,4 +1,4 @@ -use crate::spec::{CodeModel, SanitizerSet, Target, TargetOptions}; +use crate::spec::{base, CodeModel, SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { llvm_abiname: "lp64d".into(), supported_sanitizers: SanitizerSet::ADDRESS, max_atomic_width: Some(64), - ..super::android_base::opts() + ..base::android::opts() }, } } diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_freebsd.rs index 8281bac10f8..2c7878de812 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_freebsd.rs @@ -1,4 +1,4 @@ -use crate::spec::{CodeModel, Target, TargetOptions}; +use crate::spec::{base, CodeModel, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -12,7 +12,7 @@ pub fn target() -> Target { features: "+m,+a,+f,+d,+c".into(), llvm_abiname: "lp64d".into(), max_atomic_width: Some(64), - ..super::freebsd_base::opts() + ..base::freebsd::opts() }, } } diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_fuchsia.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_fuchsia.rs index 0585ed76fe8..a29470c24fb 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_fuchsia.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_fuchsia.rs @@ -1,4 +1,4 @@ -use crate::spec::{CodeModel, SanitizerSet, Target, TargetOptions}; +use crate::spec::{base, CodeModel, SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { llvm_abiname: "lp64d".into(), max_atomic_width: Some(64), supported_sanitizers: SanitizerSet::SHADOWCALLSTACK, - ..super::fuchsia_base::opts() + ..base::fuchsia::opts() }, } } diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_hermit.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_hermit.rs index 1f6a34c0cac..b7e29d2da3d 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_hermit.rs @@ -1,4 +1,4 @@ -use crate::spec::{CodeModel, RelocModel, Target, TargetOptions, TlsModel}; +use crate::spec::{base, CodeModel, RelocModel, Target, TargetOptions, TlsModel}; pub fn target() -> Target { Target { @@ -14,7 +14,7 @@ pub fn target() -> Target { tls_model: TlsModel::LocalExec, max_atomic_width: Some(64), llvm_abiname: "lp64d".into(), - ..super::hermit_base::opts() + ..base::hermit::opts() }, } } diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs index 90dccb28063..c0969d4e11e 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{CodeModel, Target, TargetOptions}; +use crate::spec::{base, CodeModel, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -12,7 +12,7 @@ pub fn target() -> Target { features: "+m,+a,+f,+d,+c".into(), llvm_abiname: "lp64d".into(), max_atomic_width: Some(64), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs index 1a56c78e685..656e260d094 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs @@ -1,4 +1,4 @@ -use crate::spec::{CodeModel, Target, TargetOptions}; +use crate::spec::{base, CodeModel, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -12,7 +12,7 @@ pub fn target() -> Target { features: "+m,+a,+f,+d,+c".into(), llvm_abiname: "lp64d".into(), max_atomic_width: Some(64), - ..super::linux_musl_base::opts() + ..base::linux_musl::opts() }, } } diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_netbsd.rs index a89bd363a47..43a313a9408 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_netbsd.rs @@ -1,4 +1,4 @@ -use crate::spec::{CodeModel, Target, TargetOptions}; +use crate::spec::{base, CodeModel, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { llvm_abiname: "lp64d".into(), max_atomic_width: Some(64), mcount: "__mcount".into(), - ..super::netbsd_base::opts() + ..base::netbsd::opts() }, } } diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_none_elf.rs index ab3c14e3fe7..f29e224244e 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_none_elf.rs @@ -1,8 +1,7 @@ +use crate::spec::SanitizerSet; use crate::spec::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy}; use crate::spec::{RelocModel, Target, TargetOptions}; -use super::SanitizerSet; - pub fn target() -> Target { Target { data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_openbsd.rs index ade9d77624b..1f1da7d5a29 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_openbsd.rs @@ -1,4 +1,4 @@ -use crate::spec::{CodeModel, Target, TargetOptions}; +use crate::spec::{base, CodeModel, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -12,7 +12,7 @@ pub fn target() -> Target { features: "+m,+a,+f,+d,+c".into(), llvm_abiname: "lp64d".into(), max_atomic_width: Some(64), - ..super::openbsd_base::opts() + ..base::openbsd::opts() }, } } diff --git a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_none_elf.rs index 0f1821c9985..0f1821c9985 100644 --- a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_none_elf.rs diff --git a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs index f2c722b9a89..6fc410eb223 100644 --- a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{SanitizerSet, StackProbeType, Target}; +use crate::spec::{base, SanitizerSet, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); + let mut base = base::linux_gnu::opts(); base.endian = Endian::Big; // z10 is the oldest CPU supported by LLVM base.cpu = "z10".into(); diff --git a/compiler/rustc_target/src/spec/s390x_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_musl.rs index 8fe9d023c52..03772aab372 100644 --- a/compiler/rustc_target/src/spec/s390x_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_musl.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{SanitizerSet, StackProbeType, Target}; +use crate::spec::{base, SanitizerSet, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::linux_musl_base::opts(); + let mut base = base::linux_musl::opts(); base.endian = Endian::Big; // z10 is the oldest CPU supported by LLVM base.cpu = "z10".into(); diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/sparc64_unknown_linux_gnu.rs index 39efd8f305c..20ec9a84e8b 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/sparc64_unknown_linux_gnu.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::Target; +use crate::spec::{base, Target}; pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); + let mut base = base::linux_gnu::opts(); base.endian = Endian::Big; base.cpu = "v9".into(); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/sparc64_unknown_netbsd.rs index 38ab066b087..c8c0fd2e134 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/sparc64_unknown_netbsd.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::netbsd_base::opts(); + let mut base = base::netbsd::opts(); base.cpu = "v9".into(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/sparc64_unknown_openbsd.rs index 06a5f782a6d..82ce610066a 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/sparc64_unknown_openbsd.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, Target}; pub fn target() -> Target { - let mut base = super::openbsd_base::opts(); + let mut base = base::openbsd::opts(); base.endian = Endian::Big; base.cpu = "v9".into(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); diff --git a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/sparc_unknown_linux_gnu.rs index b10e6264b73..548fbb9ed52 100644 --- a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/sparc_unknown_linux_gnu.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Lld, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, Target}; pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); + let mut base = base::linux_gnu::opts(); base.endian = Endian::Big; base.cpu = "v9".into(); base.max_atomic_width = Some(32); diff --git a/compiler/rustc_target/src/spec/sparc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/sparc_unknown_none_elf.rs index 7e908a0f365..7e908a0f365 100644 --- a/compiler/rustc_target/src/spec/sparc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/sparc_unknown_none_elf.rs diff --git a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs b/compiler/rustc_target/src/spec/targets/sparcv9_sun_solaris.rs index 4d2bc98ab78..16cd991dd28 100644 --- a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/targets/sparcv9_sun_solaris.rs @@ -1,8 +1,8 @@ use crate::abi::Endian; -use crate::spec::{Cc, LinkerFlavor, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Target}; pub fn target() -> Target { - let mut base = super::solaris_base::opts(); + let mut base = base::solaris::opts(); base.endian = Endian::Big; base.add_pre_link_args(LinkerFlavor::Unix(Cc::Yes), &["-m64"]); // llvm calls this "v9" diff --git a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv4t_none_eabi.rs index 88a76f49acd..7b5c019b1bb 100644 --- a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv4t_none_eabi.rs @@ -9,8 +9,8 @@ //! The default link script is very likely wrong, so you should use //! `-Clink-arg=-Tmy_script.ld` to override that with a correct linker script. +use crate::spec::{base, PanicStrategy, RelocModel, Target, TargetOptions}; use crate::spec::{cvs, FramePointer}; -use crate::spec::{PanicStrategy, RelocModel, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -53,7 +53,7 @@ pub fn target() -> Target { atomic_cas: false, has_thumb_interworking: true, - ..super::thumb_base::opts() + ..base::thumb::opts() }, } } diff --git a/compiler/rustc_target/src/spec/thumbv5te_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv5te_none_eabi.rs index 021b0e0eb62..d9212afb084 100644 --- a/compiler/rustc_target/src/spec/thumbv5te_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv5te_none_eabi.rs @@ -1,6 +1,6 @@ //! Targets the ARMv5TE, with code as `t32` code by default. -use crate::spec::{cvs, FramePointer, Target, TargetOptions}; +use crate::spec::{base, cvs, FramePointer, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -35,7 +35,7 @@ pub fn target() -> Target { atomic_cas: false, has_thumb_interworking: true, - ..super::thumb_base::opts() + ..base::thumb::opts() }, } } diff --git a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv6m_none_eabi.rs index c9bb0112f0e..ac076fb8864 100644 --- a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv6m_none_eabi.rs @@ -1,6 +1,6 @@ // Targets the Cortex-M0, Cortex-M0+ and Cortex-M1 processors (ARMv6-M architecture) -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -19,7 +19,7 @@ pub fn target() -> Target { // There are no atomic CAS instructions available in the instruction set of the ARMv6-M // architecture atomic_cas: false, - ..super::thumb_base::opts() + ..base::thumb::opts() }, } } diff --git a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/thumbv7a_pc_windows_msvc.rs index f1be274f067..128ac1dd179 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7a_pc_windows_msvc.rs @@ -1,7 +1,7 @@ -use crate::spec::{LinkerFlavor, Lld, PanicStrategy, Target, TargetOptions}; +use crate::spec::{base, LinkerFlavor, Lld, PanicStrategy, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::windows_msvc_base::opts(); + let mut base = base::windows_msvc::opts(); // Prevent error LNK2013: BRANCH24(T) fixup overflow // The LBR optimization tries to eliminate branch islands, // but if the displacement is larger than can fit diff --git a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/thumbv7a_uwp_windows_msvc.rs index 65c2f5a704b..810ed6a2404 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7a_uwp_windows_msvc.rs @@ -1,4 +1,4 @@ -use crate::spec::{PanicStrategy, Target, TargetOptions}; +use crate::spec::{base, PanicStrategy, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -12,7 +12,7 @@ pub fn target() -> Target { // FIXME(jordanrh): use PanicStrategy::Unwind when SEH is // implemented for windows/arm in LLVM panic_strategy: PanicStrategy::Abort, - ..super::windows_uwp_msvc_base::opts() + ..base::windows_uwp_msvc::opts() }, } } diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv7em_none_eabi.rs index 000e5f2d3c6..1752f1d9aac 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7em_none_eabi.rs @@ -9,7 +9,7 @@ // To opt-in to hardware accelerated floating point operations, you can use, for example, // `-C target-feature=+vfp4` or `-C target-cpu=cortex-m4`. -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -21,7 +21,7 @@ pub fn target() -> Target { options: TargetOptions { abi: "eabi".into(), max_atomic_width: Some(32), - ..super::thumb_base::opts() + ..base::thumb::opts() }, } } diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/thumbv7em_none_eabihf.rs index 39a72564e49..c113c62fc1d 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7em_none_eabihf.rs @@ -8,7 +8,7 @@ // // To opt into double precision hardware support, use the `-C target-feature=+fp64` flag. -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -30,7 +30,7 @@ pub fn target() -> Target { // ARMv7-M Architecture Reference Manual - A2.5 The optional floating-point extension features: "+vfp4,-d32,-fp64".into(), max_atomic_width: Some(32), - ..super::thumb_base::opts() + ..base::thumb::opts() }, } } diff --git a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv7m_none_eabi.rs index ab25cde66c7..f9ab3ce1ad0 100644 --- a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7m_none_eabi.rs @@ -1,6 +1,6 @@ // Targets the Cortex-M3 processor (ARMv7-M) -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -12,7 +12,7 @@ pub fn target() -> Target { options: TargetOptions { abi: "eabi".into(), max_atomic_width: Some(32), - ..super::thumb_base::opts() + ..base::thumb::opts() }, } } diff --git a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs b/compiler/rustc_target/src/spec/targets/thumbv7neon_linux_androideabi.rs index 624837a22d6..c07aa944d7e 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7neon_linux_androideabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, Target, TargetOptions}; // This target if is for the Android v7a ABI in thumb mode with // NEON unconditionally enabled and, therefore, with 32 FPU registers @@ -9,7 +9,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, Target, TargetOptions}; // for target ABI requirements. pub fn target() -> Target { - let mut base = super::android_base::opts(); + let mut base = base::android::opts(); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-march=armv7-a"]); Target { llvm_target: "armv7-none-linux-android".into(), diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_gnueabihf.rs index b500c50de98..b4045037c6a 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_gnueabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; // This target is for glibc Linux on ARMv7 with thumb mode enabled // (for consistency with Android and Debian-based distributions) @@ -17,7 +17,7 @@ pub fn target() -> Target { // Info about features at https://wiki.debian.org/ArmHardFloatPort features: "+v7,+thumb-mode,+thumb2,+vfp3,+neon".into(), max_atomic_width: Some(64), - ..super::linux_gnu_base::opts() + ..base::linux_gnu::opts() }, } } diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_musleabihf.rs index dce0cbcef02..6ef30f10fe4 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_musleabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; // This target is for musl Linux on ARMv7 with thumb mode enabled // (for consistency with Android and Debian-based distributions) @@ -23,7 +23,7 @@ pub fn target() -> Target { features: "+v7,+thumb-mode,+thumb2,+vfp3,+neon".into(), max_atomic_width: Some(64), mcount: "\u{1}mcount".into(), - ..super::linux_musl_base::opts() + ..base::linux_musl::opts() }, } } diff --git a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv8m_base_none_eabi.rs index 756b1834c82..bf62574867a 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv8m_base_none_eabi.rs @@ -1,6 +1,6 @@ // Targets the Cortex-M23 processor (Baseline ARMv8-M) -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -15,7 +15,7 @@ pub fn target() -> Target { // with +strict-align. features: "+strict-align".into(), max_atomic_width: Some(32), - ..super::thumb_base::opts() + ..base::thumb::opts() }, } } diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabi.rs index 4b626854654..07fc7feade5 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabi.rs @@ -1,7 +1,7 @@ // Targets the Cortex-M33 processor (Armv8-M Mainline architecture profile), // without the Floating Point extension. -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { options: TargetOptions { abi: "eabi".into(), max_atomic_width: Some(32), - ..super::thumb_base::opts() + ..base::thumb::opts() }, } } diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabihf.rs index 86c25f9e4b9..61d4e8fc802 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabihf.rs @@ -1,7 +1,7 @@ // Targets the Cortex-M33 processor (Armv8-M Mainline architecture profile), // with the Floating Point extension. -use crate::spec::{Target, TargetOptions}; +use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -19,7 +19,7 @@ pub fn target() -> Target { // These parameters map to the following LLVM features. features: "+fp-armv8,-fp64,-d32".into(), max_atomic_width: Some(32), - ..super::thumb_base::opts() + ..base::thumb::opts() }, } } diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs b/compiler/rustc_target/src/spec/targets/wasm32_unknown_emscripten.rs index 6f77ef98c01..394f02ecac4 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_unknown_emscripten.rs @@ -1,5 +1,6 @@ -use super::{cvs, wasm_base}; -use super::{LinkArgs, LinkerFlavor, PanicStrategy, RelocModel, Target, TargetOptions}; +use crate::spec::{ + base, cvs, LinkArgs, LinkerFlavor, PanicStrategy, RelocModel, Target, TargetOptions, +}; pub fn target() -> Target { // Reset flags for non-Em flavors back to empty to satisfy sanity checking tests. @@ -22,7 +23,7 @@ pub fn target() -> Target { panic_strategy: PanicStrategy::Unwind, no_default_libraries: false, families: cvs!["unix", "wasm"], - ..wasm_base::options() + ..base::wasm::options() }; Target { llvm_target: "wasm32-unknown-emscripten".into(), diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs b/compiler/rustc_target/src/spec/targets/wasm32_unknown_unknown.rs index 06529c2e403..2a40d9c6637 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_unknown_unknown.rs @@ -10,11 +10,11 @@ //! This target is more or less managed by the Rust and WebAssembly Working //! Group nowadays at <https://github.com/rustwasm>. -use super::{wasm_base, Cc, LinkerFlavor, Target}; use crate::spec::abi::Abi; +use crate::spec::{base, Cc, LinkerFlavor, Target}; pub fn target() -> Target { - let mut options = wasm_base::options(); + let mut options = base::wasm::options(); options.os = "unknown".into(); // This is a default for backwards-compatibility with the original diff --git a/compiler/rustc_target/src/spec/wasm32_wasi.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasi.rs index 23fabcdc90d..6dbcb01ea43 100644 --- a/compiler/rustc_target/src/spec/wasm32_wasi.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_wasi.rs @@ -72,12 +72,12 @@ //! best we can with this target. Don't start relying on too much here unless //! you know what you're getting in to! -use super::crt_objects; -use super::LinkSelfContainedDefault; -use super::{wasm_base, Cc, LinkerFlavor, Target}; +use crate::spec::crt_objects; +use crate::spec::LinkSelfContainedDefault; +use crate::spec::{base, Cc, LinkerFlavor, Target}; pub fn target() -> Target { - let mut options = wasm_base::options(); + let mut options = base::wasm::options(); options.os = "wasi".into(); options.add_pre_link_args(LinkerFlavor::WasmLld(Cc::Yes), &["--target=wasm32-wasi"]); diff --git a/compiler/rustc_target/src/spec/wasm32_wasi_preview1_threads.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasi_preview1_threads.rs index ba9a99ae380..28ea4cc9ece 100644 --- a/compiler/rustc_target/src/spec/wasm32_wasi_preview1_threads.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_wasi_preview1_threads.rs @@ -72,11 +72,10 @@ //! best we can with this target. Don't start relying on too much here unless //! you know what you're getting in to! -use super::{crt_objects, wasm_base}; -use super::{Cc, LinkSelfContainedDefault, LinkerFlavor, Target}; +use crate::spec::{base, crt_objects, Cc, LinkSelfContainedDefault, LinkerFlavor, Target}; pub fn target() -> Target { - let mut options = wasm_base::options(); + let mut options = base::wasm::options(); options.os = "wasi".into(); diff --git a/compiler/rustc_target/src/spec/wasm64_unknown_unknown.rs b/compiler/rustc_target/src/spec/targets/wasm64_unknown_unknown.rs index 3fda398d24c..54c5ae8e203 100644 --- a/compiler/rustc_target/src/spec/wasm64_unknown_unknown.rs +++ b/compiler/rustc_target/src/spec/targets/wasm64_unknown_unknown.rs @@ -7,10 +7,10 @@ //! the standard library is available, most of it returns an error immediately //! (e.g. trying to create a TCP stream or something like that). -use super::{wasm_base, Cc, LinkerFlavor, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Target}; pub fn target() -> Target { - let mut options = wasm_base::options(); + let mut options = base::wasm::options(); options.os = "unknown".into(); options.add_pre_link_args( diff --git a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs b/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs index e3f5d7321d1..9170a10d254 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs @@ -1,4 +1,4 @@ -use super::apple_base::{macos_llvm_target, opts, Arch}; +use crate::spec::base::apple::{macos_llvm_target, opts, Arch}; use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, SanitizerSet}; use crate::spec::{StackProbeType, Target, TargetOptions}; diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs b/compiler/rustc_target/src/spec/targets/x86_64_apple_ios.rs index 061b6a96fc8..d9f3f7de655 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_apple_ios.rs @@ -1,4 +1,4 @@ -use super::apple_base::{ios_sim_llvm_target, opts, Arch}; +use crate::spec::base::apple::{ios_sim_llvm_target, opts, Arch}; use crate::spec::{SanitizerSet, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs b/compiler/rustc_target/src/spec/targets/x86_64_apple_ios_macabi.rs index fd1926f2945..5e6fbac34d7 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_apple_ios_macabi.rs @@ -1,4 +1,4 @@ -use super::apple_base::{opts, Arch}; +use crate::spec::base::apple::{opts, Arch}; use crate::spec::{Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs b/compiler/rustc_target/src/spec/targets/x86_64_apple_tvos.rs index 2ec4d9569e3..1c4d9196c18 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_apple_tvos.rs @@ -1,4 +1,4 @@ -use super::apple_base::{opts, tvos_sim_llvm_target, Arch}; +use crate::spec::base::apple::{opts, tvos_sim_llvm_target, Arch}; use crate::spec::{StackProbeType, Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/x86_64_apple_watchos_sim.rs b/compiler/rustc_target/src/spec/targets/x86_64_apple_watchos_sim.rs index 5fcc00a86ff..258148677fb 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_watchos_sim.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_apple_watchos_sim.rs @@ -1,4 +1,4 @@ -use super::apple_base::{opts, watchos_sim_llvm_target, Arch}; +use crate::spec::base::apple::{opts, watchos_sim_llvm_target, Arch}; use crate::spec::{StackProbeType, Target, TargetOptions}; pub fn target() -> Target { diff --git a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs b/compiler/rustc_target/src/spec/targets/x86_64_fortanix_unknown_sgx.rs index a7ed74f4721..f4117edc3ff 100644 --- a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_fortanix_unknown_sgx.rs @@ -1,6 +1,6 @@ use std::borrow::Cow; -use super::{cvs, Cc, LinkerFlavor, Lld, Target, TargetOptions}; +use crate::spec::{cvs, Cc, LinkerFlavor, Lld, Target, TargetOptions}; pub fn target() -> Target { let pre_link_args = TargetOptions::link_args( diff --git a/compiler/rustc_target/src/spec/targets/x86_64_fuchsia.rs b/compiler/rustc_target/src/spec/targets/x86_64_fuchsia.rs new file mode 100644 index 00000000000..46df00e9c02 --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/x86_64_fuchsia.rs @@ -0,0 +1 @@ +pub use crate::spec::targets::x86_64_unknown_fuchsia::target; diff --git a/compiler/rustc_target/src/spec/x86_64_linux_android.rs b/compiler/rustc_target/src/spec/targets/x86_64_linux_android.rs index c110674fd87..6cffda44fa9 100644 --- a/compiler/rustc_target/src/spec/x86_64_linux_android.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_linux_android.rs @@ -1,7 +1,9 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target, TargetOptions}; +use crate::spec::{ + base, Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target, TargetOptions, +}; pub fn target() -> Target { - let mut base = super::android_base::opts(); + let mut base = base::android::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; // https://developer.android.com/ndk/guides/abis.html#86-64 diff --git a/compiler/rustc_target/src/spec/x86_64_pc_nto_qnx710.rs b/compiler/rustc_target/src/spec/targets/x86_64_pc_nto_qnx710.rs index 8424757df07..93aec4c425a 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_nto_qnx710.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_pc_nto_qnx710.rs @@ -1,5 +1,4 @@ -use super::nto_qnx_base; -use crate::spec::{Cc, LinkerFlavor, Lld, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -17,7 +16,7 @@ pub fn target() -> Target { &["-Vgcc_ntox86_64_cxx"], ), env: "nto71".into(), - ..nto_qnx_base::opts() + ..base::nto_qnx::opts() }, } } diff --git a/compiler/rustc_target/src/spec/x86_64_pc_solaris.rs b/compiler/rustc_target/src/spec/targets/x86_64_pc_solaris.rs index e2c59d2938e..ca6a6dc500b 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_solaris.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_pc_solaris.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, SanitizerSet, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, SanitizerSet, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::solaris_base::opts(); + let mut base = base::solaris::opts(); base.add_pre_link_args(LinkerFlavor::Unix(Cc::Yes), &["-m64"]); base.cpu = "x86-64".into(); base.plt_by_default = false; diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnu.rs index 1b8885c34da..6d3e0727051 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnu.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, Target}; pub fn target() -> Target { - let mut base = super::windows_gnu_base::opts(); + let mut base = base::windows_gnu::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; // Use high-entropy 64 bit address space for ASLR diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnullvm.rs b/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnullvm.rs index 8f5e398a0be..a56ebfa585e 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnullvm.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnullvm.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, Target}; pub fn target() -> Target { - let mut base = super::windows_gnullvm_base::opts(); + let mut base = base::windows_gnullvm::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_msvc.rs index 6b897ca7070..7d6276a0c2d 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_msvc.rs @@ -1,7 +1,7 @@ -use crate::spec::Target; +use crate::spec::{base, Target}; pub fn target() -> Target { - let mut base = super::windows_msvc_base::opts(); + let mut base = base::windows_msvc::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs b/compiler/rustc_target/src/spec/targets/x86_64_sun_solaris.rs index 650065f6330..cca099d3bbf 100644 --- a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_sun_solaris.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::solaris_base::opts(); + let mut base = base::solaris::opts(); base.add_pre_link_args(LinkerFlavor::Unix(Cc::Yes), &["-m64"]); base.cpu = "x86-64".into(); base.plt_by_default = false; diff --git a/compiler/rustc_target/src/spec/x86_64_unikraft_linux_musl.rs b/compiler/rustc_target/src/spec/targets/x86_64_unikraft_linux_musl.rs index 2aa093b131f..c12cb1ab00e 100644 --- a/compiler/rustc_target/src/spec/x86_64_unikraft_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unikraft_linux_musl.rs @@ -1,4 +1,4 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { pre_link_args: TargetOptions::link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]), max_atomic_width: Some(64), stack_probes: StackProbeType::X86, - ..super::unikraft_linux_musl_base::opts() + ..base::unikraft_linux_musl::opts() }, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_dragonfly.rs index 3b8e75977b5..68d1a755b79 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_dragonfly.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::dragonfly_base::opts(); + let mut base = base::dragonfly::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_freebsd.rs index b2d91d09996..e3f29fa5afa 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_freebsd.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::freebsd_base::opts(); + let mut base = base::freebsd::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_fuchsia.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_fuchsia.rs index bee93541960..c8850d703e3 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_fuchsia.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_fuchsia.rs @@ -1,7 +1,7 @@ -use crate::spec::{SanitizerSet, StackProbeType, Target}; +use crate::spec::{base, SanitizerSet, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::fuchsia_base::opts(); + let mut base = base::fuchsia::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_haiku.rs index 16ed3150e6e..ca55e6514dd 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_haiku.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::haiku_base::opts(); + let mut base = base::haiku::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_hermit.rs index 1eb06930111..3cc50d40dda 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_hermit.rs @@ -1,4 +1,4 @@ -use crate::spec::{StackProbeType, Target, TargetOptions}; +use crate::spec::{base, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -13,7 +13,7 @@ pub fn target() -> Target { plt_by_default: false, max_atomic_width: Some(64), stack_probes: StackProbeType::X86, - ..super::hermit_base::opts() + ..base::hermit::opts() }, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_illumos.rs index 9259cfe5f0e..eb2b13cb5c2 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_illumos.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, SanitizerSet, Target}; +use crate::spec::{base, Cc, LinkerFlavor, SanitizerSet, Target}; pub fn target() -> Target { - let mut base = super::illumos_base::opts(); + let mut base = base::illumos::opts(); base.add_pre_link_args(LinkerFlavor::Unix(Cc::Yes), &["-m64", "-std=c99"]); base.cpu = "x86-64".into(); base.plt_by_default = false; diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_l4re_uclibc.rs index 912d289c47f..7b86fe738b1 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_l4re_uclibc.rs @@ -1,7 +1,7 @@ -use crate::spec::{PanicStrategy, Target}; +use crate::spec::{base, PanicStrategy, Target}; pub fn target() -> Target { - let mut base = super::l4re_base::opts(); + let mut base = base::l4re::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs index 2f970f87cc6..80e267c163f 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); + let mut base = base::linux_gnu::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnux32.rs index 5469d02c592..622bfe8bbe8 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnux32.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); + let mut base = base::linux_gnu::opts(); base.cpu = "x86-64".into(); base.abi = "x32".into(); base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_musl.rs index 7154f5fa306..d74ff466a01 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_musl.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::linux_musl_base::opts(); + let mut base = base::linux_musl::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_ohos.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_ohos.rs index a96be8cd554..87b004df001 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_ohos.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_ohos.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::linux_ohos_base::opts(); + let mut base = base::linux_ohos::opts(); base.cpu = "x86-64".into(); base.max_atomic_width = Some(64); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_netbsd.rs index 2e7bf34f7d2..04060513abc 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_netbsd.rs @@ -1,7 +1,9 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target, TargetOptions}; +use crate::spec::{ + base, Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target, TargetOptions, +}; pub fn target() -> Target { - let mut base = super::netbsd_base::opts(); + let mut base = base::netbsd::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_none.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs index fe3b24f2d4a..9aa95a35f8e 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs @@ -4,8 +4,8 @@ // `target-cpu` compiler flags to opt-in more hardware-specific // features. -use super::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy}; -use super::{RelroLevel, SanitizerSet, StackProbeType, Target, TargetOptions}; +use crate::spec::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy}; +use crate::spec::{RelroLevel, SanitizerSet, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { let opts = TargetOptions { diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_openbsd.rs index 86fa9bf7ed2..5e6e7efb2de 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_openbsd.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::openbsd_base::opts(); + let mut base = base::openbsd::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_redox.rs index decc9736782..382ff71f019 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_redox.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::redox_base::opts(); + let mut base = base::redox::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs index 41ba768068a..5abfb8162f7 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs @@ -5,10 +5,13 @@ // The win64 ABI is used. It differs from the sysv64 ABI, so we must use a windows target with // LLVM. "x86_64-unknown-windows" is used to get the minimal subset of windows-specific features. -use crate::{abi::call::Conv, spec::Target}; +use crate::{ + abi::call::Conv, + spec::{base, Target}, +}; pub fn target() -> Target { - let mut base = super::uefi_msvc_base::opts(); + let mut base = base::uefi_msvc::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_gnu.rs index 1a9d2a57182..a46d3a0e27b 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_gnu.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, Target}; pub fn target() -> Target { - let mut base = super::windows_uwp_gnu_base::opts(); + let mut base = base::windows_uwp_gnu::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; // Use high-entropy 64 bit address space for ASLR diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_msvc.rs index 1ae403fa83f..a3bc27aa065 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_msvc.rs @@ -1,7 +1,7 @@ -use crate::spec::Target; +use crate::spec::{base, Target}; pub fn target() -> Target { - let mut base = super::windows_uwp_msvc_base::opts(); + let mut base = base::windows_uwp_msvc::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/targets/x86_64_wrs_vxworks.rs index a7c4aaecf91..4b221fe6959 100644 --- a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_wrs_vxworks.rs @@ -1,7 +1,7 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target}; +use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target}; pub fn target() -> Target { - let mut base = super::vxworks_base::opts(); + let mut base = base::vxworks::opts(); base.cpu = "x86-64".into(); base.plt_by_default = false; base.max_atomic_width = Some(64); diff --git a/compiler/rustc_target/src/spec/x86_64h_apple_darwin.rs b/compiler/rustc_target/src/spec/targets/x86_64h_apple_darwin.rs index 54f7490b2c0..a30e9d17cef 100644 --- a/compiler/rustc_target/src/spec/x86_64h_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64h_apple_darwin.rs @@ -1,4 +1,4 @@ -use super::apple_base::{macos_llvm_target, opts, Arch}; +use crate::spec::base::apple::{macos_llvm_target, opts, Arch}; use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, SanitizerSet}; use crate::spec::{StackProbeType, Target, TargetOptions}; diff --git a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs deleted file mode 100644 index 96fed097566..00000000000 --- a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs +++ /dev/null @@ -1 +0,0 @@ -pub use crate::spec::x86_64_unknown_fuchsia::target; diff --git a/src/bootstrap/src/bin/main.rs b/src/bootstrap/src/bin/main.rs index d87fb6a9cef..6c0d8c8c550 100644 --- a/src/bootstrap/src/bin/main.rs +++ b/src/bootstrap/src/bin/main.rs @@ -109,31 +109,35 @@ fn check_version(config: &Config) -> Option<String> { } let latest_config_id = CONFIG_CHANGE_HISTORY.last().unwrap(); - let suggestion = if let Some(id) = config.change_id { - if &id != latest_config_id { + if let Some(id) = config.change_id { + if &id == latest_config_id { + return None; + } + + let change_links: Vec<String> = find_recent_config_change_ids(id) + .iter() + .map(|id| format!("https://github.com/rust-lang/rust/pull/{id}")) + .collect(); + if !change_links.is_empty() { msg.push_str("WARNING: there have been changes to x.py since you last updated.\n"); - let change_links: Vec<String> = find_recent_config_change_ids(id) - .iter() - .map(|id| format!("https://github.com/rust-lang/rust/pull/{id}")) - .collect(); - if !change_links.is_empty() { - msg.push_str("To see more detail about these changes, visit the following PRs:\n"); - for link in change_links { - msg.push_str(&format!(" - {link}\n")); - } + msg.push_str("To see more detail about these changes, visit the following PRs:\n"); + + for link in change_links { + msg.push_str(&format!(" - {link}\n")); } + msg.push_str("WARNING: there have been changes to x.py since you last updated.\n"); - format!("update `config.toml` to use `change-id = {latest_config_id}` instead") - } else { - return None; + + msg.push_str("note: to silence this warning, "); + msg.push_str(&format!( + "update `config.toml` to use `change-id = {latest_config_id}` instead" + )); } } else { msg.push_str("WARNING: The `change-id` is missing in the `config.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.\n"); - format!("add `change-id = {latest_config_id}` at the top of `config.toml`") + msg.push_str("note: to silence this warning, "); + msg.push_str(&format!("add `change-id = {latest_config_id}` at the top of `config.toml`")); }; - msg.push_str("note: to silence this warning, "); - msg.push_str(&suggestion); - Some(msg) } diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index fc3413a3c81..9ec192861f4 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -75,8 +75,9 @@ const LLD_FILE_NAMES: &[&str] = &["ld.lld", "ld64.lld", "lld-link", "wasm-ld"]; /// You can visit `https://github.com/rust-lang/rust/pull/{any-id-from-the-list}` to /// check for more details regarding each change. /// -/// If you make any major changes (such as adding new values or changing default values), please -/// ensure that the associated PR ID is added to the end of this list. +/// If you make any major changes (such as adding new values or changing default values), +/// please ensure that the associated PR ID is added to the end of this list. +/// This is necessary because the list must be sorted by the merge date. pub const CONFIG_CHANGE_HISTORY: &[usize] = &[115898, 116998, 117435, 116881]; /// Extra --check-cfg to add when building @@ -1849,10 +1850,21 @@ fn envify(s: &str) -> String { } pub fn find_recent_config_change_ids(current_id: usize) -> Vec<usize> { - let index = CONFIG_CHANGE_HISTORY - .iter() - .position(|&id| id == current_id) - .expect(&format!("Value `{}` was not found in `CONFIG_CHANGE_HISTORY`.", current_id)); + if !CONFIG_CHANGE_HISTORY.contains(¤t_id) { + // If the current change-id is greater than the most recent one, return + // an empty list (it may be due to switching from a recent branch to an + // older one); otherwise, return the full list (assuming the user provided + // the incorrect change-id by accident). + if let Some(max_id) = CONFIG_CHANGE_HISTORY.iter().max() { + if ¤t_id > max_id { + return Vec::new(); + } + } + + return CONFIG_CHANGE_HISTORY.to_vec(); + } + + let index = CONFIG_CHANGE_HISTORY.iter().position(|&id| id == current_id).unwrap(); CONFIG_CHANGE_HISTORY .iter() diff --git a/tests/rustdoc-json/doc_hidden_failure.rs b/tests/rustdoc-json/doc_hidden_failure.rs index 0d2c6b2209b..e2ce66c99e4 100644 --- a/tests/rustdoc-json/doc_hidden_failure.rs +++ b/tests/rustdoc-json/doc_hidden_failure.rs @@ -1,8 +1,5 @@ // Regression test for <https://github.com/rust-lang/rust/issues/98007>. -#![feature(no_core)] -#![no_core] - mod auto { mod action_row { pub struct ActionRowBuilder; diff --git a/tests/rustdoc-json/enums/field_hidden.rs b/tests/rustdoc-json/enums/field_hidden.rs index f2409858057..74d96248d5c 100644 --- a/tests/rustdoc-json/enums/field_hidden.rs +++ b/tests/rustdoc-json/enums/field_hidden.rs @@ -1,11 +1,5 @@ // Regression test for <https://github.com/rust-lang/rust/issues/100529>. -#![no_core] -#![feature(no_core, lang_items)] - -#[lang = "sized"] -trait Sized {} - // @has "$.index[*][?(@.name=='ParseError')]" // @has "$.index[*][?(@.name=='UnexpectedEndTag')]" // @is "$.index[*][?(@.name=='UnexpectedEndTag')].inner.variant.kind.tuple" [null] diff --git a/tests/rustdoc-json/enums/kind.rs b/tests/rustdoc-json/enums/kind.rs index 777161c4e4b..68483683464 100644 --- a/tests/rustdoc-json/enums/kind.rs +++ b/tests/rustdoc-json/enums/kind.rs @@ -1,11 +1,5 @@ // ignore-tidy-linelength -#![feature(no_core, lang_items)] -#![no_core] - -#[lang = "sized"] -trait Sized {} - pub enum Foo { // @set Unit = "$.index[*][?(@.name=='Unit')].id" // @is "$.index[*][?(@.name=='Unit')].inner.variant.kind" '"plain"' diff --git a/tests/rustdoc-json/enums/tuple_fields_hidden.rs b/tests/rustdoc-json/enums/tuple_fields_hidden.rs index 34a4f4aec53..53cdf83ffa6 100644 --- a/tests/rustdoc-json/enums/tuple_fields_hidden.rs +++ b/tests/rustdoc-json/enums/tuple_fields_hidden.rs @@ -1,9 +1,3 @@ -#![feature(no_core, lang_items)] -#![no_core] - -#[lang = "sized"] -trait Sized {} - // @set 1.1.0 = "$.index[*][?(@.docs=='1.1.0')].id" // @set 2.1.0 = "$.index[*][?(@.docs=='2.1.0')].id" // @set 2.1.1 = "$.index[*][?(@.docs=='2.1.1')].id" diff --git a/tests/rustdoc-json/enums/use_glob.rs b/tests/rustdoc-json/enums/use_glob.rs index 49990ec5331..bec89530b05 100644 --- a/tests/rustdoc-json/enums/use_glob.rs +++ b/tests/rustdoc-json/enums/use_glob.rs @@ -1,8 +1,5 @@ // Regression test for <https://github.com/rust-lang/rust/issues/104942> -#![feature(no_core)] -#![no_core] - // @set Color = "$.index[*][?(@.name == 'Color')].id" pub enum Color { Red, diff --git a/tests/rustdoc-json/enums/use_variant.rs b/tests/rustdoc-json/enums/use_variant.rs index 8190e1cbe81..c7e0c21f1ef 100644 --- a/tests/rustdoc-json/enums/use_variant.rs +++ b/tests/rustdoc-json/enums/use_variant.rs @@ -1,6 +1,3 @@ -#![feature(no_core)] -#![no_core] - // @set AlwaysNone = "$.index[*][?(@.name == 'AlwaysNone')].id" pub enum AlwaysNone { // @set None = "$.index[*][?(@.name == 'None')].id" diff --git a/tests/rustdoc-json/fn_pointer/generics.rs b/tests/rustdoc-json/fn_pointer/generics.rs index 3b82561ec7d..8b3a8c0a74e 100644 --- a/tests/rustdoc-json/fn_pointer/generics.rs +++ b/tests/rustdoc-json/fn_pointer/generics.rs @@ -1,8 +1,5 @@ // ignore-tidy-linelength -#![feature(no_core)] -#![no_core] - // @count "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[*]" 1 // @is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[0][0]" '"val"' // @is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[0][1].borrowed_ref.lifetime" \"\'c\" diff --git a/tests/rustdoc-json/fns/extern_c_variadic.rs b/tests/rustdoc-json/fns/extern_c_variadic.rs index d6ea343b991..eef9ae99eb0 100644 --- a/tests/rustdoc-json/fns/extern_c_variadic.rs +++ b/tests/rustdoc-json/fns/extern_c_variadic.rs @@ -1,6 +1,3 @@ -#![feature(no_core)] -#![no_core] - extern "C" { // @is "$.index[*][?(@.name == 'not_variadic')].inner.function.decl.c_variadic" false pub fn not_variadic(_: i32); diff --git a/tests/rustdoc-json/fns/generic_args.rs b/tests/rustdoc-json/fns/generic_args.rs index 539d17f831e..2f6cf3bf65a 100644 --- a/tests/rustdoc-json/fns/generic_args.rs +++ b/tests/rustdoc-json/fns/generic_args.rs @@ -1,8 +1,5 @@ // ignore-tidy-linelength -#![feature(no_core)] -#![no_core] - // @set foo = "$.index[*][?(@.name=='Foo')].id" pub trait Foo {} diff --git a/tests/rustdoc-json/fns/generic_returns.rs b/tests/rustdoc-json/fns/generic_returns.rs index 27d842066f4..8e82efef4be 100644 --- a/tests/rustdoc-json/fns/generic_returns.rs +++ b/tests/rustdoc-json/fns/generic_returns.rs @@ -1,8 +1,5 @@ // ignore-tidy-linelength -#![feature(no_core)] -#![no_core] - // @count "$.index[*][?(@.name=='generic_returns')].inner.module.items[*]" 2 // @set foo = "$.index[*][?(@.name=='Foo')].id" diff --git a/tests/rustdoc-json/fns/generics.rs b/tests/rustdoc-json/fns/generics.rs index 5239a6f21f5..44dc6d854aa 100644 --- a/tests/rustdoc-json/fns/generics.rs +++ b/tests/rustdoc-json/fns/generics.rs @@ -1,8 +1,5 @@ // ignore-tidy-linelength -#![feature(no_core)] -#![no_core] - // @set wham_id = "$.index[*][?(@.name=='Wham')].id" pub trait Wham {} diff --git a/tests/rustdoc-json/generic-associated-types/gats.rs b/tests/rustdoc-json/generic-associated-types/gats.rs index 9cfe649243f..56d6e7a49db 100644 --- a/tests/rustdoc-json/generic-associated-types/gats.rs +++ b/tests/rustdoc-json/generic-associated-types/gats.rs @@ -1,14 +1,5 @@ // ignore-tidy-linelength -#![no_core] -#![feature(lang_items, no_core, arbitrary_self_types)] - -#[lang = "sized"] -pub trait Sized {} - -#[lang = "receiver"] -pub trait Receiver {} - pub trait Display {} pub trait LendingIterator { diff --git a/tests/rustdoc-json/glob_import.rs b/tests/rustdoc-json/glob_import.rs index f37ce0abb41..7de1ed78f2f 100644 --- a/tests/rustdoc-json/glob_import.rs +++ b/tests/rustdoc-json/glob_import.rs @@ -1,13 +1,10 @@ // This is a regression test for <https://github.com/rust-lang/rust/issues/98003>. -#![feature(no_core)] #![no_std] -#![no_core] // @has "$.index[*][?(@.name=='glob')]" // @has "$.index[*][?(@.inner.import)].inner.import.name" \"*\" - mod m1 { pub fn f() {} } diff --git a/tests/rustdoc-json/impls/impl_item_visibility.rs b/tests/rustdoc-json/impls/impl_item_visibility.rs index efa54d91dca..d3c15cd23e4 100644 --- a/tests/rustdoc-json/impls/impl_item_visibility.rs +++ b/tests/rustdoc-json/impls/impl_item_visibility.rs @@ -1,6 +1,3 @@ -#![feature(no_core)] -#![no_core] - pub struct Foo; /// impl Foo priv @@ -9,18 +6,16 @@ impl Foo { } // @!has '$.index[*][?(@.docs=="impl Foo priv")]' - /// impl Foo pub impl Foo { pub fn qux() {} } // @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"' - /// impl Foo hidden impl Foo { #[doc(hidden)] - pub fn __quazl(){} + pub fn __quazl() {} } // FIXME(#111564): Is this the right behaviour? // @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"' diff --git a/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs b/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs index 3c6fefc4ca2..fa3a36df856 100644 --- a/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs +++ b/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs @@ -1,6 +1,4 @@ // compile-flags: --document-hidden-items -#![feature(no_core)] -#![no_core] pub struct Foo; @@ -11,18 +9,16 @@ impl Foo { // FIXME(#111564): Is this the right behaviour? // @is '$.index[*][?(@.docs=="impl Foo priv")].visibility' '"default"' - /// impl Foo pub impl Foo { pub fn qux() {} } // @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"' - /// impl Foo hidden impl Foo { #[doc(hidden)] - pub fn __quazl(){} + pub fn __quazl() {} } // FIXME(#111564): Is this the right behaviour? // @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"' diff --git a/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs b/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs index b98d1e4167c..7c68a2412f3 100644 --- a/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs +++ b/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs @@ -1,6 +1,4 @@ // compile-flags: --document-private-items -#![feature(no_core)] -#![no_core] pub struct Foo; @@ -10,18 +8,16 @@ impl Foo { } // @is '$.index[*][?(@.docs=="impl Foo priv")].visibility' '"default"' - /// impl Foo pub impl Foo { pub fn qux() {} } // @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"' - /// impl Foo hidden impl Foo { #[doc(hidden)] - pub fn __quazl(){} + pub fn __quazl() {} } // FIXME(#111564): Is this the right behaviour? // @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"' diff --git a/tests/rustdoc-json/impls/import_from_private.rs b/tests/rustdoc-json/impls/import_from_private.rs index d2b0665dcaf..3da03df2546 100644 --- a/tests/rustdoc-json/impls/import_from_private.rs +++ b/tests/rustdoc-json/impls/import_from_private.rs @@ -1,14 +1,12 @@ // https://github.com/rust-lang/rust/issues/100252 -#![feature(no_core)] -#![no_core] - mod bar { - // @set baz = "$.index[*][?(@.inner.struct)].id" + // @set baz = "$.index[*][?(@.name == 'Baz')].id" pub struct Baz; - // @set impl = "$.index[*][?(@.inner.impl)].id" + // @set impl = "$.index[*][?(@.docs == 'impl')].id" + /// impl impl Baz { - // @set doit = "$.index[*][?(@.inner.function)].id" + // @set doit = "$.index[*][?(@.name == 'doit')].id" pub fn doit() {} } } @@ -18,5 +16,5 @@ pub use bar::Baz; // @is "$.index[*].inner.module.items[*]" $import // @is "$.index[*].inner.import.id" $baz -// @is "$.index[*].inner.struct.impls[*]" $impl -// @is "$.index[*].inner.impl.items[*]" $doit +// @has "$.index[*][?(@.name == 'Baz')].inner.struct.impls[*]" $impl +// @is "$.index[*][?(@.docs=='impl')].inner.impl.items[*]" $doit diff --git a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-2.rs b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-2.rs index d2ac316d47d..7857626d66e 100644 --- a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-2.rs +++ b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-2.rs @@ -1,7 +1,5 @@ -#![feature(no_core)] -#![no_core] - -// @count "$.index[*][?(@.inner.impl)]" 1 +// @has "$.index[*][?(@.docs=='Here')]" +// @!has "$.index[*][?(@.docs=='Not Here')]" // @!has "$.index[*][?(@.name == 'HiddenPubStruct')]" // @has "$.index[*][?(@.name == 'NotHiddenPubStruct')]" // @has "$.index[*][?(@.name=='PubTrait')]" @@ -11,5 +9,7 @@ pub trait PubTrait {} pub struct HiddenPubStruct; pub struct NotHiddenPubStruct; +/// Not Here impl PubTrait for HiddenPubStruct {} +/// Here impl PubTrait for NotHiddenPubStruct {} diff --git a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs index fcd27ca4b7c..836f1fe87da 100644 --- a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs +++ b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs @@ -1,8 +1,5 @@ // compile-flags: --document-hidden-items -#![feature(no_core)] -#![no_core] - // @has "$.index[*][?(@.name == 'HiddenPubStruct')]" // @has "$.index[*][?(@.inner.impl)]" // @has "$.index[*][?(@.name=='PubTrait')]" diff --git a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id.rs b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id.rs index 141c54a57dd..97db9c93a0f 100644 --- a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id.rs +++ b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id.rs @@ -1,21 +1,21 @@ -#![feature(no_core)] -#![no_core] - -// @count "$.index[*][?(@.inner.impl)]" 1 -// @!has "$.index[*][?(@.name == 'HiddenPubStruct')]" -// @has "$.index[*][?(@.name == 'NotHiddenPubStruct')]" // @has "$.index[*][?(@.name=='PubTrait')]" pub trait PubTrait {} #[doc(hidden)] pub mod hidden { + // @!has "$.index[*][?(@.name == 'HiddenPubStruct')]" pub struct HiddenPubStruct; + // @!has "$.index[*][?(@.docs == 'Not Here')]" + /// Not Here impl crate::PubTrait for HiddenPubStruct {} } pub mod not_hidden { + // @has "$.index[*][?(@.name == 'NotHiddenPubStruct')]" pub struct NotHiddenPubStruct; + // @has "$.index[*][?(@.docs == 'Here')]" + /// Here impl crate::PubTrait for NotHiddenPubStruct {} } diff --git a/tests/rustdoc-json/impls/local_for_local.rs b/tests/rustdoc-json/impls/local_for_local.rs index 37a72000329..015e89c2281 100644 --- a/tests/rustdoc-json/impls/local_for_local.rs +++ b/tests/rustdoc-json/impls/local_for_local.rs @@ -1,6 +1,3 @@ -#![feature(no_core)] -#![no_core] - // @set struct = "$.index[*][?(@.name=='Struct')].id" pub struct Struct; // @set trait = "$.index[*][?(@.name=='Trait')].id" @@ -9,7 +6,7 @@ pub trait Trait {} /// impl impl Trait for Struct {} -// @is "$.index[*][?(@.name=='Struct')].inner.struct.impls[*]" $impl +// @has "$.index[*][?(@.name=='Struct')].inner.struct.impls[*]" $impl // @is "$.index[*][?(@.name=='Trait')].inner.trait.implementations[*]" $impl // @is "$.index[*][?(@.docs=='impl')].inner.impl.trait.id" $trait // @is "$.index[*][?(@.docs=='impl')].inner.impl.for.resolved_path.id" $struct diff --git a/tests/rustdoc-json/impls/local_for_local_primitive.rs b/tests/rustdoc-json/impls/local_for_local_primitive.rs index 769dd3f0a2c..acc3a879fe1 100644 --- a/tests/rustdoc-json/impls/local_for_local_primitive.rs +++ b/tests/rustdoc-json/impls/local_for_local_primitive.rs @@ -1,6 +1,4 @@ -#![feature(no_core)] #![feature(rustc_attrs)] -#![no_core] // @set Local = "$.index[*][?(@.name=='Local')].id" pub trait Local {} diff --git a/tests/rustdoc-json/lifetime/longest.rs b/tests/rustdoc-json/lifetime/longest.rs index dc28258a8b6..419b0b4fcab 100644 --- a/tests/rustdoc-json/lifetime/longest.rs +++ b/tests/rustdoc-json/lifetime/longest.rs @@ -1,8 +1,5 @@ // ignore-tidy-linelength -#![feature(no_core)] -#![no_core] - // @is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].name" \"\'a\" // @is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].kind" '{"lifetime": {"outlives": []}}' // @is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].kind" '{"lifetime": {"outlives": []}}' @@ -26,5 +23,9 @@ // @is "$.index[*][?(@.name=='longest')].inner.function.decl.output.borrowed_ref.type.primitive" \"str\" pub fn longest<'a>(l: &'a str, r: &'a str) -> &'a str { - if l.len() > r.len() { l } else { r } + if l.len() > r.len() { + l + } else { + r + } } diff --git a/tests/rustdoc-json/lifetime/outlives.rs b/tests/rustdoc-json/lifetime/outlives.rs index 6e105b382b0..549e4c200dc 100644 --- a/tests/rustdoc-json/lifetime/outlives.rs +++ b/tests/rustdoc-json/lifetime/outlives.rs @@ -1,8 +1,5 @@ // ignore-tidy-linelength -#![feature(no_core)] -#![no_core] - // @count "$.index[*][?(@.name=='foo')].inner.function.generics.params[*]" 3 // @is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates" [] // @is "$.index[*][?(@.name=='foo')].inner.function.generics.params[0].name" \"\'a\" diff --git a/tests/rustdoc-json/methods/abi.rs b/tests/rustdoc-json/methods/abi.rs index b8279298c1e..917e9e0790c 100644 --- a/tests/rustdoc-json/methods/abi.rs +++ b/tests/rustdoc-json/methods/abi.rs @@ -1,8 +1,6 @@ // ignore-tidy-linelength #![feature(abi_vectorcall)] -#![feature(no_core)] -#![no_core] // @has "$.index[*][?(@.name=='Foo')]" pub struct Foo; diff --git a/tests/rustdoc-json/non_lifetime_binders.rs b/tests/rustdoc-json/non_lifetime_binders.rs index cabee0b1caa..d925fcd5221 100644 --- a/tests/rustdoc-json/non_lifetime_binders.rs +++ b/tests/rustdoc-json/non_lifetime_binders.rs @@ -3,18 +3,9 @@ #![feature(non_lifetime_binders)] #![allow(incomplete_features)] -#![no_core] -#![feature(lang_items, no_core)] - -#[lang = "sized"] -pub trait Sized {} - pub trait Trait {} -#[lang = "phantom_data"] -struct PhantomData<T_>; - -pub struct Wrapper<T_>(PhantomData<T_>); +pub struct Wrapper<T_>(std::marker::PhantomData<T_>); // @count "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[*]" 2 // @is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[0].name" \"\'a\" diff --git a/tests/rustdoc-json/primitives/primitive_overloading.rs b/tests/rustdoc-json/primitives/primitive_overloading.rs index 81e0acdc6e9..50e23fc06d3 100644 --- a/tests/rustdoc-json/primitives/primitive_overloading.rs +++ b/tests/rustdoc-json/primitives/primitive_overloading.rs @@ -3,14 +3,10 @@ // Regression test for <https://github.com/rust-lang/rust/issues/98006>. #![feature(rustc_attrs)] -#![feature(no_core)] - -#![no_core] // @has "$.index[*][?(@.name=='usize')]" // @has "$.index[*][?(@.name=='prim')]" #[rustc_doc_primitive = "usize"] /// This is the built-in type `usize`. -mod prim { -} +mod prim {} diff --git a/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs b/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs index 37ca279b352..a8f5500d629 100644 --- a/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs +++ b/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs @@ -1,8 +1,5 @@ //! Regression test for <https://github.com/rust-lang/rust/issues/100531> -#![feature(no_core)] -#![no_core] - #![crate_name = "export_extern_crate_as_self"] // ignore-tidy-linelength diff --git a/tests/rustdoc-json/reexport/glob_collision.rs b/tests/rustdoc-json/reexport/glob_collision.rs index dee35ba78dc..9a75f4c0cf3 100644 --- a/tests/rustdoc-json/reexport/glob_collision.rs +++ b/tests/rustdoc-json/reexport/glob_collision.rs @@ -1,8 +1,5 @@ // Regression test for https://github.com/rust-lang/rust/issues/100973 -#![feature(no_core)] -#![no_core] - // @set m1 = "$.index[*][?(@.name == 'm1' && @.inner.module)].id" // @is "$.index[*][?(@.name == 'm1')].inner.module.items" [] // @is "$.index[*][?(@.name == 'm1')].inner.module.is_stripped" true diff --git a/tests/rustdoc-json/reexport/glob_extern.rs b/tests/rustdoc-json/reexport/glob_extern.rs index 78edfaf0aa8..ed0c4a420d4 100644 --- a/tests/rustdoc-json/reexport/glob_extern.rs +++ b/tests/rustdoc-json/reexport/glob_extern.rs @@ -1,8 +1,5 @@ // edition:2018 -#![no_core] -#![feature(no_core)] - // @is "$.index[*][?(@.name=='mod1')].inner.module.is_stripped" "true" mod mod1 { extern "C" { diff --git a/tests/rustdoc-json/reexport/glob_private.rs b/tests/rustdoc-json/reexport/glob_private.rs index ae4e87d23bc..11ea5aa3522 100644 --- a/tests/rustdoc-json/reexport/glob_private.rs +++ b/tests/rustdoc-json/reexport/glob_private.rs @@ -1,8 +1,5 @@ // edition:2018 -#![no_core] -#![feature(no_core)] - // @is "$.index[*][?(@.name=='mod1')].inner.module.is_stripped" "true" mod mod1 { // @is "$.index[*][?(@.name=='mod2')].inner.module.is_stripped" "true" diff --git a/tests/rustdoc-json/reexport/in_root_and_mod.rs b/tests/rustdoc-json/reexport/in_root_and_mod.rs index f81445bd48d..a4133e2f0c7 100644 --- a/tests/rustdoc-json/reexport/in_root_and_mod.rs +++ b/tests/rustdoc-json/reexport/in_root_and_mod.rs @@ -1,6 +1,3 @@ -#![feature(no_core)] -#![no_core] - // @!has "$.index[*][?(@.name=='foo')]" mod foo { // @has "$.index[*][?(@.name=='Foo')]" diff --git a/tests/rustdoc-json/reexport/in_root_and_mod_pub.rs b/tests/rustdoc-json/reexport/in_root_and_mod_pub.rs index c5c41b25f7e..37f7b26fc85 100644 --- a/tests/rustdoc-json/reexport/in_root_and_mod_pub.rs +++ b/tests/rustdoc-json/reexport/in_root_and_mod_pub.rs @@ -1,6 +1,3 @@ -#![feature(no_core)] -#![no_core] - pub mod foo { // @set bar_id = "$.index[*][?(@.name=='Bar')].id" // @ismany "$.index[*][?(@.name=='foo')].inner.module.items[*]" $bar_id diff --git a/tests/rustdoc-json/reexport/macro.rs b/tests/rustdoc-json/reexport/macro.rs index ac0632b98a9..be09cb47629 100644 --- a/tests/rustdoc-json/reexport/macro.rs +++ b/tests/rustdoc-json/reexport/macro.rs @@ -1,8 +1,5 @@ // edition:2018 -#![no_core] -#![feature(no_core)] - // @set repro_id = "$.index[*][?(@.name=='repro')].id" #[macro_export] macro_rules! repro { diff --git a/tests/rustdoc-json/reexport/mod_not_included.rs b/tests/rustdoc-json/reexport/mod_not_included.rs index 1c49f213d1a..bc072be81a3 100644 --- a/tests/rustdoc-json/reexport/mod_not_included.rs +++ b/tests/rustdoc-json/reexport/mod_not_included.rs @@ -1,8 +1,5 @@ // Regression test for https://github.com/rust-lang/rust/issues/101103 -#![feature(no_core)] -#![no_core] - mod m1 { pub fn x() {} } diff --git a/tests/rustdoc-json/reexport/private_twice_one_inline.rs b/tests/rustdoc-json/reexport/private_twice_one_inline.rs index 8c8152bd16c..d7b76623557 100644 --- a/tests/rustdoc-json/reexport/private_twice_one_inline.rs +++ b/tests/rustdoc-json/reexport/private_twice_one_inline.rs @@ -4,12 +4,8 @@ // Test for the ICE in https://github.com/rust-lang/rust/issues/83057 // An external type re-exported with different attributes shouldn't cause an error -#![no_core] -#![feature(no_core)] - extern crate pub_struct as foo; #[doc(inline)] - // @set crate_use_id = "$.index[*][?(@.docs=='Hack A')].id" // @set foo_id = "$.index[*][?(@.docs=='Hack A')].inner.import.id" /// Hack A diff --git a/tests/rustdoc-json/reexport/private_two_names.rs b/tests/rustdoc-json/reexport/private_two_names.rs index cdcbf2a2bc8..e6f037eb4b3 100644 --- a/tests/rustdoc-json/reexport/private_two_names.rs +++ b/tests/rustdoc-json/reexport/private_two_names.rs @@ -3,9 +3,6 @@ // Test for the ICE in https://github.com/rust-lang/rust/issues/83720 // A pub-in-private type re-exported under two different names shouldn't cause an error -#![no_core] -#![feature(no_core)] - // @!has "$.index[*][?(@.name=='style')]" mod style { // @set color_struct_id = "$.index[*][?(@.inner.struct && @.name=='Color')].id" diff --git a/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs b/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs index a2a25d08448..46c3da4c15b 100644 --- a/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs +++ b/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs @@ -1,8 +1,5 @@ // Regression test for <https://github.com/rust-lang/rust/issues/106379> -#![feature(no_core)] -#![no_core] - mod repeat_n { #[doc(hidden)] pub struct RepeatN {} diff --git a/tests/rustdoc-json/reexport/reexport_of_hidden.rs b/tests/rustdoc-json/reexport/reexport_of_hidden.rs new file mode 100644 index 00000000000..1b6ff5fadca --- /dev/null +++ b/tests/rustdoc-json/reexport/reexport_of_hidden.rs @@ -0,0 +1,10 @@ +// compile-flags: --document-hidden-items + +// @has "$.index[*].inner[?(@.import.name=='UsedHidden')]" +// @has "$.index[*][?(@.name=='Hidden')]" +pub mod submodule { + #[doc(hidden)] + pub struct Hidden {} +} + +pub use submodule::Hidden as UsedHidden; diff --git a/tests/rustdoc-json/reexport/rename_private.rs b/tests/rustdoc-json/reexport/rename_private.rs index 9114460231d..3924282a49e 100644 --- a/tests/rustdoc-json/reexport/rename_private.rs +++ b/tests/rustdoc-json/reexport/rename_private.rs @@ -1,8 +1,5 @@ // edition:2018 -#![no_core] -#![feature(no_core)] - // @!has "$.index[*][?(@.name=='inner')]" mod inner { // @has "$.index[*][?(@.name=='Public')]" diff --git a/tests/rustdoc-json/reexport/rename_public.rs b/tests/rustdoc-json/reexport/rename_public.rs index d0fd314bd8c..63693787448 100644 --- a/tests/rustdoc-json/reexport/rename_public.rs +++ b/tests/rustdoc-json/reexport/rename_public.rs @@ -1,8 +1,5 @@ // edition:2018 -#![no_core] -#![feature(no_core)] - // @set inner_id = "$.index[*][?(@.name=='inner')].id" pub mod inner { // @set public_id = "$.index[*][?(@.name=='Public')].id" diff --git a/tests/rustdoc-json/reexport/same_name_different_types.rs b/tests/rustdoc-json/reexport/same_name_different_types.rs index 6a765b73301..42ba6c40019 100644 --- a/tests/rustdoc-json/reexport/same_name_different_types.rs +++ b/tests/rustdoc-json/reexport/same_name_different_types.rs @@ -1,8 +1,5 @@ // Regression test for <https://github.com/rust-lang/rust/issues/107677>. -#![feature(no_core)] -#![no_core] - pub mod nested { // @set foo_struct = "$.index[*][?(@.docs == 'Foo the struct')].id" diff --git a/tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs b/tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs index a00547dc348..1e1710e1c08 100644 --- a/tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs +++ b/tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs @@ -2,9 +2,7 @@ // Regression test for <https://github.com/rust-lang/rust/issues/97432>. -#![feature(no_core)] #![no_std] -#![no_core] mod inner { // @set trait_id = "$.index[*][?(@.name=='Trait')].id" diff --git a/tests/rustdoc-json/reexport/simple_private.rs b/tests/rustdoc-json/reexport/simple_private.rs index 462efee51bf..2ca8c7fa6be 100644 --- a/tests/rustdoc-json/reexport/simple_private.rs +++ b/tests/rustdoc-json/reexport/simple_private.rs @@ -1,6 +1,4 @@ // edition:2018 -#![no_core] -#![feature(no_core)] // @!has "$.index[*][?(@.name=='inner')]" mod inner { diff --git a/tests/rustdoc-json/reexport/simple_public.rs b/tests/rustdoc-json/reexport/simple_public.rs index 1373f96f87f..04611eeb95c 100644 --- a/tests/rustdoc-json/reexport/simple_public.rs +++ b/tests/rustdoc-json/reexport/simple_public.rs @@ -1,8 +1,5 @@ // edition:2018 -#![no_core] -#![feature(no_core)] - // @set inner_id = "$.index[*][?(@.name=='inner')].id" pub mod inner { diff --git a/tests/rustdoc-json/return_private.rs b/tests/rustdoc-json/return_private.rs index 0ce81b5e59f..a9301b3fe4f 100644 --- a/tests/rustdoc-json/return_private.rs +++ b/tests/rustdoc-json/return_private.rs @@ -1,9 +1,6 @@ // Regression test for <https://github.com/rust-lang/rust/issues/96161>. // ignore-tidy-linelength -#![feature(no_core)] -#![no_core] - mod secret { pub struct Secret; } diff --git a/tests/rustdoc-json/stripped_modules.rs b/tests/rustdoc-json/stripped_modules.rs index d2664b49e9c..d5ab1173d92 100644 --- a/tests/rustdoc-json/stripped_modules.rs +++ b/tests/rustdoc-json/stripped_modules.rs @@ -1,6 +1,3 @@ -#![no_core] -#![feature(no_core)] - // @!has "$.index[*][?(@.name=='no_pub_inner')]" mod no_pub_inner { fn priv_inner() {} diff --git a/tests/rustdoc-json/traits/implementors.rs b/tests/rustdoc-json/traits/implementors.rs index 7d351ad61be..c27553c7544 100644 --- a/tests/rustdoc-json/traits/implementors.rs +++ b/tests/rustdoc-json/traits/implementors.rs @@ -1,19 +1,18 @@ -#![feature(no_core)] -#![no_core] - -// @set wham = "$.index[*][?(@.name=='Wham')].id" -// @count "$.index[*][?(@.name=='Wham')].inner.trait.implementations[*]" 1 -// @set gmWham = "$.index[*][?(@.name=='Wham')].inner.trait.implementations[0]" pub trait Wham {} - -// @count "$.index[*][?(@.name=='GeorgeMichael')].inner.struct.impls[*]" 1 -// @is "$.index[*][?(@.name=='GeorgeMichael')].inner.struct.impls[0]" $gmWham -// @set gm = "$.index[*][?(@.name=='Wham')].id" - -// jsonpath_lib isnt expressive enough (for now) to get the "impl" item, so we -// just check it isn't pointing to the type, but when you port to jsondocck-ng -// check what the impl item is -// @!is "$.index[*][?(@.name=='Wham')].inner.trait.implementations[0]" $gm pub struct GeorgeMichael {} +/// Wham for George Michael impl Wham for GeorgeMichael {} + +// Find IDs. +// @set wham = "$.index[*][?(@.name=='Wham')].id" +// @set gmWham = "$.index[*][?(@.docs=='Wham for George Michael')].id" +// @set gm = "$.index[*][?(@.name=='GeorgeMichael')].id" + +// Both struct and trait point to impl. +// @has "$.index[*][?(@.name=='GeorgeMichael')].inner.struct.impls[*]" $gmWham +// @is "$.index[*][?(@.name=='Wham')].inner.trait.implementations[*]" $gmWham + +// Impl points to both struct and trait. +// @is "$.index[*][?(@.docs == 'Wham for George Michael')].inner.impl.trait.id" $wham +// @is "$.index[*][?(@.docs == 'Wham for George Michael')].inner.impl.for.resolved_path.id" $gm diff --git a/tests/rustdoc-json/traits/private_supertrait.rs b/tests/rustdoc-json/traits/private_supertrait.rs index 49238e5e88b..67b5a858ab7 100644 --- a/tests/rustdoc-json/traits/private_supertrait.rs +++ b/tests/rustdoc-json/traits/private_supertrait.rs @@ -1,9 +1,5 @@ // ignore-tidy-linelength -#![feature(no_core)] -#![no_core] - - // @!has "$.index[*][?(@.name == 'sealed')]" mod sealed { // @set sealed_id = "$.index[*][?(@.name=='Sealed')].id" diff --git a/tests/rustdoc-json/traits/supertrait.rs b/tests/rustdoc-json/traits/supertrait.rs index 2123ac40427..bbae3557cf9 100644 --- a/tests/rustdoc-json/traits/supertrait.rs +++ b/tests/rustdoc-json/traits/supertrait.rs @@ -1,9 +1,5 @@ // ignore-tidy-linelength -#![feature(no_core)] -#![feature(lang_items)] -#![no_core] - // @set loud_id = "$.index[*][?(@.name=='Loud')].id" pub trait Loud {} diff --git a/tests/rustdoc-json/type/inherent_associated_type.rs b/tests/rustdoc-json/type/inherent_associated_type.rs index 64c6c53ce47..f8603147951 100644 --- a/tests/rustdoc-json/type/inherent_associated_type.rs +++ b/tests/rustdoc-json/type/inherent_associated_type.rs @@ -1,8 +1,6 @@ // ignore-tidy-linelength #![feature(inherent_associated_types)] -#![feature(no_core)] #![allow(incomplete_features)] -#![no_core] // @set OwnerMetadata = '$.index[*][?(@.name=="OwnerMetadata")].id' pub struct OwnerMetadata; diff --git a/tests/ui/async-await/no-async-const.rs b/tests/ui/async-await/no-async-const.rs index 963460c1182..c9941d1c5a0 100644 --- a/tests/ui/async-await/no-async-const.rs +++ b/tests/ui/async-await/no-async-const.rs @@ -3,3 +3,4 @@ pub async const fn x() {} //~^ ERROR expected one of `extern`, `fn`, or `unsafe`, found keyword `const` +//~| ERROR functions cannot be both `const` and `async` diff --git a/tests/ui/async-await/no-async-const.stderr b/tests/ui/async-await/no-async-const.stderr index a51dc88a4ed..524d778c09b 100644 --- a/tests/ui/async-await/no-async-const.stderr +++ b/tests/ui/async-await/no-async-const.stderr @@ -9,5 +9,14 @@ LL | pub async const fn x() {} | = note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern` -error: aborting due to previous error +error: functions cannot be both `const` and `async` + --> $DIR/no-async-const.rs:4:5 + | +LL | pub async const fn x() {} + | ----^^^^^-^^^^^---------- + | | | + | | `const` because of this + | `async` because of this + +error: aborting due to 2 previous errors diff --git a/tests/ui/async-await/no-unsafe-async.rs b/tests/ui/async-await/no-unsafe-async.rs index f40154e16f3..7c6811d81ee 100644 --- a/tests/ui/async-await/no-unsafe-async.rs +++ b/tests/ui/async-await/no-unsafe-async.rs @@ -9,3 +9,5 @@ impl S { #[cfg(FALSE)] unsafe async fn f() {} //~ ERROR expected one of `extern` or `fn`, found keyword `async` + +fn main() {} diff --git a/tests/ui/async-await/no-unsafe-async.stderr b/tests/ui/async-await/no-unsafe-async.stderr index f23d17d6bfa..49b112f9313 100644 --- a/tests/ui/async-await/no-unsafe-async.stderr +++ b/tests/ui/async-await/no-unsafe-async.stderr @@ -1,16 +1,11 @@ error: expected one of `extern` or `fn`, found keyword `async` --> $DIR/no-unsafe-async.rs:7:12 | -LL | impl S { - | - while parsing this item list starting here -LL | #[cfg(FALSE)] LL | unsafe async fn g() {} | -------^^^^^ | | | | | expected one of `extern` or `fn` | help: `async` must come before `unsafe`: `async unsafe` -LL | } - | - the item list ends here | = note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern` diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs index df0cd54399a..099178a7d50 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs @@ -7,3 +7,8 @@ const async const fn test() {} //~| NOTE expected one of `extern`, `fn`, or `unsafe` //~| HELP `const` already used earlier, remove this one //~| NOTE `const` first seen here +//~| ERROR functions cannot be both `const` and `async` +//~| NOTE `const` because of this +//~| NOTE `async` because of this + +fn main() {} diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.stderr b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.stderr index 977c6ebfef3..4c55179ce23 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.stderr +++ b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.stderr @@ -13,5 +13,14 @@ note: `const` first seen here LL | const async const fn test() {} | ^^^^^ -error: aborting due to previous error +error: functions cannot be both `const` and `async` + --> $DIR/const-async-const.rs:5:1 + | +LL | const async const fn test() {} + | ^^^^^-^^^^^------------------- + | | | + | | `async` because of this + | `const` because of this + +error: aborting due to 2 previous errors diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/recovery.rs b/tests/ui/parser/issues/issue-87217-keyword-order/recovery.rs new file mode 100644 index 00000000000..9d7fe43893e --- /dev/null +++ b/tests/ui/parser/issues/issue-87217-keyword-order/recovery.rs @@ -0,0 +1,22 @@ +// test for #115714 + +struct Misplaced; + +impl Misplaced { + unsafe const fn from_u32(val: u32) {} + //~^ ERROR expected one of `extern` or `fn` + fn oof(self){} +} + +struct Duplicated; + +impl Duplicated { + unsafe unsafe fn from_u32(val: u32) {} + //~^ ERROR expected one of `extern` or `fn` + fn oof(self){} +} + +fn main() { + Misplaced.oof(); + Duplicated.oof(); +} diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/recovery.stderr b/tests/ui/parser/issues/issue-87217-keyword-order/recovery.stderr new file mode 100644 index 00000000000..3f504a9ebfc --- /dev/null +++ b/tests/ui/parser/issues/issue-87217-keyword-order/recovery.stderr @@ -0,0 +1,28 @@ +error: expected one of `extern` or `fn`, found keyword `const` + --> $DIR/recovery.rs:6:12 + | +LL | unsafe const fn from_u32(val: u32) {} + | -------^^^^^ + | | | + | | expected one of `extern` or `fn` + | help: `const` must come before `unsafe`: `const unsafe` + | + = note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern` + +error: expected one of `extern` or `fn`, found keyword `unsafe` + --> $DIR/recovery.rs:14:12 + | +LL | unsafe unsafe fn from_u32(val: u32) {} + | ^^^^^^ + | | + | expected one of `extern` or `fn` + | help: `unsafe` already used earlier, remove this one + | +note: `unsafe` first seen here + --> $DIR/recovery.rs:14:5 + | +LL | unsafe unsafe fn from_u32(val: u32) {} + | ^^^^^^ + +error: aborting due to 2 previous errors + diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs index bbebc99e94b..47942662685 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs @@ -12,3 +12,8 @@ async unsafe const fn test() {} //~| HELP `const` must come before `async unsafe` //~| SUGGESTION const async unsafe //~| NOTE keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern` +//~| ERROR functions cannot be both `const` and `async` +//~| NOTE `const` because of this +//~| NOTE `async` because of this + +fn main() {} diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.stderr b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.stderr index f455caba158..489e8eefb05 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.stderr +++ b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.stderr @@ -9,5 +9,14 @@ LL | async unsafe const fn test() {} | = note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern` -error: aborting due to previous error +error: functions cannot be both `const` and `async` + --> $DIR/several-kw-jump.rs:9:1 + | +LL | async unsafe const fn test() {} + | ^^^^^--------^^^^^------------- + | | | + | | `const` because of this + | `async` because of this + +error: aborting due to 2 previous errors diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs index 4ff4cf5c8ca..867f71c1204 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs @@ -12,3 +12,5 @@ unsafe async fn test() {} //~| HELP `async` must come before `unsafe` //~| SUGGESTION async unsafe //~| NOTE keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern` + +fn main() {} diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs index 2f5fbc513ee..9a7f28210f9 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs @@ -12,3 +12,5 @@ unsafe const fn test() {} //~| HELP `const` must come before `unsafe` //~| SUGGESTION const unsafe //~| NOTE keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern` + +fn main() {} diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs index df2412e3e9b..8305ff4f623 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs @@ -12,3 +12,5 @@ extern unsafe fn test() {} //~| HELP `unsafe` must come before `extern` //~| SUGGESTION unsafe extern //~| NOTE keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern` + +fn main() {} |
