Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fe72062c20abbb1ec7d10fdb763184fdb012b5bc
Choose a base ref
..
head repository: rust-lang/rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a64f8088b980a69c0cc6c1ba1e079cbc7a196716
Choose a head ref
Showing with 3 additions and 3 deletions.
  1. +2 −2 compiler/rustc_monomorphize/src/mono_checks/abi_check.rs
  2. +1 −1 tests/ui/lint/wasm_c_abi_transition.rs
4 changes: 2 additions & 2 deletions compiler/rustc_monomorphize/src/mono_checks/abi_check.rs
Original file line number Diff line number Diff line change
@@ -97,7 +97,7 @@ fn wasm_abi_safe<'tcx>(tcx: TyCtxt<'tcx>, arg: &ArgAbi<'tcx, Ty<'tcx>>) -> bool
return true;
}

// This matches `unwrap_trivial_aggregate` in the wasm ABI logic.`
// This matches `unwrap_trivial_aggregate` in the wasm ABI logic.
if arg.layout.is_aggregate() {
let cx = LayoutCx::new(tcx, TypingEnv::fully_monomorphized());
if let Some(unit) = arg.layout.homogeneous_aggregate(&cx).ok().and_then(|ha| ha.unit()) {
@@ -119,7 +119,7 @@ fn do_check_wasm_abi<'tcx>(
is_call: bool,
span: impl Fn() -> Span,
) {
// Only proceed for `extern "C" fn`` on wasm32-unknown-unknown (same check as what `adjust_for_foreign_abi` uses to call `compute_wasm_abi_info`).
// Only proceed for `extern "C" fn` on wasm32-unknown-unknown (same check as what `adjust_for_foreign_abi` uses to call `compute_wasm_abi_info`).
if !(tcx.sess.target.arch == "wasm32"
&& tcx.sess.target.os == "unknown"
&& tcx.wasm_c_abi_opt() == WasmCAbi::Legacy
2 changes: 1 addition & 1 deletion tests/ui/lint/wasm_c_abi_transition.rs
Original file line number Diff line number Diff line change
@@ -38,4 +38,4 @@ extern "C" {
pub fn call_other_fun(x: MyType) {
unsafe { other_fun(x) } //~ERROR: wasm ABI transition
//~^WARN: previously accepted
}
}