Skip to content

Commit 639e89a

Browse files
committed
apply review
1 parent 2e71cd7 commit 639e89a

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

crates/derive-impl/src/pyclass.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,7 +1614,6 @@ fn extract_impl_attrs(attr: PunctuatedNestedMeta, item: &Ident) -> Result<Extrac
16141614
}];
16151615
let mut payload = None;
16161616

1617-
let mut has_constructor = false;
16181617
for attr in attr {
16191618
match attr {
16201619
NestedMeta::Meta(Meta::List(MetaList { path, nested, .. })) => {
@@ -1639,9 +1638,6 @@ fn extract_impl_attrs(attr: PunctuatedNestedMeta, item: &Ident) -> Result<Extrac
16391638
"Try `#[pyclass(with(Constructor, ...))]` instead of `#[pyclass(with(DefaultConstructor, ...))]`. DefaultConstructor implicitly implements Constructor."
16401639
)
16411640
}
1642-
if path.is_ident("Constructor") {
1643-
has_constructor = true;
1644-
}
16451641
(
16461642
quote!(<Self as #path>::__extend_py_class),
16471643
quote!(<Self as #path>::__OWN_METHOD_DEFS),
@@ -1694,7 +1690,6 @@ fn extract_impl_attrs(attr: PunctuatedNestedMeta, item: &Ident) -> Result<Extrac
16941690
attr => bail_span!(attr, "Unknown pyimpl attribute"),
16951691
}
16961692
}
1697-
let _ = has_constructor;
16981693

16991694
Ok(ExtractedImplAttrs {
17001695
payload,

crates/vm/src/builtins/type.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -443,17 +443,6 @@ impl PyType {
443443
}
444444

445445
fn set_new(slots: &PyTypeSlots, base: &Option<PyTypeRef>) {
446-
// if self.slots.new.load().is_none()
447-
// && self
448-
// .base
449-
// .as_ref()
450-
// .map(|base| base.class().is(ctx.types.object_type))
451-
// .unwrap_or(false)
452-
// && self.slots.flags.contains(PyTypeFlags::HEAPTYPE)
453-
// {
454-
// self.slots.flags |= PyTypeFlags::DISALLOW_INSTANTIATION;
455-
// }
456-
457446
if slots.flags.contains(PyTypeFlags::DISALLOW_INSTANTIATION) {
458447
slots.new.store(None)
459448
} else if slots.new.load().is_none() {

0 commit comments

Comments
 (0)