NNPDF / pineappl

PineAPPL is not an extension of APPLgrid
https://nnpdf.github.io/pineappl/
GNU General Public License v3.0
12 stars 3 forks source link

Use `#![deny(unsafe_op_in_unsafe_fn)]` in the CAPI #240

Closed cschwan closed 8 months ago

cschwan commented 10 months ago

An unsafe function is automatically an unsafe block, which is unfortunate because these are two different concepts: https://rust-lang.github.io/rfcs/2585-unsafe-block-in-unsafe-fn.html. With unsafe_op_in_unsafe_fn they can be disentangled.

alecandido commented 10 months ago

This is fascinating[] to know (I never paid too much attention to unsafe), but I wouldn't say it's unfortunate*.

As the RFC explains very well, unsafe to call and an unsafe block are strictly related, because the block it's exactly what allows that kind of call (and similar unsafe operations, of course).

[*]: my intrusive spell checker suggested that "really interesting" was a bit poor...

cschwan commented 8 months ago

Implemented in commit 4d74a051800a405d1056cb4368b340783dfa60c2.