Skip to content

Bug: /crates/samples/create_window/src/main.rs Line 40 expected *-ptr, found enum Option #1977

@bmariuszb

Description

@bmariuszb

Which crate is this about?

windows

Crate version

0.39.0

Summary

No response

Toolchain version/configuration

No response

Reproducible example

No response

Crate manifest

[package]
name = "winows"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies.windows]
version = "0.39.0"
features = [
    "Win32_Foundation",
    "Win32_Graphics_Gdi",
    "Win32_System_LibraryLoader",
    "Win32_UI_WindowsAndMessaging",
]

Expected behavior

Sample runs without errors.

Actual behavior

error[E0308]: mismatched types
--> src\main.rs:40:38
|
40 | ValidateRect(window, None);
| ------------ ^^^^ expected *-ptr, found enum Option
| |
| arguments to this function are incorrect
|
= note: expected raw pointer *const RECT
found enum Option<_>

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions