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

Tracking Issue: Translation nightly features #46

Open
TheDan64 opened this issue Apr 2, 2019 · 10 comments
Open

Tracking Issue: Translation nightly features #46

TheDan64 opened this issue Apr 2, 2019 · 10 comments

Comments

@TheDan64
Copy link
Contributor

TheDan64 commented Apr 2, 2019

This is the tracking issue for generated code which requires nightly to run:

@rinon
Copy link
Contributor

rinon commented Apr 11, 2019

Since libc is on crates.io and rustc errors when we use the internal version, we should drop that off the list of nightly features.

@bjorn3
Copy link

bjorn3 commented Aug 29, 2019

Intrinsics for atomic operations - core_intrinsics - Unlikely to ever be stabilized itself, no tracking issue

Maybe cast the pointer from say *mut u64 to *mut AtomicU64 and then use the normal AtomicU64 methods on it.

@panstromek
Copy link

panstromek commented Jul 19, 2020

Note about ptr_offset_from stabilization:

Method wrapping_offset_from (which is often used in c2rust output) has been deprecated since 1.46 and it is being removed in ptr_offset_from stabilization PR: rust-lang/rust#74238

@chrysn
Copy link
Contributor

chrysn commented Sep 22, 2020

Assembly is now tracked at rust-lang/rust#70173 -- but without any plan for stabilization; see #306. Unless the asm transpilation is significantly reworked (to produce Rust asm rather than llvm_asm), this now falls in the "unlikely to be stabilized" category.

@OvermindDL1
Copy link

Method wrapping_offset_from (which is often used in c2rust output) has been deprecated since 1.46 and it is being removed in ptr_offset_from stabilization PR: rust-lang/rust#74238

And looks like it's entirely gone now, says the feature doesn't exist and the wrapping_offset_from call no longer exists in the source.

@fanninpm
Copy link

And looks like it's entirely gone now, says the feature doesn't exist and the wrapping_offset_from call no longer exists in the source.

It was removed in August.

@XVilka
Copy link

XVilka commented Dec 23, 2020

I think it worth to pin this issue, otherwise it's easy to miss and one of the most important, imho.

@thedataking thedataking pinned this issue Dec 23, 2020
@kkysen
Copy link
Contributor

kkysen commented Jun 9, 2022

A bunch of these features have since been stabilized or removed:

  • asm! is stabilized since 1.59.0: core::arch::asm!
  • wrapping_offset_from was removed but offset_from was added in 1.47.0. It is const unstable.
  • const_raw_ptr_to_usize_cast was removed since it is unsafe at compile time. Why do we need this? You can't const cast a pointer to an integer in C either, even if the pointer was originally cast from an integer: https://godbolt.org/z/xKrhfG7z6. These are errors because they try to be variable-length array declarations:
#include <stdint.h>

int a[(uintptr_t) (char *) 0];
int b[(uintptr_t) ""];
  • const_slice_as_ptr works on stable now: [].as_ptr() has been const since 1.32.0.

@pitaj
Copy link

pitaj commented Apr 29, 2023

It appears that core_intrinsics is also used for rotate_left and rotate_right. Is there a reason these can't just use the inherent methods instead?

@mewmew
Copy link

mewmew commented Sep 10, 2023

the feature label_break_value has been stable since 1.65.0 and no longer requires an attribute to enable

ref: rust-lang/rust#99332

Thus, #![feature(label_break_value)] can be removed from transpiled code output.

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