Skip to content

Conversation

@mockersf
Copy link
Member

Objective

  • cargo clippy --no-deps --package bevy_render --target wasm32-unknown-unknown fails:
warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
   --> crates/bevy_render/src/view/window/mod.rs:416:13
    |
416 |             drop(window.swap_chain_texture_view.take());
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: argument has type `std::option::Option<render_resource::texture::TextureView>`
   --> crates/bevy_render/src/view/window/mod.rs:416:18
    |
416 |             drop(window.swap_chain_texture_view.take());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop
    = note: `#[warn(clippy::drop_non_drop)]` on by default

warning: `bevy_render` (lib) generated 1 warning

Solution

  • Expect the lint in wasm. It's not an actual problem, and special casing for wasm wouldn't be better

@mockersf mockersf added this to the 0.18 milestone Dec 29, 2025
@mockersf mockersf added A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change labels Dec 29, 2025
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior O-Web Specific to web (WASM) builds S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Dec 29, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Dec 30, 2025
Merged via the queue into bevyengine:main with commit fd36d96 Dec 30, 2025
47 checks passed
mockersf added a commit that referenced this pull request Dec 30, 2025
# Objective

- `cargo clippy --no-deps --package bevy_render --target
wasm32-unknown-unknown` fails:
```
warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
   --> crates/bevy_render/src/view/window/mod.rs:416:13
    |
416 |             drop(window.swap_chain_texture_view.take());
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: argument has type `std::option::Option<render_resource::texture::TextureView>`
   --> crates/bevy_render/src/view/window/mod.rs:416:18
    |
416 |             drop(window.swap_chain_texture_view.take());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop
    = note: `#[warn(clippy::drop_non_drop)]` on by default

warning: `bevy_render` (lib) generated 1 warning
```

## Solution

- Expect the lint in wasm. It's not an actual problem, and special
casing for wasm wouldn't be better
mockersf added a commit that referenced this pull request Dec 30, 2025
# Objective

- `cargo clippy --no-deps --package bevy_render --target
wasm32-unknown-unknown` fails:
```
warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
   --> crates/bevy_render/src/view/window/mod.rs:416:13
    |
416 |             drop(window.swap_chain_texture_view.take());
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: argument has type `std::option::Option<render_resource::texture::TextureView>`
   --> crates/bevy_render/src/view/window/mod.rs:416:18
    |
416 |             drop(window.swap_chain_texture_view.take());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop
    = note: `#[warn(clippy::drop_non_drop)]` on by default

warning: `bevy_render` (lib) generated 1 warning
```

## Solution

- Expect the lint in wasm. It's not an actual problem, and special
casing for wasm wouldn't be better
mockersf added a commit that referenced this pull request Dec 30, 2025
# Objective

- `cargo clippy --no-deps --package bevy_render --target
wasm32-unknown-unknown` fails:
```
warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
   --> crates/bevy_render/src/view/window/mod.rs:416:13
    |
416 |             drop(window.swap_chain_texture_view.take());
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: argument has type `std::option::Option<render_resource::texture::TextureView>`
   --> crates/bevy_render/src/view/window/mod.rs:416:18
    |
416 |             drop(window.swap_chain_texture_view.take());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop
    = note: `#[warn(clippy::drop_non_drop)]` on by default

warning: `bevy_render` (lib) generated 1 warning
```

## Solution

- Expect the lint in wasm. It's not an actual problem, and special
casing for wasm wouldn't be better
mockersf added a commit that referenced this pull request Dec 30, 2025
# Objective

- `cargo clippy --no-deps --package bevy_render --target
wasm32-unknown-unknown` fails:
```
warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
   --> crates/bevy_render/src/view/window/mod.rs:416:13
    |
416 |             drop(window.swap_chain_texture_view.take());
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: argument has type `std::option::Option<render_resource::texture::TextureView>`
   --> crates/bevy_render/src/view/window/mod.rs:416:18
    |
416 |             drop(window.swap_chain_texture_view.take());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop
    = note: `#[warn(clippy::drop_non_drop)]` on by default

warning: `bevy_render` (lib) generated 1 warning
```

## Solution

- Expect the lint in wasm. It's not an actual problem, and special
casing for wasm wouldn't be better
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Code-Quality A section of code that is hard to understand or change O-Web Specific to web (WASM) builds S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants