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

Rollup of 13 pull requests #23884

Merged
merged 209 commits into from
Mar 31, 2015
Merged

Rollup of 13 pull requests #23884

merged 209 commits into from
Mar 31, 2015

Conversation

Jakub Bukaj and others added 30 commits March 13, 2015 09:31
curl's progress meter would otherwise interfere with sudo's password prompt.

In addition, add the -f flag to make sure 4xx status codes are treated as errors.
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]
seanmonstar and others added 19 commits March 30, 2015 12:07
This functions swaps the order of arguments to a few functions that previously
took (output, input) parameters, but now take (input, output) parameters (in
that order).

The affected functions are:

* ptr::copy
* ptr::copy_nonoverlapping
* slice::bytes::copy_memory
* intrinsics::copy
* intrinsics::copy_nonoverlapping

Closes rust-lang#22890
[breaking-change]
Due to a long-standing conservative approach to trait exports, all traits are
considered exported. However, the missing_docs lint uses the export map to
determine if something is public and ought to have documentation. This commit
modifies the lint to check if traits are private before emitting the warning.

Closes rust-lang#11592
Forward output from stderr when a test executable panics/fails.
To not use `old_io` and `os`, which are deprecated. Since there is no more `MemoryMap` used byte parsing instead to generate the second potential error.

You can see the code working fine [here](http://is.gd/4g0wwp) on the PlayPen.
The documentation says that 'The current convention is to use the `test` module
to hold your "unit-style"' but then defines the module as "tests" instead.

Also in the output of the command we can see:
```
test test::it_works ... ok
```
So I think the name of the module was meant to be "test"
…lexcrichton

Currently if a rustdoc test panics then the fatal error message is not forwarded to the user. This change will have the test runner prefer forwarding anything on the stderr of the test process.
Due to a long-standing conservative approach to trait exports, all traits are
considered exported. However, the missing_docs lint uses the export map to
determine if something is public and ought to have documentation. This commit
modifies the lint to check if traits are private before emitting the warning.

Closes rust-lang#11592
…akis

Disallow writing through mutable pointers stored in non-mut Box.

Fix rust-lang#14270 

The fix works by making `cmt::freely_aliasable` result more fine-grained.

Instead of encoding the aliasability (i.e. whether the cmt is uniquely writable or not) as an option, now pass back an enum indicating either: 1. freely-aliasable (thus not uniquely-writable), 2. non-aliasable (thus uniquely writable), or 3. unique but immutable (and thus not uniquely writable, according to proposal from issue rust-lang#14270.)

This is all of course a giant hack that will hopefully go away with an eventually removal of special treatment of `Box<T>` (aka `ty_unique`) from the compiler.
Based on the comment from @apasel422  in rust-lang#23791 (comment).
Where @apasel422 proposed
```
Moves the value out of the option if it is `Some`, or panics if it is `None`.
```
I include in this PR the version
```
Moves the value `v` out of the `Option` if it is `Some(v)`, or panics if it is `None`.
```
which 
- is a little bit more precise about what value is actually returned
- uses `Option` over just "option" in the part `out of the [Option]

r? @steveklabnik, @apasel422
…aturon

This functions swaps the order of arguments to a few functions that previously
took (output, input) parameters, but now take (input, output) parameters (in
that order).

The affected functions are:

* ptr::copy
* ptr::copy_nonoverlapping
* slice::bytes::copy_memory
* intrinsics::copy
* intrinsics::copy_nonoverlapping

Closes rust-lang#22890
[breaking-change]
…ern-example, r=alexcrichton

This makes some use of `x` and `y`, instead of setting them to the same value.
@Manishearth
Copy link
Member Author

@bors: r+ p=10

@bors
Copy link
Contributor

bors commented Mar 31, 2015

📌 Commit db76327 has been approved by Manishearth

@rust-highfive
Copy link
Collaborator

r? @Aatch

(rust_highfive has picked a reviewer for you, use r? to override)

@bors
Copy link
Contributor

bors commented Mar 31, 2015

⌛ Testing commit db76327 with merge b3317d6...

bors added a commit that referenced this pull request Mar 31, 2015
@bors bors merged commit db76327 into rust-lang:master Mar 31, 2015
@Manishearth Manishearth deleted the rollup branch March 31, 2015 08:44
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.