| 1 |
--- |
| 2 |
title: "`define_label!` no longer defines an `Interner`" |
| 3 |
pull_requests: [24445] |
| 4 |
--- |
| 5 |
|
| 6 |
The macro `define_label!()` no longer takes a parameter for the name of an `Interner`, |
| 7 |
and that interner is no longer a public `static` item. Calls like |
| 8 |
|
| 9 |
```rust |
| 10 |
bevy::ecs::define_label!( |
| 11 |
/// Documentation |
| 12 |
ThingLabel, |
| 13 |
THING_LABEL_INTERNER |
| 14 |
); |
| 15 |
``` |
| 16 |
|
| 17 |
must be changed to |
| 18 |
|
| 19 |
```rust |
| 20 |
bevy::ecs::define_label!( |
| 21 |
/// Documentation |
| 22 |
ThingLabel, |
| 23 |
); |
| 24 |
``` |
| 25 |
|
| 26 |
If you were calling `Interner::intern()` on the defined interner, then replace those calls |
| 27 |
with calls to the `.intern()` method of the defined label trait. |