archmage 0.9.23

Safely invoke your intrinsic power, using the tokens granted to you by the CPU. Cast primitive magics faster than any mage alive.
Documentation
//! Soundness exploit regression tests.
//!
//! These tests verify that token soundness vulnerabilities are blocked.
//! Each test file in tests/soundness/ attempts a specific exploit that
//! MUST fail to compile.
//!
//! **Before the fix:** These compiled successfully (t.pass), proving the exploits worked.
//! **After the fix:** All are compile_fail, proving the exploits are blocked.

#![cfg(target_arch = "x86_64")]

#[test]
fn soundness_exploits_blocked() {
    let t = trybuild::TestCases::new();

    // Token shadowing: local struct must not bypass CPU feature detection
    t.compile_fail("tests/soundness/token_shadowing_exploit.rs");

    // Token aliasing: wrong-tier token renamed must not compile with #[arcane]
    t.compile_fail("tests/soundness/token_aliasing_exploit.rs");

    // Sealed trait bypass: external crates must not implement SimdToken
    t.compile_fail("tests/soundness/sealed_trait_bypass.rs");
}