Skip to content

Commit

Permalink
cleanup crew
Browse files Browse the repository at this point in the history
  • Loading branch information
soqb committed Dec 20, 2023
1 parent 7447ba5 commit 9ef493e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions crates/bevy_reflect/bevy_reflect_derive/src/impls/typed.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::iter;

use crate::utility::{extend_where_clause, StringExpr, WhereClauseOptions};
use quote::{quote, ToTokens};

Expand Down Expand Up @@ -51,7 +49,9 @@ pub(crate) enum TypedProperty {
}

pub(crate) fn impl_type_path(meta: &ReflectMeta) -> proc_macro2::TokenStream {
let where_clause_options = &WhereClauseOptions::new(meta, iter::empty(), iter::empty());
// Use `WhereClauseOptions::new_value` here so we don't enforce reflection bounds,
// ensuring the impl applies in the most cases possible.
let where_clause_options = &WhereClauseOptions::new_value(meta);

if !meta.traits().type_path_attrs().should_auto_derive() {
return proc_macro2::TokenStream::new();
Expand Down
6 changes: 1 addition & 5 deletions crates/bevy_reflect/bevy_reflect_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,7 @@ pub fn derive_type_path(input: TokenStream) -> TokenStream {
Err(err) => return err.into_compile_error().into(),
};

let type_path_impl = impls::impl_type_path(
derive_data.meta(),
// Use `WhereClauseOptions::new_value` here so we don't enforce reflection bounds
// &WhereClauseOptions::new_value(derive_data.meta()),
);
let type_path_impl = impls::impl_type_path(derive_data.meta());

TokenStream::from(quote! {
const _: () = {
Expand Down

0 comments on commit 9ef493e

Please sign in to comment.