Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 12 pull requests #136572

Merged
merged 37 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e0bbeb7
Make cenum_impl_drop_cast a hard error
ehuss Jan 24, 2025
56c6ffb
Use +secure-plt for powerpc-unknown-linux-gnu{,spe}
taiki-e Jan 27, 2025
d440ea0
tests: reformat `split-debuginfo`'s `Makefile`
jieyouxu Jan 15, 2025
97ae7a0
tests: use an illustrative else-if branch in `split-debuginfo` Makefile
jieyouxu Jan 15, 2025
95ba76b
tests: remove redundant `-C debuginfo=2` when `-g` is already specified
jieyouxu Jan 15, 2025
b060663
tests: fix `-Zunstable-options` bug in `split-debuginfo`
jieyouxu Jan 15, 2025
16e5ea4
tests: fix incorrect comment for wrong path remap scope
jieyouxu Jan 16, 2025
223e0f1
tests: fix incorrect comment
jieyouxu Jan 16, 2025
68b6f92
run-make-support: add `shallow_find_directories` helper
jieyouxu Jan 15, 2025
1e87d00
run-make-support: add some stable `rustc` flag helpers
jieyouxu Jan 16, 2025
58c4b3c
tests: port `split-debuginfo` to rmake.rs
jieyouxu Jan 15, 2025
1ed804d
uefi: process: Add support for command environment variables
Ayush1325 Jan 19, 2025
4f83426
std: move network code into `sys`
joboet Feb 2, 2025
8a3cb13
bless UI test involving private name
joboet Feb 2, 2025
03eed12
implement inherent str constructors
m4rch3n1ng Feb 3, 2025
15adc38
specify a prim@slice in docs
m4rch3n1ng Feb 3, 2025
2431977
Rename and Move some UI tests to more suitable subdirs
DuskyElf Feb 4, 2025
90fee92
Update `compiler-builtins` to 0.1.145
tgross35 Jan 16, 2025
5b981a8
Quickfix `//@ check-pass` is enough
DuskyElf Feb 4, 2025
07cf20e
Rename slice::take methods to split_off
cramertj Feb 4, 2025
836a989
Add OneSidedRangeBound to eliminate panic in `split_point_of`
cramertj Feb 4, 2025
e42cb3b
cg_gcc: Directly use rustc_abi instead of reexports
workingjubilee Nov 3, 2024
0772400
Arbitrary self types v2: recursion test
adetaylor Feb 5, 2025
24d94b2
Add regression test for negative unsigned literals in patterns
oli-obk Jan 30, 2025
f44794f
Only allow negation on literals in patterns if it's on integers or fl…
oli-obk Jan 30, 2025
963eec0
Rollup merge of #132547 - workingjubilee:rustc-abi-in-cg-gcc, r=Guill…
jieyouxu Feb 5, 2025
f75146f
Rollup merge of #135572 - jieyouxu:migrate-split-debuginfo, r=davidtwco
jieyouxu Feb 5, 2025
def4460
Rollup merge of #135964 - ehuss:cenum_impl_drop_cast, r=Nadrieril
jieyouxu Feb 5, 2025
25f7db3
Rollup merge of #136154 - taiki-e:ppc-secure-plt, r=nikic
jieyouxu Feb 5, 2025
f9f667f
Rollup merge of #136304 - oli-obk:push-ymxoklvzrpvx, r=Nadrieril
jieyouxu Feb 5, 2025
cc58e8b
Rollup merge of #136418 - Ayush1325:command-env, r=jhpratt
jieyouxu Feb 5, 2025
ff339fb
Rollup merge of #136449 - joboet:move_pal_net, r=ChrisDenton
jieyouxu Feb 5, 2025
7ad1a3b
Rollup merge of #136517 - m4rch3n1ng:inherent-str-constructors, r=jhp…
jieyouxu Feb 5, 2025
41e93ab
Rollup merge of #136536 - DuskyElf:master, r=jieyouxu
jieyouxu Feb 5, 2025
f30ce21
Rollup merge of #136537 - tgross35:update-builtins, r=tgross35
jieyouxu Feb 5, 2025
fd4623b
Rollup merge of #136555 - cramertj:split_off, r=dtolnay
jieyouxu Feb 5, 2025
eeef079
Rollup merge of #136567 - adetaylor:test-for-recursion, r=oli-obk
jieyouxu Feb 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ index 7165c3e48af..968552ad435 100644

[dependencies]
core = { path = "../core" }
-compiler_builtins = { version = "=0.1.143", features = ['rustc-dep-of-std'] }
+compiler_builtins = { version = "=0.1.143", features = ['rustc-dep-of-std', 'no-f16-f128'] }
-compiler_builtins = { version = "=0.1.145", features = ['rustc-dep-of-std'] }
+compiler_builtins = { version = "=0.1.145", features = ['rustc-dep-of-std', 'no-f16-f128'] }

[dev-dependencies]
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_codegen_gcc/src/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use rustc_middle::ty::Ty;
use rustc_middle::ty::layout::LayoutOf;
#[cfg(feature = "master")]
use rustc_session::config;
use rustc_target::abi::call::{ArgAttributes, CastTarget, FnAbi, PassMode, Reg, RegKind};
use rustc_target::callconv::{ArgAttributes, CastTarget, FnAbi, PassMode, Reg, RegKind};

use crate::builder::Builder;
use crate::context::CodegenCx;
Expand Down Expand Up @@ -132,10 +132,10 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
if cx.sess().opts.optimize == config::OptLevel::No {
return ty;
}
if attrs.regular.contains(rustc_target::abi::call::ArgAttribute::NoAlias) {
if attrs.regular.contains(rustc_target::callconv::ArgAttribute::NoAlias) {
ty = ty.make_restrict()
}
if attrs.regular.contains(rustc_target::abi::call::ArgAttribute::NonNull) {
if attrs.regular.contains(rustc_target::callconv::ArgAttribute::NonNull) {
non_null_args.push(arg_index as i32 + 1);
}
ty
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use rustc_middle::ty::layout::{
use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
use rustc_span::Span;
use rustc_span::def_id::DefId;
use rustc_target::abi::call::FnAbi;
use rustc_target::callconv::FnAbi;
use rustc_target::spec::{HasTargetSpec, HasWasmCAbiOpt, HasX86AbiOpt, Target, WasmCAbi, X86Abi};

use crate::common::{SignType, TypeReflection, type_is_pointer};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/src/consts.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#[cfg(feature = "master")]
use gccjit::{FnAttribute, VarAttribute, Visibility};
use gccjit::{Function, GlobalKind, LValue, RValue, ToRValue, Type};
use rustc_abi::{self as abi, Align, HasDataLayout, Primitive, Size, WrappingRange};
use rustc_codegen_ssa::traits::{
BaseTypeCodegenMethods, ConstCodegenMethods, StaticCodegenMethods,
};
Expand All @@ -14,7 +15,6 @@ use rustc_middle::ty::layout::LayoutOf;
use rustc_middle::ty::{self, Instance};
use rustc_middle::{bug, span_bug};
use rustc_span::def_id::DefId;
use rustc_target::abi::{self, Align, HasDataLayout, Primitive, Size, WrappingRange};

use crate::base;
use crate::context::CodegenCx;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::cell::{Cell, RefCell};
use gccjit::{
Block, CType, Context, Function, FunctionPtrType, FunctionType, LValue, Location, RValue, Type,
};
use rustc_abi::{HasDataLayout, PointeeInfo, Size, TargetDataLayout, VariantIdx};
use rustc_codegen_ssa::base::wants_msvc_seh;
use rustc_codegen_ssa::errors as ssa_errors;
use rustc_codegen_ssa::traits::{BackendTypes, BaseTypeCodegenMethods, MiscCodegenMethods};
Expand All @@ -18,7 +19,6 @@ use rustc_middle::ty::{self, ExistentialTraitRef, Instance, Ty, TyCtxt};
use rustc_session::Session;
use rustc_span::source_map::respan;
use rustc_span::{DUMMY_SP, Span};
use rustc_target::abi::{HasDataLayout, PointeeInfo, Size, TargetDataLayout, VariantIdx};
use rustc_target::spec::{
HasTargetSpec, HasWasmCAbiOpt, HasX86AbiOpt, Target, TlsModel, WasmCAbi, X86Abi,
};
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_gcc/src/debuginfo.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::ops::Range;

use gccjit::{Location, RValue};
use rustc_abi::Size;
use rustc_codegen_ssa::mir::debuginfo::{DebugScope, FunctionDebugContext, VariableKind};
use rustc_codegen_ssa::traits::{DebugInfoBuilderMethods, DebugInfoCodegenMethods};
use rustc_data_structures::sync::Lrc;
Expand All @@ -10,8 +11,7 @@ use rustc_middle::mir::{self, Body, SourceScope};
use rustc_middle::ty::{ExistentialTraitRef, Instance, Ty};
use rustc_session::config::DebugInfo;
use rustc_span::{BytePos, Pos, SourceFile, SourceFileAndLine, Span, Symbol};
use rustc_target::abi::Size;
use rustc_target::abi::call::FnAbi;
use rustc_target::callconv::FnAbi;

use crate::builder::Builder;
use crate::context::CodegenCx;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/src/declare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use gccjit::{Function, FunctionType, GlobalKind, LValue, RValue, Type};
use rustc_codegen_ssa::traits::BaseTypeCodegenMethods;
use rustc_middle::ty::Ty;
use rustc_span::Symbol;
use rustc_target::abi::call::FnAbi;
use rustc_target::callconv::FnAbi;

use crate::abi::{FnAbiGcc, FnAbiGccExt};
use crate::context::CodegenCx;
Expand Down
7 changes: 3 additions & 4 deletions compiler/rustc_codegen_gcc/src/int.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
//! 128-bit integers on 32-bit platforms and thus require to be handled manually.

use gccjit::{BinaryOp, ComparisonOp, FunctionType, Location, RValue, ToRValue, Type, UnaryOp};
use rustc_abi::{Endian, ExternAbi};
use rustc_codegen_ssa::common::{IntPredicate, TypeKind};
use rustc_codegen_ssa::traits::{BackendTypes, BaseTypeCodegenMethods, BuilderMethods, OverflowOp};
use rustc_middle::ty::{self, Ty};
use rustc_target::abi::Endian;
use rustc_target::abi::call::{ArgAbi, ArgAttributes, Conv, FnAbi, PassMode};
use rustc_target::spec;
use rustc_target::callconv::{ArgAbi, ArgAttributes, Conv, FnAbi, PassMode};

use crate::builder::{Builder, ToGccComp};
use crate::common::{SignType, TypeReflection};
Expand Down Expand Up @@ -401,7 +400,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
conv: Conv::C,
can_unwind: false,
};
fn_abi.adjust_for_foreign_abi(self.cx, spec::abi::Abi::C { unwind: false }).unwrap();
fn_abi.adjust_for_foreign_abi(self.cx, ExternAbi::C { unwind: false }).unwrap();

let ret_indirect = matches!(fn_abi.ret.mode, PassMode::Indirect { .. });

Expand Down
14 changes: 7 additions & 7 deletions compiler/rustc_codegen_gcc/src/intrinsic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ use std::iter;
#[cfg(feature = "master")]
use gccjit::FunctionType;
use gccjit::{ComparisonOp, Function, RValue, ToRValue, Type, UnaryOp};
#[cfg(feature = "master")]
use rustc_abi::ExternAbi;
use rustc_abi::HasDataLayout;
use rustc_codegen_ssa::MemFlags;
use rustc_codegen_ssa::base::wants_msvc_seh;
use rustc_codegen_ssa::common::IntPredicate;
Expand All @@ -25,11 +28,8 @@ use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt};
use rustc_middle::ty::layout::{HasTypingEnv, LayoutOf};
use rustc_middle::ty::{self, Instance, Ty};
use rustc_span::{Span, Symbol, sym};
use rustc_target::abi::HasDataLayout;
use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode};
use rustc_target::callconv::{ArgAbi, FnAbi, PassMode};
use rustc_target::spec::PanicStrategy;
#[cfg(feature = "master")]
use rustc_target::spec::abi::Abi;

#[cfg(feature = "master")]
use crate::abi::FnAbiGccExt;
Expand Down Expand Up @@ -1238,7 +1238,7 @@ fn get_rust_try_fn<'a, 'gcc, 'tcx>(
tcx.types.unit,
false,
rustc_hir::Safety::Unsafe,
Abi::Rust,
ExternAbi::Rust,
)),
);
// `unsafe fn(*mut i8, *mut i8) -> ()`
Expand All @@ -1249,7 +1249,7 @@ fn get_rust_try_fn<'a, 'gcc, 'tcx>(
tcx.types.unit,
false,
rustc_hir::Safety::Unsafe,
Abi::Rust,
ExternAbi::Rust,
)),
);
// `unsafe fn(unsafe fn(*mut i8) -> (), *mut i8, unsafe fn(*mut i8, *mut i8) -> ()) -> i32`
Expand All @@ -1258,7 +1258,7 @@ fn get_rust_try_fn<'a, 'gcc, 'tcx>(
tcx.types.i32,
false,
rustc_hir::Safety::Unsafe,
Abi::Rust,
ExternAbi::Rust,
));
let rust_try = gen_fn(cx, "__rust_try", rust_fn_sig, codegen);
cx.rust_try_fn.set(Some(rust_try));
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/src/intrinsic/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::iter::FromIterator;
use gccjit::{BinaryOp, RValue, ToRValue, Type};
#[cfg(feature = "master")]
use gccjit::{ComparisonOp, UnaryOp};
use rustc_abi::{Align, Size};
use rustc_codegen_ssa::base::compare_simd_types;
use rustc_codegen_ssa::common::{IntPredicate, TypeKind};
#[cfg(feature = "master")]
Expand All @@ -17,7 +18,6 @@ use rustc_middle::mir::BinOp;
use rustc_middle::ty::layout::HasTyCtxt;
use rustc_middle::ty::{self, Ty};
use rustc_span::{Span, Symbol, sym};
use rustc_target::abi::{Align, Size};

use crate::builder::Builder;
#[cfg(not(feature = "master"))]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/src/type_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ use std::convert::TryInto;
#[cfg(feature = "master")]
use gccjit::CType;
use gccjit::{RValue, Struct, Type};
use rustc_abi::{AddressSpace, Align, Integer, Size};
use rustc_codegen_ssa::common::TypeKind;
use rustc_codegen_ssa::traits::{
BaseTypeCodegenMethods, DerivedTypeCodegenMethods, TypeMembershipCodegenMethods,
};
use rustc_middle::ty::layout::TyAndLayout;
use rustc_middle::{bug, ty};
use rustc_target::abi::{AddressSpace, Align, Integer, Size};

use crate::common::TypeReflection;
use crate::context::CodegenCx;
Expand Down
7 changes: 4 additions & 3 deletions compiler/rustc_codegen_gcc/src/type_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ use std::fmt::Write;
use gccjit::{Struct, Type};
use rustc_abi as abi;
use rustc_abi::Primitive::*;
use rustc_abi::{BackendRepr, FieldsShape, Integer, PointeeInfo, Size, Variants};
use rustc_abi::{
BackendRepr, FieldsShape, Integer, PointeeInfo, Reg, Size, TyAbiInterface, Variants,
};
use rustc_codegen_ssa::traits::{
BaseTypeCodegenMethods, DerivedTypeCodegenMethods, LayoutTypeCodegenMethods,
};
use rustc_middle::bug;
use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
use rustc_middle::ty::print::with_no_trimmed_paths;
use rustc_middle::ty::{self, CoroutineArgsExt, Ty, TypeVisitableExt};
use rustc_target::abi::TyAbiInterface;
use rustc_target::abi::call::{CastTarget, FnAbi, Reg};
use rustc_target::callconv::{CastTarget, FnAbi};

use crate::abi::{FnAbiGcc, FnAbiGccExt, GccType};
use crate::context::CodegenCx;
Expand Down
11 changes: 3 additions & 8 deletions compiler/rustc_hir_typeck/src/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {

// prim -> prim
(Int(CEnum), Int(_)) => {
self.cenum_impl_drop_lint(fcx);
self.err_if_cenum_impl_drop(fcx);
Ok(CastKind::EnumCast)
}
(Int(Char) | Int(Bool), Int(_)) => Ok(CastKind::PrimIntCast),
Expand Down Expand Up @@ -1091,19 +1091,14 @@ impl<'a, 'tcx> CastCheck<'tcx> {
}
}

fn cenum_impl_drop_lint(&self, fcx: &FnCtxt<'a, 'tcx>) {
fn err_if_cenum_impl_drop(&self, fcx: &FnCtxt<'a, 'tcx>) {
if let ty::Adt(d, _) = self.expr_ty.kind()
&& d.has_dtor(fcx.tcx)
{
let expr_ty = fcx.resolve_vars_if_possible(self.expr_ty);
let cast_ty = fcx.resolve_vars_if_possible(self.cast_ty);

fcx.tcx.emit_node_span_lint(
lint::builtin::CENUM_IMPL_DROP_CAST,
self.expr.hir_id,
self.span,
errors::CastEnumDrop { expr_ty, cast_ty },
);
fcx.dcx().emit_err(errors::CastEnumDrop { span: self.span, expr_ty, cast_ty });
}
}

Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_hir_typeck/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,11 @@ pub(crate) struct CannotCastToBool<'tcx> {
pub help: CannotCastToBoolHelp,
}

#[derive(LintDiagnostic)]
#[derive(Diagnostic)]
#[diag(hir_typeck_cast_enum_drop)]
pub(crate) struct CastEnumDrop<'tcx> {
#[primary_span]
pub span: Span,
pub expr_ty: Ty<'tcx>,
pub cast_ty: Ty<'tcx>,
}
Expand Down
12 changes: 10 additions & 2 deletions compiler/rustc_hir_typeck/src/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,16 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {

fn check_pat_expr_unadjusted(&self, lt: &'tcx hir::PatExpr<'tcx>) -> Ty<'tcx> {
let ty = match &lt.kind {
rustc_hir::PatExprKind::Lit { lit, .. } => {
self.check_expr_lit(lit, Expectation::NoExpectation)
rustc_hir::PatExprKind::Lit { lit, negated } => {
let ty = self.check_expr_lit(lit, Expectation::NoExpectation);
if *negated {
self.register_bound(
ty,
self.tcx.require_lang_item(LangItem::Neg, Some(lt.span)),
ObligationCause::dummy_with_span(lt.span),
);
}
ty
}
rustc_hir::PatExprKind::ConstBlock(c) => {
self.check_expr_const_block(c, Expectation::NoExpectation)
Expand Down
5 changes: 5 additions & 0 deletions compiler/rustc_lint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,11 @@ fn register_builtins(store: &mut LintStore) {
<https://github.com/rust-lang/rust/pull/125380> for more information",
);
store.register_removed("unsupported_calling_conventions", "converted into hard error");
store.register_removed(
"cenum_impl_drop_cast",
"converted into hard error, \
see <https://github.com/rust-lang/rust/issues/73333> for more information",
);
}

fn register_internals(store: &mut LintStore) {
Expand Down
53 changes: 0 additions & 53 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ declare_lint_pass! {
BARE_TRAIT_OBJECTS,
BINDINGS_WITH_VARIANT_NAME,
BREAK_WITH_LABEL_AND_LOOP,
CENUM_IMPL_DROP_CAST,
COHERENCE_LEAK_CHECK,
CONFLICTING_REPR_HINTS,
CONST_EVALUATABLE_UNCHECKED,
Expand Down Expand Up @@ -2612,58 +2611,6 @@ declare_lint! {
@edition Edition2024 => Warn;
}

declare_lint! {
/// The `cenum_impl_drop_cast` lint detects an `as` cast of a field-less
/// `enum` that implements [`Drop`].
///
/// [`Drop`]: https://doc.rust-lang.org/std/ops/trait.Drop.html
///
/// ### Example
///
/// ```rust,compile_fail
/// # #![allow(unused)]
/// enum E {
/// A,
/// }
///
/// impl Drop for E {
/// fn drop(&mut self) {
/// println!("Drop");
/// }
/// }
///
/// fn main() {
/// let e = E::A;
/// let i = e as u32;
/// }
/// ```
///
/// {{produces}}
///
/// ### Explanation
///
/// Casting a field-less `enum` that does not implement [`Copy`] to an
/// integer moves the value without calling `drop`. This can result in
/// surprising behavior if it was expected that `drop` should be called.
/// Calling `drop` automatically would be inconsistent with other move
/// operations. Since neither behavior is clear or consistent, it was
/// decided that a cast of this nature will no longer be allowed.
///
/// This is a [future-incompatible] lint to transition this to a hard error
/// in the future. See [issue #73333] for more details.
///
/// [future-incompatible]: ../index.md#future-incompatible-lints
/// [issue #73333]: https://github.com/rust-lang/rust/issues/73333
/// [`Copy`]: https://doc.rust-lang.org/std/marker/trait.Copy.html
pub CENUM_IMPL_DROP_CAST,
Deny,
"a C-like enum implementing Drop is cast",
@future_incompatible = FutureIncompatibleInfo {
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
reference: "issue #73333 <https://github.com/rust-lang/rust/issues/73333>",
};
}

declare_lint! {
/// The `fuzzy_provenance_casts` lint detects an `as` cast between an integer
/// and a pointer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ pub(crate) fn target() -> Target {
pointer_width: 32,
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),
arch: "powerpc".into(),
options: TargetOptions { endian: Endian::Big, mcount: "_mcount".into(), ..base },
options: TargetOptions {
endian: Endian::Big,
features: "+secure-plt".into(),
mcount: "_mcount".into(),
..base
},
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub(crate) fn target() -> Target {
options: TargetOptions {
abi: "spe".into(),
endian: Endian::Big,
features: "+secure-plt".into(),
mcount: "_mcount".into(),
..base
},
Expand Down
Loading
Loading