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>`
6
-
7
1
error[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
+ --> /Users/ginovalente/Projects/Git/rust/bevy/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
9
25
|
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`
12
28
|
13
- = help: the following other types implement trait `Reflect `:
29
+ = help: the following other types implement trait `GetTypeRegistration `:
14
30
&'static Path
15
31
()
16
32
(A, B)
@@ -20,12 +36,12 @@ error[E0277]: the trait bound `NoReflect: Reflect` is not satisfied
20
36
(A, B, C, D, E, F)
21
37
(A, B, C, D, E, F, G)
22
38
and $N others
23
- note: required for `Foo<NoReflect>` to implement `Reflect `
39
+ note: required for `Foo<NoReflect>` to implement `bevy_reflect::Struct `
24
40
--> tests/reflect_derive/generics.fail.rs:3:10
25
41
|
26
42
3 | #[derive(Reflect)]
27
43
| ^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
28
44
4 | struct Foo<T> {
29
45
| ^^^^^^
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 `
31
47
= note: this error originates in the derive macro `Reflect` (in Nightly builds, run with -Z macro-backtrace for more info)
0 commit comments