1
Fork 0

Replace target.target with target and target.ptr_width with target.pointer_width

Preparation for a subsequent change that replaces
rustc_target::config::Config with its wrapped Target.

On its own, this commit breaks the build. I don't like making
build-breaking commits, but in this instance I believe that it
makes review easier, as the "real" changes of this PR can be
seen much more easily.

Result of running:

find compiler/ -type f -exec sed -i -e 's/target\.target\([)\.,; ]\)/target\1/g' {} \;
find compiler/ -type f -exec sed -i -e 's/target\.target$/target/g' {} \;
find compiler/ -type f -exec sed -i -e 's/target.ptr_width/target.pointer_width/g' {} \;
./x.py fmt
This commit is contained in:
est31 2020-10-15 11:44:00 +02:00
parent 0d1aa1e034
commit 4fa5578774
50 changed files with 224 additions and 240 deletions

View file

@ -29,7 +29,7 @@ pub fn check_wf_new(tcx: TyCtxt<'_>) {
}
pub(super) fn check_abi(tcx: TyCtxt<'_>, span: Span, abi: Abi) {
if !tcx.sess.target.target.is_abi_supported(abi) {
if !tcx.sess.target.is_abi_supported(abi) {
struct_span_err!(
tcx.sess,
span,

View file

@ -2555,7 +2555,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs {
)
.emit();
}
if !tcx.sess.target.target.llvm_target.contains("thumbv8m") {
if !tcx.sess.target.llvm_target.contains("thumbv8m") {
struct_span_err!(tcx.sess, attr.span, E0775, "`#[cmse_nonsecure_entry]` is only valid for targets with the TrustZone-M extension")
.emit();
}
@ -2655,7 +2655,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs {
set.path.segments.iter().map(|x| x.ident.name).collect::<Vec<_>>();
match segments.as_slice() {
[sym::arm, sym::a32] | [sym::arm, sym::t32] => {
if !tcx.sess.target.target.options.has_thumb_interworking {
if !tcx.sess.target.options.has_thumb_interworking {
struct_span_err!(
tcx.sess.diagnostic(),
attr.span,