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

Added no_std attribute to prevent compile errors #4

Merged
merged 1 commit into from Mar 9, 2021

Conversation

Frago9876543210
Copy link
Contributor

This should fix the compilation error of no_std crates that depends on that macro. This error probably comes because panic handler included twice during compilation.

#[panic_handler]
fn panic(_: &core::panic::PanicInfo) -> ! {
    loop {}
}
error[E0152]: found duplicate lang item `panic_impl`
  --> src\main.rs:35:1
   |
35 | fn panic(_: &core::panic::PanicInfo) -> ! {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: the lang item is first defined in crate `std` (which `const_utf16` depends on)
   = note: first definition in `std` loaded from \\?\C:\Users\alex\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\std-09e4abccd169ee6e.dll, \\?\C:\Users\alex\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libstd-09e4abccd169ee6e.rlib

Copy link
Owner

@rylev rylev left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks 😄

@rylev rylev merged commit 0a1baf6 into rylev:main Mar 9, 2021
@Frago9876543210 Frago9876543210 deleted the patch-1 branch March 9, 2021 17:46
@Frago9876543210
Copy link
Contributor Author

@rylev could you make a release?

@rylev
Copy link
Owner

rylev commented Mar 11, 2021

@Frago9876543210 New release has been pushed.

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.

None yet

2 participants