repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_5_1.rs
tests/compile-fail/Rule_5_1.rs
#[allow(dead_code, unused_variables)] const ABC: i32 = 0; fn main() { let abc: i32 = 1; //~^ ERROR Non-compliant - variable name shadows ABC let _ = abc + ABC; }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_14_1.rs
tests/compile-fail/Rule_14_1.rs
fn main() { let mut f: f64 = 0_f64; while f < 1.0 { f += 0.001_f64; //^ ERROR Non-compliant - loop counter with floating point type } }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_2_7.rs
tests/compile-fail/Rule_2_7.rs
#[deny(unused_variables)] fn has_unused_parameter(p1: &mut u16, unused: i16) { //~^ ERROR unused variable: `unused` *p1 = 0; } fn main() { let mut p1: u16 = 0; has_unused_parameter(&mut p1, 2); }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_5_4.rs
tests/compile-fail/Rule_5_4.rs
macro_rules! engine_exhaust_gas_temperature_raw { () => { 3; }; } macro_rules! engine_exhaust_gas_temperature_scaled { //~^ ERROR Non-compliant - variable name shadows engine_exhaust_gas_temperature_raw () => { 4; }; } fn main() { let _ = engine_exhaust_gas_temperature_raw!(); ...
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_16_1.rs
tests/compile-fail/Rule_16_1.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_20_12.rs
tests/compile-fail/Rule_20_12.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_15_3.rs
tests/compile-fail/Rule_15_3.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_11_1.rs
tests/compile-fail/Rule_11_1.rs
/// This function adds one to the input fn add_one(x: i32) -> i32 { x + 1 } fn main() { let _x: u32 = 1 as add_one; //~^ ERROR expected type, found function `add_one` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_2_5.rs
tests/compile-fail/Rule_2_5.rs
#[deny(unused_macros)] macro_rules! data { //~^ ERROR unused macro definition () => { 3; }; } fn main() {}
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_13_1.rs
tests/compile-fail/Rule_13_1.rs
fn main() { let mut x: u8 = 0; let _: [&u8; 2] = [&mut x, &mut x]; //~^ ERROR cannot borrow `x` as mutable more than once at a time }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_21_3.rs
tests/compile-fail/Rule_21_3.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_8_13.rs
tests/compile-fail/Rule_8_13.rs
#[allow(unused_variables)] fn main() { let mut _x: Box<u8> = Box::new(8); //~^ ERROR Non-compliant - "pointer" is not const-qualified. }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_14_2.rs
tests/compile-fail/Rule_14_2.rs
fn main() { let mut bound: u32 = 100; for i in 0..bound { bound -= i; //~^ ERROR Non-compliant - attempt to mutate range bound within loop } }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_10_6.rs
tests/compile-fail/Rule_10_6.rs
fn main() { let x: u16 = 1; let y: u16 = 2; let z: u32 = x + y; //~^ ERROR mismatched types }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_21_1.rs
tests/compile-fail/Rule_21_1.rs
macro_rules! println { //~ ERROR Non-compliant - redefinition of macro name () => { 3; }; } fn main() { println!(); }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_9_4.rs
tests/compile-fail/Rule_9_4.rs
#[derive(Debug)] struct Once { a: i32, } fn main() { let _ = Once { a: 1, a: 2 }; //~^ ERROR field `a` specified more than once }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_11_5.rs
tests/compile-fail/Rule_11_5.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_20_8.rs
tests/compile-fail/Rule_20_8.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_1_2.rs
tests/compile-fail/Rule_1_2.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_8_10.rs
tests/compile-fail/Rule_8_10.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_2_3.rs
tests/compile-fail/Rule_2_3.rs
#[deny(dead_code)] fn main() { type LocalType = i16; //~ ERROR type alias is never used: `LocalType` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_20_4.rs
tests/compile-fail/Rule_20_4.rs
macro_rules! while { //~ ERROR expected identifier, found keyword `while` //~^ ERROR unused macro definition () => (3;); } fn main() { let _ = while!(); //~^ ERROR expected one of `.`, `?`, `{`, or an operator, found `;` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_8_3.rs
tests/compile-fail/Rule_8_3.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_8_4.rs
tests/compile-fail/Rule_8_4.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_22_1.rs
tests/compile-fail/Rule_22_1.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_13_5.rs
tests/compile-fail/Rule_13_5.rs
/// This function has a side effect. fn not(x: &mut bool) -> &mut bool { *x = !*x; x } fn main() { let mut x: bool = true; if *not(&mut x) || *not(&mut x) { //~^ ERROR Non-compliant - right hand operand contains persistent side-effects } }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_15_7.rs
tests/compile-fail/Rule_15_7.rs
fn main() { let x = 1; if x == 2 { let _ = 1; } else if x == 3 { let _ = 2; } //~^ ERROR Non-compliant - no terminating `else` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_8_9.rs
tests/compile-fail/Rule_8_9.rs
const GLOBAL: u32 = 0; fn main() { let _x = GLOBAL + 1; //~^ ERROR Non-compliant - global only used at block scope }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_14_4.rs
tests/compile-fail/Rule_14_4.rs
fn main() { let a: i32 = 0; if a { //~^ ERROR mismatched types } }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_8_7.rs
tests/compile-fail/Rule_8_7.rs
pub const LIBRARY_GLOBAL: u32 = 0; //~^ ERROR Non-compliant - public but not used
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_18_6.rs
tests/compile-fail/Rule_18_6.rs
fn func() -> &'static i8 { let local_auto: i8 = 0; &local_auto //~^ ERROR `local_auto` does not live long enough } fn main() { func(); }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_8_2.rs
tests/compile-fail/Rule_8_2.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_10_3.rs
tests/compile-fail/Rule_10_3.rs
fn main() { let x: u32 = 2; let y: u16 = x; //~ ERROR mismatched types }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_20_9.rs
tests/compile-fail/Rule_20_9.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_8_1.rs
tests/compile-fail/Rule_8_1.rs
#[allow(unused_assignments, unused_variables)] fn main() { let x; //~^ ERROR Non-compliant - type not explicitly specified x = 1; }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_11_3.rs
tests/compile-fail/Rule_11_3.rs
#[derive(Debug)] struct TypeA { f: f64, } #[derive(Debug)] struct TypeB { f: f64, } fn main() { let ta = TypeA { f: 3.14 }; let tb1: TypeB = ta as TypeB; //~^ ERROR non-primitive cast: `TypeA` as `TypeB` let tb2: TypeB = From::from(ta); //~^ ERROR the trait bound `TypeB: std::convert::From...
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_15_6.rs
tests/compile-fail/Rule_15_6.rs
fn main() { loop let _ = 1; //~^ ERROR expected `{`, found `let` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_8_12.rs
tests/compile-fail/Rule_8_12.rs
enum Uniqueness { red = 3, blue, green, yellow = 5, //~ ERROR discriminant value `5` already exists } fn main() {}
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_10_2.rs
tests/compile-fail/Rule_10_2.rs
fn main() { let x: i16 = -2; let y = x - 'a'; //~^ ERROR cannot subtract `char` from `i16` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_9_3.rs
tests/compile-fail/Rule_9_3.rs
fn main() { let x: [i32; 3] = [0, 1]; //~^ ERROR mismatched types }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_18_1.rs
tests/compile-fail/Rule_18_1.rs
fn main() { let c: [i32; 2] = [0; 2]; let mut p = &c[3]; p += 1; //~^ ERROR binary assignment operation `+=` cannot be applied to type `&i32` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_5_5.rs
tests/compile-fail/Rule_5_5.rs
#[allow(unused_variables, unused_macros)] macro_rules! val { () => { 3; }; } fn main() { let val!: i16 = 1; //~ ERROR expected open delimiter }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_3_1.rs
tests/compile-fail/Rule_3_1.rs
fn main() { /* /* Nested comment */ // Nested comment */ //~^ ERROR nested comments }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_17_8.rs
tests/compile-fail/Rule_17_8.rs
fn paramod(mut para: u16) -> u16 { para += 1; //~ ERROR parameter modified without persistent effect let _ = para; 1 } fn main() { paramod(1); }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_15_2.rs
tests/compile-fail/Rule_15_2.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_18_8.rs
tests/compile-fail/Rule_18_8.rs
fn main() { let mut s = 10; let a: [u32; s]; //~^ ERROR attempt to use a non-constant value in a constant }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_16_4.rs
tests/compile-fail/Rule_16_4.rs
fn main() { let i = 1; match i { //~^ ERROR non-exhaustive patterns: `_` not covered 0 => {} } }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_11_6.rs
tests/compile-fail/Rule_11_6.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_10_5.rs
tests/compile-fail/Rule_10_5.rs
fn main() { let x: bool = 3 as bool; //~ ERROR cannot cast as `bool` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_8_6.rs
tests/compile-fail/Rule_8_6.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_17_2.rs
tests/compile-fail/Rule_17_2.rs
/// This function employs recursion. fn recursive(depth: u64) { if depth == 2 { return; } recursive(depth + 1); //~^ ERROR Non-compliant - function calls itself } fn main() { recursive(0); }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_15_5.rs
tests/compile-fail/Rule_15_5.rs
fn main() { let x = 1; if x > 1 { return; } if x < 1 { return; //~^ ERROR Non-compliant - more than one exit point from function } }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_20_3.rs
tests/compile-fail/Rule_20_3.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_21_2.rs
tests/compile-fail/Rule_21_2.rs
macro_rules! println { //~ ERROR Non-compliant - redefinition of macro name () => { 3; }; } fn main() { println!(); }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_9_2.rs
tests/compile-fail/Rule_9_2.rs
union UnionType { f1: i16, f2: i32, } fn main() { let x: UnionType = 0; //~ ERROR mismatched types let y: [[usize;2]; 3] = [0,1,2,3,4,5]; //~^ ERROR mismatched types }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_18_5.rs
tests/compile-fail/Rule_18_5.rs
fn nesting(p: &&&&&&[u8; 10]) { let _ = ****p; } fn main() { let a = [5; 10]; nesting(&&&&&&a); //~^ ERROR Non-compliant - reference nesting exceeds maximum allowed }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_18_3.rs
tests/compile-fail/Rule_18_3.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_17_5.rs
tests/compile-fail/Rule_17_5.rs
fn fn1(data: [u32; 3]) { // } fn main() { let data: [u32; 4]; fn1(data); //~^ ERROR mismatched types }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_11_9.rs
tests/compile-fail/Rule_11_9.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_21_9.rs
tests/compile-fail/Rule_21_9.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_19_2.rs
tests/compile-fail/Rule_19_2.rs
union UnionA { f1: i16, f2: i32, } fn main() { let mut u = UnionA { f2: 0 }; u.f1 = 3; }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_10_4.rs
tests/compile-fail/Rule_10_4.rs
fn main() { let x: u32 = 2; let y: u16 = 4; let z = x + y; //~ ERROR mismatched types //~^ ERROR cannot add `u16` to `u32` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_20_13.rs
tests/compile-fail/Rule_20_13.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_21_7.rs
tests/compile-fail/Rule_21_7.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_18_2.rs
tests/compile-fail/Rule_18_2.rs
fn main() { let a1: [i32; 10] = [0; 10]; let a2: [i32; 10] = [0; 10]; let _ = &a1 - &a2; //~^ ERROR binary operation `-` cannot be applied to type `&[i32; 10]` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_21_12.rs
tests/compile-fail/Rule_21_12.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_5_7.rs
tests/compile-fail/Rule_5_7.rs
struct Deer {} fn main() { let _: Deer = Deer {}; { struct Deer {} //~^ ERROR Non-compliant - struct name shadows struct Deer in global scope let _: Deer = Deer {}; } }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_1_3.rs
tests/compile-fail/Rule_1_3.rs
#![deny(unsafe_code)] fn main() { let _x = unsafe { *(&0 as *const i32) }; //~^ ERROR usage of an `unsafe` block }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_21_11.rs
tests/compile-fail/Rule_21_11.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_22_6.rs
tests/compile-fail/Rule_22_6.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_9_1.rs
tests/compile-fail/Rule_9_1.rs
#[allow(unused_variables)] fn main() { let x: u16; let y = x + 1; //~^ ERROR use of possibly uninitialized variable: `x` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_15_4.rs
tests/compile-fail/Rule_15_4.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_11_4.rs
tests/compile-fail/Rule_11_4.rs
#[derive(Debug)] struct TypeA { f: f64, } fn main() { let i16_a: i16 = 1; let u32_b: u32 = &i16_a as &u16; //~ ERROR mismatched types //~^ ERROR non-primitive cast: `&i16` as `&u16` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_22_4.rs
tests/compile-fail/Rule_22_4.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_17_6.rs
tests/compile-fail/Rule_17_6.rs
fn main() { let data: [u32; static 4]; //~^ ERROR expected one of `move`, `|`, or `||`, found `4` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_16_3.rs
tests/compile-fail/Rule_16_3.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_16_6.rs
tests/compile-fail/Rule_16_6.rs
fn main() { let i = 1; match i { _ => {} //~ ERROR Non-compliant - less that two clauses } }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_17_7.rs
tests/compile-fail/Rule_17_7.rs
fn func(para1: u16) -> u16 { para1 } fn discarded(para2: u16) { func(para2); //~^ ERROR Non-compliant - `func` return discarded } fn main() { discarded(1); }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_20_10.rs
tests/compile-fail/Rule_20_10.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_8_14.rs
tests/compile-fail/Rule_8_14.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_2_2.rs
tests/compile-fail/Rule_2_2.rs
#[deny(dead_code)] const DEAD_CODE: i32 = 0; //~^ ERROR constant item is never used: `DEAD_CODE` fn main() {}
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_10_7.rs
tests/compile-fail/Rule_10_7.rs
fn main() { let u16_a: u16 = 1; let u16_b: u16 = 2; let u32_c: u32 = 3; let _ = u32_c * (u16_a + u16_b); //~ ERROR mismatched types //~^ ERROR cannot multiply `u16` to `u32` }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_17_4.rs
tests/compile-fail/Rule_17_4.rs
fn return_v1(depth: u64) -> u64 { if depth == 2 { //~^ ERROR if may be missing an else clause return depth; } } fn return_v2(depth: u64) -> u64 { if depth == 2 { return; //~ ERROR `return;` in a function whose return type is not `()` } depth } fn main() { return_v1(0);...
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_2_1.rs
tests/compile-fail/Rule_2_1.rs
#[deny(unreachable_code)] fn main() { let x: u16; return; x = 3; //~ ERROR unreachable statement }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_21_8.rs
tests/compile-fail/Rule_21_8.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_11_7.rs
tests/compile-fail/Rule_11_7.rs
fn main() { let p: &i16; let _ = p as f32; //~^ ERROR casting `&i16` as `f32` is invalid }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_20_14.rs
tests/compile-fail/Rule_20_14.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_7_2.rs
tests/compile-fail/Rule_7_2.rs
#[allow(unused_variables)] fn main() { let compliant_unsigned: u32 = 1u32; let unsigned: u32 = 1; //~^ ERROR Non-compliant - suffix specifying unsigned type required on integer constants }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_2_4.rs
tests/compile-fail/Rule_2_4.rs
#[deny(dead_code)] fn main() { enum State { //~^ ERROR enum is never used: `State` SInit, SRun, SSleep, };}
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_22_5.rs
tests/compile-fail/Rule_22_5.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_20_1.rs
tests/compile-fail/Rule_20_1.rs
struct MyStruct { a: u32, } fn func(_: MyStruct) {} use std::fmt; //~ ERROR Non-compliant - `include` directive preceeded by something other than macros or comments impl fmt::Display for MyStruct { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "MyStruct{{ {} }}", self.a) } } f...
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_5_9.rs
tests/compile-fail/Rule_5_9.rs
const count: i32 = 0; fn main() { let count: i32 = 1; //~^ ERROR refutable pattern in local binding: `_` not covered }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_20_2.rs
tests/compile-fail/Rule_20_2.rs
include!("../../include/_'_.rs"); //~ ERROR invalid character `'` in crate name: `Rule_20_2_'` fn main() {}
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_21_10.rs
tests/compile-fail/Rule_21_10.rs
"N/A" //~^ ERROR expected item, found `"N/A"`
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_8_11.rs
tests/compile-fail/Rule_8_11.rs
pub const arr: [i32] = []; //~ ERROR the size for value values of type `[i32]` cannot be known at compilation time //~^ ERROR mismatched types fn main() {}
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/tests/compile-fail/Rule_18_7.rs
tests/compile-fail/Rule_18_7.rs
fn main() { let a: [u32]; //~^ ERROR the size for value values of type `[u32]` cannot be known at compilation time }
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
PolySync/misra-rust
https://github.com/PolySync/misra-rust/blob/caa5e5bf9133f277f60a5807e79da6789a1fbb1e/include/_'_.rs
include/_'_.rs
// _'_.rs // Not a MISRA compiant file name.
rust
MIT
caa5e5bf9133f277f60a5807e79da6789a1fbb1e
2026-01-04T20:22:35.104590Z
false
ProjectZKM/zkm
https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/runtime/precompiles/src/lib.rs
runtime/precompiles/src/lib.rs
//! Ported from Precompiles for SP1 zkVM. //! //! Specifically, this crate contains user-friendly functions that call SP1 syscalls. Syscalls are //! also declared here for convenience. In order to avoid duplicate symbol errors, the syscall //! function impls must live in sp1-zkvm, which is only imported into the end us...
rust
MIT
eb09cf6c81bed9717bc98e4a4c9a61f54787a351
2026-01-04T20:21:15.281276Z
false
ProjectZKM/zkm
https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/runtime/precompiles/src/io.rs
runtime/precompiles/src/io.rs
//! Ported from Precompiles for SP1 zkVM. #![allow(unused_unsafe)] use crate::syscall_keccak; use crate::syscall_verify; use crate::syscall_write; use crate::{syscall_hint_len, syscall_hint_read}; use crate::{syscall_sha256_compress, syscall_sha256_extend}; use serde::de::DeserializeOwned; use serde::Serialize; use sh...
rust
MIT
eb09cf6c81bed9717bc98e4a4c9a61f54787a351
2026-01-04T20:21:15.281276Z
false
ProjectZKM/zkm
https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/runtime/precompiles/src/utils.rs
runtime/precompiles/src/utils.rs
//! Ported from Precompiles for SP1 zkVM. pub trait CurveOperations<const NUM_WORDS: usize> { const GENERATOR: [u32; NUM_WORDS]; fn add_assign(limbs: &mut [u32; NUM_WORDS], other: &[u32; NUM_WORDS]); fn double(limbs: &mut [u32; NUM_WORDS]); } #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct Affine...
rust
MIT
eb09cf6c81bed9717bc98e4a4c9a61f54787a351
2026-01-04T20:21:15.281276Z
false