-
Notifications
You must be signed in to change notification settings - Fork 782
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix unintentional
unsafe_code
trigger (#4574)
* Revert "Add missing #[allow(unsafe_code)] attributes (#4396)" This reverts commit 0e03b39. * fix unintentional `unsafe_code` trigger * add newsfragment
- Loading branch information
1 parent
bbceb9f
commit 9a641f7
Showing
10 changed files
with
45 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Fixes `#[forbid(unsafe_code)]` regression by reverting #4396. | ||
Fixes unintentional `unsafe_code` trigger by adjusting macro hygiene. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#![forbid(unsafe_code)] | ||
|
||
use pyo3::*; | ||
|
||
#[allow(unexpected_cfgs)] | ||
#[path = "../../src/tests/hygiene/mod.rs"] | ||
mod hygiene; | ||
|
||
mod gh_4394 { | ||
use pyo3::prelude::*; | ||
|
||
#[derive(Eq, Ord, PartialEq, PartialOrd, Clone)] | ||
#[pyclass(get_all)] | ||
pub struct VersionSpecifier { | ||
pub(crate) operator: Operator, | ||
pub(crate) version: Version, | ||
} | ||
|
||
#[derive(Eq, Ord, PartialEq, PartialOrd, Debug, Hash, Clone, Copy)] | ||
#[pyo3::pyclass(eq, eq_int)] | ||
pub enum Operator { | ||
Equal, | ||
} | ||
|
||
#[derive(Clone, Eq, PartialEq, PartialOrd, Ord)] | ||
#[pyclass] | ||
pub struct Version; | ||
} | ||
|
||
fn main() {} |