Skip to content

Commit

Permalink
Revert "codegen: seal Ext traits"
Browse files Browse the repository at this point in the history
This reverts commit b0cfba0.

This is not actually necessary because IsA<T> is a requirement for the
extension trait, and IsA is an unsafe trait and must only be implemented
on types that are actually conforming.
  • Loading branch information
sdroege committed Oct 18, 2024
1 parent 5327f5b commit 2fbdc1f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/codegen/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,7 @@ fn generate_builder(w: &mut dyn Write, env: &Env, analysis: &analysis::object::I
fn generate_trait(w: &mut dyn Write, env: &Env, analysis: &analysis::object::Info) -> Result<()> {
write!(
w,
"mod sealed {{
pub trait Sealed {{}}
impl<T: super::IsA<super::{1}>> Sealed for T {{}}
}}
pub trait {}: IsA<{}> + sealed::Sealed + 'static {{",
"pub trait {}: IsA<{}> + 'static {{",
analysis.trait_name, analysis.name
)?;

Expand Down

0 comments on commit 2fbdc1f

Please sign in to comment.