Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spurious error highlighting "Expected 0 arguments found 1" #5810

Open
jacobrosenthal opened this issue Aug 19, 2020 · 5 comments
Open

Spurious error highlighting "Expected 0 arguments found 1" #5810

jacobrosenthal opened this issue Aug 19, 2020 · 5 comments
Labels
A-diagnostics diagnostics / error reporting S-unactionable Issue requires feedback, design decisions or is blocked on other work

Comments

@jacobrosenthal
Copy link
Contributor

    unsafe {
        USB_SERIAL = Some(SerialPort::new(&bus_allocator));
        USB_BUS = Some(
            UsbDeviceBuilder::new(&bus_allocator, UsbVidPid(0x16c0, 0x27dd))
                .manufacturer("Fake company")
                .product("Serial port")
                .serial_number("TEST")
                .device_class(USB_CLASS_CDC)
                .build(),
        );
    }

Screenshot from 2020-08-18 18-39-31

@jacobrosenthal
Copy link
Contributor Author

Possibly related to #5502
Feel free to close for that issue if so

Version 0.2.281 but its been happening for a while

@bjorn3
Copy link
Member

bjorn3 commented Aug 19, 2020

product is resolved to Iterator::product.

@flodiebold
Copy link
Member

@jacobrosenthal are you still experiencing this?

UsbDeviceBuilder seems to define some of its methods through a macro, but not manufacturer or product, so I'm not sure that's the problem.

@flodiebold flodiebold added the S-unactionable Issue requires feedback, design decisions or is blocked on other work label Dec 21, 2020
@jacobrosenthal
Copy link
Contributor Author

Yes though Theres another example alongside that one called usb_poll.rs that doesnt put the UsbDeviceBuilder in a Some (within an unsafe block) that is fine,

Screenshot from 2020-12-21 15-46-30

    let mut usb_dev = UsbDeviceBuilder::new(&usb_bus, UsbVidPid(0x16c0, 0x27dd))
        .manufacturer("Fake company")
        .product("Serial port")
        .serial_number("TEST")
        .device_class(USB_CLASS_CDC)
        .build();

But not

    unsafe {
        USB_SERIAL = Some(SerialPort::new(&bus_allocator));
        USB_BUS = Some(
            UsbDeviceBuilder::new(&bus_allocator, UsbVidPid(0x16c0, 0x27dd))
                .manufacturer("Fake company")
                .product("Serial port")
                .serial_number("TEST")
                .device_class(USB_CLASS_CDC)
                .build(),
        );
    }

@Veykril Veykril added the A-diagnostics diagnostics / error reporting label Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics diagnostics / error reporting S-unactionable Issue requires feedback, design decisions or is blocked on other work
Projects
None yet
Development

No branches or pull requests

4 participants