Skip to content

Commit 2e29a14

Browse files
committed
add FIXMEs for non_local_definitions
1 parent c613fb2 commit 2e29a14

File tree

7 files changed

+12
-0
lines changed

7 files changed

+12
-0
lines changed

pyo3-macros-backend/src/frompyobject.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,7 @@ pub fn build_derive_from_pyobject(tokens: &DeriveInput) -> Result<TokenStream> {
604604

605605
let ident = &tokens.ident;
606606
Ok(quote!(
607+
// FIXME https://github.com/PyO3/pyo3/issues/3903
607608
#[allow(unknown_lints, non_local_definitions)]
608609
const _: () = {
609610
use #krate as _pyo3;

pyo3-macros-backend/src/module.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ pub fn pymodule_function_impl(mut function: syn::ItemFn) -> Result<TokenStream>
211211
// this avoids complications around the fact that the generated module has a different scope
212212
// (and `super` doesn't always refer to the outer scope, e.g. if the `#[pymodule] is
213213
// inside a function body)
214+
// FIXME https://github.com/PyO3/pyo3/issues/3903
214215
#[allow(unknown_lints, non_local_definitions)]
215216
const _: () = {
216217
use #krate::impl_::pymodule as impl_;

pyo3-macros-backend/src/pyclass.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ fn impl_class(
362362
.impl_all()?;
363363

364364
Ok(quote! {
365+
// FIXME https://github.com/PyO3/pyo3/issues/3903
365366
#[allow(unknown_lints, non_local_definitions)]
366367
const _: () = {
367368
use #krate as _pyo3;
@@ -784,6 +785,7 @@ fn impl_simple_enum(
784785
.impl_all()?;
785786

786787
Ok(quote! {
788+
// FIXME https://github.com/PyO3/pyo3/issues/3903
787789
#[allow(unknown_lints, non_local_definitions)]
788790
const _: () = {
789791
use #krate as _pyo3;
@@ -919,6 +921,7 @@ fn impl_complex_enum(
919921
}
920922

921923
Ok(quote! {
924+
// FIXME https://github.com/PyO3/pyo3/issues/3903
922925
#[allow(unknown_lints, non_local_definitions)]
923926
const _: () = {
924927
use #krate as _pyo3;

pyo3-macros-backend/src/pyfunction.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ pub fn impl_wrap_pyfunction(
281281
// this avoids complications around the fact that the generated module has a different scope
282282
// (and `super` doesn't always refer to the outer scope, e.g. if the `#[pyfunction] is
283283
// inside a function body)
284+
// FIXME https://github.com/PyO3/pyo3/issues/3903
284285
#[allow(unknown_lints, non_local_definitions)]
285286
const _: () = {
286287
use #krate as _pyo3;

pyo3-macros-backend/src/pyimpl.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ pub fn impl_methods(
168168
};
169169

170170
Ok(quote! {
171+
// FIXME https://github.com/PyO3/pyo3/issues/3903
171172
#[allow(unknown_lints, non_local_definitions)]
172173
const _: () = {
173174
use #krate as _pyo3;

src/exceptions.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use std::os::raw::c_char;
1919
#[macro_export]
2020
macro_rules! impl_exception_boilerplate {
2121
($name: ident) => {
22+
// FIXME https://github.com/PyO3/pyo3/issues/3903
2223
#[allow(unknown_lints, non_local_definitions)]
2324
impl ::std::convert::From<&$name> for $crate::PyErr {
2425
#[inline]

src/types/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ macro_rules! pyobject_native_type_named (
188188
}
189189
}
190190

191+
// FIXME https://github.com/PyO3/pyo3/issues/3903
191192
#[allow(unknown_lints, non_local_definitions)]
192193
impl<$($generics,)*> $crate::IntoPy<$crate::Py<$name>> for &'_ $name {
193194
#[inline]
@@ -196,6 +197,7 @@ macro_rules! pyobject_native_type_named (
196197
}
197198
}
198199

200+
// FIXME https://github.com/PyO3/pyo3/issues/3903
199201
#[allow(unknown_lints, non_local_definitions)]
200202
impl<$($generics,)*> ::std::convert::From<&'_ $name> for $crate::Py<$name> {
201203
#[inline]
@@ -205,6 +207,7 @@ macro_rules! pyobject_native_type_named (
205207
}
206208
}
207209

210+
// FIXME https://github.com/PyO3/pyo3/issues/3903
208211
#[allow(unknown_lints, non_local_definitions)]
209212
impl<'a, $($generics,)*> ::std::convert::From<&'a $name> for &'a $crate::PyAny {
210213
fn from(ob: &'a $name) -> Self {
@@ -255,6 +258,7 @@ macro_rules! pyobject_native_type_info(
255258
#[macro_export]
256259
macro_rules! pyobject_native_type_extract {
257260
($name:ty $(;$generics:ident)*) => {
261+
// FIXME https://github.com/PyO3/pyo3/issues/3903
258262
#[allow(unknown_lints, non_local_definitions)]
259263
impl<'py, $($generics,)*> $crate::FromPyObject<'py> for &'py $name {
260264
#[inline]

0 commit comments

Comments
 (0)