nonempty icon indicating copy to clipboard operation
nonempty copied to clipboard

nonempty! with a single macro fails to compile

Open greyblake opened this issue 11 months ago • 1 comments

First of all, thank you for a really great crate! It makes my life better.

I ran into a tiny bug that I want to report here.

use nonempty::nonempty;

fn main() {
    // Fails to compile (not expected!)
    // Error:
    //     use of undeclared crate or module `alloc`
    let one = nonempty![1];
}

The code above does not compile.

By now I've figured out that I'd need to add

extern crate alloc;

But it's quite weird, considering, that

let two = nonempty![1, 2];

works without extern crate alloc;

greyblake avatar Dec 22 '24 17:12 greyblake