Skip to content

libcore: Get rid of useless mem::forget wrapper. #16509

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

Merged
merged 1 commit into from
Aug 22, 2014
Merged

Conversation

luqmana
Copy link
Member

@luqmana luqmana commented Aug 14, 2014

Fixes #15401.

@@ -19,6 +19,16 @@ use ptr;

pub use intrinsics::transmute;

/// Moves a thing into the void.
Copy link
Member

Choose a reason for hiding this comment

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

I think these docs (and even the #[stable]) may need to go on the actual definition, not the reexport.

(@aturon would know for sure about the reexport.)

@brson
Copy link
Contributor

brson commented Aug 15, 2014

Do intrinsics seamlessly cast to rust functions yet? This is a breaking change if not, and one I have argued against several times. How does rustdoc deal with this?

@huonw
Copy link
Member

huonw commented Aug 15, 2014

How does rustdoc deal with this?

Poorly, e.g. transmute is reexported in a similar manner: http://doc.rust-lang.org/master/std/mem/fn.transmute.html

@brson
Copy link
Contributor

brson commented Aug 15, 2014

I see transmute has been done. I think we should consider it a bug if this exposing special rust-intrinsic semantics.

@alexcrichton
Copy link
Member

Yes, I agree with @brson that this needs to be a [breaking-change], and with @huonw that the documentation/attribute should move to the actual declaration instead of the pub use (for now).

I do think, however, it's ok to land for now. RFC 5 will give intrinsics the same ABI as other rust functions, so it is going to be fixed on the horizon.

@brson
Copy link
Contributor

brson commented Aug 21, 2014

I also agree it's ok to land as long as we're in agreement there are bugs.

@brson
Copy link
Contributor

brson commented Aug 21, 2014

@bors seems to have not noticed the r+ here, but @alexcrichton did ask for a [breaking-change] tag.

bors added a commit that referenced this pull request Aug 22, 2014
@bors bors closed this Aug 22, 2014
@bors bors merged commit 715abbd into rust-lang:master Aug 22, 2014
@luqmana luqmana deleted the uw branch July 15, 2015 23:52
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this pull request Feb 11, 2024
fix: Fix tuple structs not rendering visibility in their fields

Fixes rust-lang/rust-analyzer#16508
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.

Inline direct calls to mem::forget in the frontend
6 participants