1- error[E0599]: no method named `get_field` found for struct `Box<(dyn Reflect + 'static)>` in the current scope
2- --> tests/reflect_derive/generics.fail.rs:14:9
3- |
4- 14 | foo.get_field::<NoReflect>("a").unwrap();
5- | ^^^^^^^^^ method not found in `Box<(dyn Reflect + 'static)>`
6-
71error[E0277]: the trait bound `NoReflect: Reflect` is not satisfied
8- --> tests/reflect_derive/generics.fail.rs:12:37
2+ --> tests/reflect_derive/generics.fail.rs:14:21
3+ |
4+ 14 | foo.get_field::<NoReflect>("a").unwrap();
5+ | ^^^^^^^^^ the trait `Reflect` is not implemented for `NoReflect`
6+ |
7+ = help: the following other types implement trait `Reflect`:
8+ &'static Path
9+ ()
10+ (A, B)
11+ (A, B, C)
12+ (A, B, C, D)
13+ (A, B, C, D, E)
14+ (A, B, C, D, E, F)
15+ (A, B, C, D, E, F, G)
16+ and $N others
17+ note: required by a bound in `bevy_reflect::GetField::get_field`
18+ --> ~/crates/bevy_reflect/src/struct_trait.rs:243:21
19+ |
20+ 243 | fn get_field<T: Reflect>(&self, name: &str) -> Option<&T>;
21+ | ^^^^^^^ required by this bound in `GetField::get_field`
22+
23+ error[E0277]: the trait bound `NoReflect: GetTypeRegistration` is not satisfied
24+ --> tests/reflect_derive/generics.fail.rs:12:36
925 |
10- 12 | let mut foo: Box<dyn Reflect > = Box::new(Foo::<NoReflect> { a: NoReflect(42.0) });
11- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reflect ` is not implemented for `NoReflect`
26+ 12 | let mut foo: Box<dyn Struct > = Box::new(Foo::<NoReflect> { a: NoReflect(42.0) });
27+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `GetTypeRegistration ` is not implemented for `NoReflect`
1228 |
13- = help: the following other types implement trait `Reflect `:
29+ = help: the following other types implement trait `GetTypeRegistration `:
1430 &'static Path
1531 ()
1632 (A, B)
@@ -20,12 +36,12 @@ error[E0277]: the trait bound `NoReflect: Reflect` is not satisfied
2036 (A, B, C, D, E, F)
2137 (A, B, C, D, E, F, G)
2238 and $N others
23- note: required for `Foo<NoReflect>` to implement `Reflect `
39+ note: required for `Foo<NoReflect>` to implement `bevy_reflect::Struct `
2440 --> tests/reflect_derive/generics.fail.rs:3:10
2541 |
26423 | #[derive(Reflect)]
2743 | ^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
28444 | struct Foo<T> {
2945 | ^^^^^^
30- = note: required for the cast from `Foo<NoReflect>` to the object type `dyn Reflect `
46+ = note: required for the cast from `Foo<NoReflect>` to the object type `dyn bevy_reflect::Struct `
3147 = note: this error originates in the derive macro `Reflect` (in Nightly builds, run with -Z macro-backtrace for more info)
0 commit comments