Skip to content

Conversation

@greyblake
Copy link
Contributor

It fixes #68

I hope using vec![] should not be a big problem, cause vec![] is already used in another branch of the macro.

Thank you again for you work!

@FintanH
Copy link
Collaborator

FintanH commented Jan 6, 2025

Thanks for the contribution! @nuttycom would vec! work here, or would that mean that std is required? It seems like the no-std builds successfully, so perhaps it's fine!

@greyblake
Copy link
Contributor Author

@FintanH

vec![] is already used in another branch of the macro, so I would assume it does not make it worse :D

image

@nuttycom
Copy link
Contributor

nuttycom commented Jan 6, 2025 via email

@d-k-bo
Copy link

d-k-bo commented Jan 7, 2025

vec! itself is part of std

It is actually part of alloc: https://doc.rust-lang.org/alloc/macro.vec.html

It looks like it requires a #[macro_use] on alloc to compile, take a look at this example:

#![no_std]

#[macro_use]
extern crate alloc;

fn main() {
    vec![0];
}

@FintanH
Copy link
Collaborator

FintanH commented Jan 13, 2025

Ok, so afaiu this change is fine because the no-std actions check uses --no-default-features which means that std is not enabled, and all other dependencies are optional – so also not enabled – and it passes just fine :) I'll merge and push a hotfix version

@FintanH FintanH mentioned this pull request Jan 13, 2025
@greyblake
Copy link
Contributor Author

@FintanH Thanks!

@FintanH
Copy link
Collaborator

FintanH commented Jul 19, 2025

Resolved in #70

@FintanH FintanH closed this Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nonempty! with a single macro fails to compile

4 participants