Skip to content

Commit

Permalink
Merge pull request #1711 from mejrs/macro
Browse files Browse the repository at this point in the history
Add full path for PyCell
  • Loading branch information
davidhewitt committed Jul 3, 2021
2 parents c179c88 + c07c5a4 commit 5715683
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyo3-macros-backend/src/pyclass.rs
Expand Up @@ -538,7 +538,7 @@ fn impl_class(
const IS_BASETYPE: bool = #is_basetype;
const IS_SUBCLASS: bool = #is_subclass;

type Layout = PyCell<Self>;
type Layout = pyo3::PyCell<Self>;
type BaseType = #base;
type ThreadChecker = #thread_checker;

Expand Down
8 changes: 4 additions & 4 deletions tests/ui/invalid_pymethod_receiver.stderr
@@ -1,15 +1,15 @@
error[E0277]: the trait bound `i32: From<&pyo3::PyCell<MyClass>>` is not satisfied
error[E0277]: the trait bound `i32: From<&PyCell<MyClass>>` is not satisfied
--> $DIR/invalid_pymethod_receiver.rs:8:43
|
8 | fn method_with_invalid_self_type(slf: i32, py: Python, index: u32) {}
| ^^^ the trait `From<&pyo3::PyCell<MyClass>>` is not implemented for `i32`
| ^^^ the trait `From<&PyCell<MyClass>>` is not implemented for `i32`
|
= help: the following implementations were found:
<i32 as From<NonZeroI32>>
<i32 as From<bool>>
<i32 as From<i16>>
<i32 as From<i8>>
and 2 others
= note: required because of the requirements on the impl of `Into<i32>` for `&pyo3::PyCell<MyClass>`
= note: required because of the requirements on the impl of `TryFrom<&pyo3::PyCell<MyClass>>` for `i32`
= note: required because of the requirements on the impl of `Into<i32>` for `&PyCell<MyClass>`
= note: required because of the requirements on the impl of `TryFrom<&PyCell<MyClass>>` for `i32`
= note: required by `std::convert::TryFrom::try_from`

1 comment on commit 5715683

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'pyo3-bench'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 5715683 Previous: c179c88 Ratio
extract_hashset 14057981 ns/iter (± 798942) 6538796 ns/iter (± 113060) 2.15

This comment was automatically generated by workflow using github-action-benchmark.

CC: @PyO3/pyo3

Please sign in to comment.