Skip to content

error with #[rustc_safe_intrinsic] in Rust 1.84.0 #6

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

Open
cuviper opened this issue Dec 24, 2024 · 4 comments
Open

error with #[rustc_safe_intrinsic] in Rust 1.84.0 #6

cuviper opened this issue Dec 24, 2024 · 4 comments

Comments

@cuviper
Copy link

cuviper commented Dec 24, 2024

FYI, this showed up in the 1.84.0-beta crater run: rust-lang/rust#134138

https://crater-reports.s3.amazonaws.com/beta-1.84.0-4-retry2/beta-2024-12-08/gh/whitequark.superlinker/log.txt

[INFO] [stderr]   error: attributes starting with `rustc` are reserved for use by the `rustc` compiler
[INFO] [stderr]      --> shim/main.rs:100:11
[INFO] [stderr]       |
[INFO] [stderr]   100 |         #[rustc_safe_intrinsic]
[INFO] [stderr]       |           ^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] 
[INFO] [stderr]   error: cannot find attribute `rustc_safe_intrinsic` in this scope
[INFO] [stderr]      --> shim/main.rs:100:11
[INFO] [stderr]       |
[INFO] [stderr]   100 |         #[rustc_safe_intrinsic]
[INFO] [stderr]       |           ^^^^^^^^^^^^^^^^^^^^ help: a built-in attribute with a similar name exists: `rustc_intrinsic`
[INFO] [stderr] 
[INFO] [stderr]   error: requires `legacy_receiver` lang_item
[INFO] [stderr]      --> shim/main.rs:144:11
[INFO] [stderr]       |
[INFO] [stderr]   144 |     fn eq(&self, other: &usize) -> bool {
[INFO] [stderr]       |           ^^^^^
[INFO] [stderr] 
[INFO] [stderr]   error: requires `legacy_receiver` lang_item
[INFO] [stderr]      --> shim/main.rs:147:11
[INFO] [stderr]       |
[INFO] [stderr]   147 |     fn ne(&self, other: &usize) -> bool {
[INFO] [stderr]       |           ^^^^^
[INFO] [stderr] 
[INFO] [stderr]   error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `wrapping_add`
[INFO] [stderr]      --> shim/main.rs:102:9
[INFO] [stderr]       |
[INFO] [stderr]   102 |         pub(super) fn wrapping_add<T: Copy>(a: T, b: T) -> T;
[INFO] [stderr]       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] 
[INFO] [stderr]   error: aborting due to 5 previous errors

Since you're using RUSTC_BOOTSTRAP=1 for unstable features in this shim, it doesn't count as a Rust regression.

@whitequark
Copy link
Owner

Thank you. Just to be clear, this project is a fun experimental thing that works shockingly well for something that wasn't really written seriously, and you can entirely ignore it for the purpose of crater statistics.

@whitequark
Copy link
Owner

whitequark commented Dec 24, 2024

(The reason we wrote it that way is because we needed to avoid having any other function be included in the binary, or something like that, using Rust as a sort of macroassembler.)

I'll keep the issue open since it's a regression on our side.

@dramforever
Copy link
Collaborator

welp, so much for having fun with #[no_core]

@whitequark
Copy link
Owner

I wonder what legacy_receiver even is

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

No branches or pull requests

3 participants