Skip to content

Conversation

bitdriftr
Copy link

Motivation

This change allows using the #[instrument] macro in #![no_std] crates.

Solution

The macro was generating code referencing ::std::boxed::Box, but Box can be imported from ::alloc::boxed::Box instead which does not require std.

@Copilot Copilot AI review requested due to automatic review settings October 6, 2025 00:56
@bitdriftr bitdriftr requested review from hawkw and a team as code owners October 6, 2025 00:56
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Updates the #[instrument] macro to use ::alloc::boxed::Box instead of ::std::boxed::Box to enable usage in #![no_std] crates.

  • Replaces std reference with alloc reference in generated code
  • Enables #[instrument] macro compatibility with no_std environments

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

1 participant