- 
                Notifications
    
You must be signed in to change notification settings  - Fork 231
 
Closed
Labels
C-zerovecComponent: Yoke, ZeroVec, DataBakeComponent: Yoke, ZeroVec, DataBakeT-bugType: Bad behavior, security, privacyType: Bad behavior, security, privacy
Description
The error is:
error: calls to `std::mem::forget` with a value that implements `Copy` does nothing
   --> utils/zerovec/src/yoke_impls.rs:174:13
    |
174 |             mem::forget(self);
    |             ^^^^^^^^^^^^----^
    |                         |
    |                         argument has type `map::borrowed::ZeroMapBorrowed<'_, K, V>`
    |
    = note: use `let _ = ...` to ignore the expression or result
    = note: `-D forget-copy` implied by `-D warnings`
error: calls to `std::mem::forget` with a value that implements `Copy` does nothing
   --> utils/zerovec/src/yoke_impls.rs:182:9
    |
182 |         mem::forget(from);
    |         ^^^^^^^^^^^^----^
    |                     |
    |                     argument has type `map::borrowed::ZeroMapBorrowed<'_, K, V>`
    |
    = note: use `let _ = ...` to ignore the expression or result
error: calls to `std::mem::forget` with a value that implements `Copy` does nothing
   --> utils/zerovec/src/yoke_impls.rs:2[70](https://github.com/unicode-org/icu4x/actions/runs/4981308660/jobs/8915392667#step:8:71):13
    |
270 |             mem::forget(self);
    |             ^^^^^^^^^^^^----^
    |                         |
    |                         argument has type `map2d::borrowed::ZeroMap2dBorrowed<'_, K0, K1, V>`
    |
    = note: use `let _ = ...` to ignore the expression or result
error: calls to `std::mem::forget` with a value that implements `Copy` does nothing
   --> utils/zerovec/src/yoke_impls.rs:278:9
    |
278 |         mem::forget(from);
    |         ^^^^^^^^^^^^----^
    |                     |
    |                     argument has type `map2d::borrowed::ZeroMap2dBorrowed<'_, K0, K1, V>`
    |
    = note: use `let _ = ...` to ignore the expression or result
It seems harmless to fix, but I would really like to stop breaking clients; see #3425
However, it appears to only be a lint, so we might be good if we patch the lint.
CC @Manishearth
Metadata
Metadata
Assignees
Labels
C-zerovecComponent: Yoke, ZeroVec, DataBakeComponent: Yoke, ZeroVec, DataBakeT-bugType: Bad behavior, security, privacyType: Bad behavior, security, privacy