Skip to content

Commit

Permalink
include note on feature unification
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkern committed Sep 11, 2024
1 parent 7fcd8c6 commit 35a24bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions book/src/unsafe.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ undefined behavior. Additionally, code generated by the macro will not use the
unsafe keyword, so generated code may be used in a crates using the
`#![forbid(unsafe_code)]` attribute.

When the `forbid-unsafe` feature is added to a direct dependency on the `Logos` crate,
[Feature Unification](https://doc.rust-lang.org/cargo/reference/features.html#feature-unification)
ensures any transitive inclusion of `Logos` via other dependencies also have unsafe
code disabled.

Generally, disabling unsafe code will result in a slower parser.

However making definitive statements around performance of safe-only code is difficult,
Expand Down

0 comments on commit 35a24bf

Please sign in to comment.