Skip to content

Force all lang items to be reachable #11603

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
Feb 22, 2014
Merged

Conversation

alexcrichton
Copy link
Member

This prevents linker errors as found in #11591

Closes #11591

@brson
Copy link
Contributor

brson commented Jan 16, 2014

I'm not sure I agree with this. I had always assumed that lang items should be pub, and that the compiler was wrong in the referenced issue to try to use a lang item that can't be reached. I do see the appeal of being able to hide the details of some of our lang items. Anybody else have an opinion?

@thestinger
Copy link
Contributor

@brson: I think hiding these would be great. They're low-level implementation details and don't belong as accessible public functions at all in my opinion. The interfaces are not thought out and are generally just whatever was easy enough to implement.

@brson
Copy link
Contributor

brson commented Jan 19, 2014

There are lots of public interfaces that aren't lang items that we don't want to commit to, and we have attributes for communicating that.

@thestinger
Copy link
Contributor

There's a difference between an interface without a stability guarantee and an implementation detail. Exposing implementation details without a reason to do it is just making the API needlessly complex.

@brson
Copy link
Contributor

brson commented Feb 8, 2014

I'm coming around to the idea that we should make it harder to access intrinsics and lang items directly. Not opposed to this but would still like more opinions from the core team.

This prevents linker errors as found in rust-lang#11591

Closes rust-lang#11591
bors added a commit that referenced this pull request Feb 22, 2014
This prevents linker errors as found in #11591

Closes #11591
@bors bors merged commit 351d0ff into rust-lang:master Feb 22, 2014
@alexcrichton alexcrichton deleted the issue-11591 branch February 23, 2014 07:11
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 6, 2023
Fix: avoid changing drop order

Fixes rust-lang/rust-clippy#11599

changelog: [`redundant_locals`] No longer lints which implements Drop trait to avoid reordering
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.

Private lang items should be exported symbols
4 participants