-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
generics.fail.stderr
51 lines (50 loc) · 2.14 KB
/
generics.fail.stderr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
error[E0277]: the trait bound `NoReflect: Reflect` is not satisfied
--> tests/reflect_derive/generics.fail.rs:16:21
|
16 | foo.get_field::<NoReflect>("a").unwrap();
| --------- ^^^^^^^^^ the trait `Reflect` is not implemented for `NoReflect`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `Reflect`:
bool
char
isize
i8
i16
i32
i64
i128
and $N others
note: required by a bound in `bevy_reflect::GetField::get_field`
--> /home/runner/work/bevy/bevy/crates/bevy_reflect/src/struct_trait.rs:242:21
|
242 | fn get_field<T: Reflect>(&self, name: &str) -> Option<&T>;
| ^^^^^^^ required by this bound in `GetField::get_field`
error[E0277]: the trait bound `NoReflect: GetTypeRegistration` is not satisfied
--> tests/reflect_derive/generics.fail.rs:14:36
|
14 | let mut foo: Box<dyn Struct> = Box::new(Foo::<NoReflect> { a: NoReflect(42.0) });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `GetTypeRegistration` is not implemented for `NoReflect`, which is required by `Foo<NoReflect>: bevy_reflect::Struct`
|
= help: the following other types implement trait `GetTypeRegistration`:
bool
char
isize
i8
i16
i32
i64
i128
and $N others
= note: required for `NoReflect` to implement `RegisterForReflection`
note: required for `Foo<NoReflect>` to implement `bevy_reflect::Struct`
--> tests/reflect_derive/generics.fail.rs:3:10
|
3 | #[derive(Reflect)]
| ^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
4 | #[reflect(from_reflect = false)]
5 | struct Foo<T> {
| ^^^^^^
= note: required for the cast from `Box<Foo<NoReflect>>` to `Box<(dyn bevy_reflect::Struct + 'static)>`
= note: this error originates in the derive macro `Reflect` (in Nightly builds, run with -Z macro-backtrace for more info)