cranelift_codegen/opts/generated_code.rs
1//! Wrapper environment for generated code from optimization rules in ISLE.
2
3// See https://github.com/rust-lang/rust/issues/47995: we cannot use `#![...]` attributes inside of
4// the generated ISLE source below because we include!() it. We must include!() it because its path
5// depends on an environment variable; and also because of this, we can't do the `#[path = "..."]
6// mod generated_code;` trick either.
7#![expect(
8 dead_code,
9 unreachable_patterns,
10 unused_imports,
11 unused_variables,
12 irrefutable_let_patterns,
13 non_camel_case_types,
14 clippy::clone_on_copy,
15 reason = "generated code"
16)]
17
18include!(concat!(env!("ISLE_DIR"), "/isle_opt.rs"));