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

Rolling up PRs in the queue #23796

Merged
merged 105 commits into from
Mar 28, 2015
Merged

Rolling up PRs in the queue #23796

merged 105 commits into from
Mar 28, 2015

Conversation

alexcrichton
Copy link
Member

No description provided.

steveklabnik and others added 30 commits March 16, 2015 17:55
Also tweaked a few things.
This allows quasiquoting to insert where clauses.
This commit provides a safe, but unstable interface for the `try` functionality
of running a closure and determining whether it panicked or not.

There are two primary reasons that this function was previously marked `unsafe`:

1. A vanilla version of this function exposes the problem of exception safety by
   allowing a bare try/catch in the language. It is not clear whether this
   concern should be directly tied to `unsafe` in Rust at the API level. At this
   time, however, the bounds on `ffi::try` require the closure to be both
   `'static` and `Send` (mirroring those of `thread::spawn`). It may be possible
   to relax the bounds in the future, but for now it's the level of safety that
   we're willing to commit to.

2. Panicking while panicking will leak resources by not running destructors.
   Because panicking is still controlled by the standard library, safeguards
   remain in place to prevent this from happening.

The new API is now called `catch_panic` and is marked as `#[unstable]` for now.
This commit removes all parsing, resolve, and compiler support for the old and
long-deprecated int/uint types.
Refactored code so that the drop-flag values for initialized
(`DTOR_NEEDED`) versus dropped (`DTOR_DONE`) are given explicit names.

Add `mem::dropped()` (which with `DTOR_DONE == 0` is semantically the
same as `mem::zeroed`, but the point is that it abstracts away from
the particular choice of value for `DTOR_DONE`).

Filling-drop needs to use something other than `ptr::read_and_zero`,
so I added such a function: `ptr::read_and_drop`.  But, libraries
should not use it if they can otherwise avoid it.

Fixes to tests to accommodate filling-drop.
…ile-fail tests.

(I.e. the idea being, lets catch errors in these basic constructs
sometime *before* we start doing the doc tests.)
(Reviewed rest of code; did not see other `pub` items that needed such
treatment.)

Driveby: fix typo in comment in ptr.rs.
(That is, added config and debugflag a la check-overflow but for drop
flag sanity-check.)

Remove now-unused import of NoDebugInfo from trans::glue.
This is technically a breaking change as it deprecates and unstables
some previously stable apis that were missed in the last round of
deprecations.

[breaking change]
Now that feature flags are only on nightly, it's good to split this stuff out.
This syntax has been deprecated for quite some time, and there were only a few
remaining uses of it in the codebase anyway.
This PR allows the quote macros to unquote trait items, impl items, where clauses, and paths.
Now that support has been removed, all lingering use cases are renamed.
This commit removes compiler support for the `old_impl_check` attribute which
should in theory be entirely removed now. The last remaining use of it in the
standard library has been updated by moving the type parameter on the
`old_io::Acceptor` trait into an associated type. As a result, this is a
breaking change for all current users of the deprecated `old_io::Acceptor`
trait. Code can be migrated by using the `Connection` associated type instead.

[breaking-change]
@alexcrichton
Copy link
Member Author

@bors: r+ 88fecec

@bors
Copy link
Contributor

bors commented Mar 27, 2015

⌛ Testing commit 88fecec with merge 19bc253...

@bors
Copy link
Contributor

bors commented Mar 27, 2015

💔 Test failed - auto-mac-64-opt

Conflicts:
	src/test/run-pass/issue-13027.rs
Conflicts:
	src/test/auxiliary/static-function-pointer-aux.rs
	src/test/auxiliary/trait_default_method_xc_aux.rs
	src/test/run-pass/issue-4545.rs
@alexcrichton
Copy link
Member Author

@bors: r+ d3a4f36 force

@bors
Copy link
Contributor

bors commented Mar 27, 2015

⌛ Testing commit d3a4f36 with merge 5520801...

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.