Skip to content

remove NoSendItem and NoSyncItem lang items #21394

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
Jan 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2377,10 +2377,6 @@ These types help drive the compiler's analysis
: ___Needs filling in___
* `no_copy_bound`
: This type does not implement "copy", even if eligible.
* `no_send_bound`
: This type does not implement "send", even if eligible.
* `no_sync_bound`
: This type does not implement "sync", even if eligible.
* `eh_personality`
: ___Needs filling in___
* `exchange_free`
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/unsafe.md
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ Other features provided by lang items include:
various kinds; lang items `send`, `sync` and `copy`.
- the marker types and variance indicators found in
`std::marker`; lang items `covariant_type`,
`contravariant_lifetime`, `no_sync_bound`, etc.
`contravariant_lifetime`, etc.

Lang items are loaded lazily by the compiler; e.g. if one never uses
`Box` then there is no need to define functions for `exchange_malloc`
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/middle/lang_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,7 @@ lets_do_this! {
ContravariantLifetimeItem, "contravariant_lifetime", contravariant_lifetime;
InvariantLifetimeItem, "invariant_lifetime", invariant_lifetime;

NoSendItem, "no_send_bound", no_send_bound;
NoCopyItem, "no_copy_bound", no_copy_bound;
NoSyncItem, "no_sync_bound", no_sync_bound;
ManagedItem, "managed_bound", managed_bound;

NonZeroItem, "non_zero", non_zero;
Expand Down
6 changes: 1 addition & 5 deletions src/librustc/middle/traits/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1554,10 +1554,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
let tcx = this.tcx();
match bound {
ty::BoundSend => {
if
Some(def_id) == tcx.lang_items.no_send_bound() ||
Some(def_id) == tcx.lang_items.managed_bound()
{
if Some(def_id) == tcx.lang_items.managed_bound() {
return Err(Unimplemented)
}
}
Expand All @@ -1568,7 +1565,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {

ty::BoundSync => {
if
Some(def_id) == tcx.lang_items.no_sync_bound() ||
Some(def_id) == tcx.lang_items.managed_bound() ||
Some(def_id) == tcx.lang_items.unsafe_type()
{
Expand Down