Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Commit 7c2ff85

Browse files
committed
Mark generated rust sim impl's with #[automatically_derived]
This prevents the compiler from performing expensive and unnecessary lints on the generated code, saving several seconds and, more importantly, several GB(!!) of memory during compilation of large sims. See rust-lang/rust#79671 (comment) for more info.
1 parent 3ba2b92 commit 7c2ff85

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed
9+
- Mark generated rust simulator impl's with `#[automatically_derived]` to skip expensive lints during compilation.
810

911
## [0.1.14] - 2020-11-29
1012
### Changed

kaze/src/sim.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ pub fn generate<'a, W: Write>(
280280
w.append_line("}")?;
281281
w.append_newline()?;
282282

283+
w.append_line("#[automatically_derived]")?;
283284
w.append_indent()?;
284285
w.append("impl")?;
285286
if options.tracing {

0 commit comments

Comments
 (0)