Skip to content

Rollup of 6 pull requests #23697

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 191 commits into from
Mar 25, 2015
Merged

Rollup of 6 pull requests #23697

merged 191 commits into from
Mar 25, 2015

Conversation

alexcrichton and others added 30 commits March 14, 2015 23:40
Recent changes in path semantics meant that if none of the components in a
relative path existed as a part of a call to `create_dir_all` then the call
would fail as `create_dir("")` would be attempted and would fail with an OS
error.
This trait has proven quite useful when defining marker traits to avoid the
semi-confusing `PhantomFn` trait and it looks like it will continue to be a
useful tool for defining these traits.
* no_split_stack was renamed to no_stack_check
* deriving was renamed to derive
* `use foo::mod` was renamed to `use foo::self`;
* legacy lifetime definitions in closures have been replaced with `for` syntax
* `fn foo() -> &A + B` has been deprecated for some time (needs parens)
* Obsolete `for Sized?` syntax
* Obsolete `Sized? Foo` syntax
* Obsolete `|T| -> U` syntax
This commit marks as `#[stable]` the `Entry` types for the maps provided
by `std`. The main reason these had been left unstable previously was
uncertainty about an eventual trait design, but several plausible
designs have been proposed that all work fine with the current type definitions.
… options.

This is probably more broadly applicable than these two platforms
(since it's part of the bsd4.4 standard) but that's outside my problem domain today.
If this goes well, I may submit Linux/64 support in a separate PR.

Reviewers should take a look at http://www.opensource.apple.com/source/xnu/xnu-792.17.14/bsd/sys/socket.h?txt
which defines constants for OSX.  iOS uses the same header.

I release this patch under the MIT license.
The method with which backwards compatibility was retained ended up leading to
documentation that rustdoc didn't handle well and largely ended up confusing.
There have been some recent panics on the bots and this commit is an attempt to
appease them. Previously it was considered invalid to run `rt::at_exit` after
the handlers had already started running. Due to the multithreaded nature of
applications, however, it is not always possible to guarantee this. For example
[this program][ex] will show off the abort.

[ex]: https://gist.github.com/alexcrichton/56300b87af6fa554e52d

The semantics of the `rt::at_exit` function have been modified as such:

* It is now legal to call `rt::at_exit` at any time. The return value now
  indicates whether the closure was successfully registered or not. Callers must
  now decide what to do with this information.
* The `rt::at_exit` handlers will now be run for a fixed number of iterations.
  Common cases (such as the example shown) may end up registering a new handler
  while others are running perhaps once or twice, so this common condition is
  covered by re-running the handlers a fixed number of times, after which new
  registrations are forbidden.

Some usage of `rt::at_exit` was updated to handle these new semantics, but
deprecated or unstable libraries calling `rt::at_exit` were not updated.
For the rust-call ABI, the last function argument is a tuple that gets
untupled for the actual call. For bare functions using this ABI, the
code has access to the tuple, so we need to tuple the arguments again.
But closures can't actually access the tuple. Their arguments map to the
elements in the tuple. So what we currently do is to tuple the arguments
and then immediately untuple them again, which is pretty useless and we
can just omit it.
This fixes a build error when using thread_local!() in a deny(unsafe_code)
scope in Servo for Android.
bors and others added 11 commits March 24, 2015 22:44
The compiler will now issue a warning for crates that have syntax of the form
`extern crate "foo" as bar`, but it will still continue to accept this syntax.
Additionally, the string `foo-bar` will match the crate name `foo_bar` to assist
in the transition period as well.

This patch will land hopefully in tandem with a Cargo patch that will start
translating all crate names to have underscores instead of hyphens.

cc rust-lang#23533
Disable overflow checking on SIMD operations, fix rust-lang#23037
`PathBuf::new` have been changed. Use `PathBuf::from` instead.

Apply the same change for freebsd too, while here.
Makes Vec::push considerably smaller: 25 instructions, rather than 42, on
x86_64.
Main motivation was to update docs for the removal or "demotion" of certain extension traits. The update to the slice docs was larger, since the text was largely outdated.
@rust-highfive
Copy link
Contributor

r? @alexcrichton

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

@Manishearth
Copy link
Member Author

@bors: r+ p=10

@bors
Copy link
Collaborator

bors commented Mar 25, 2015

📌 Commit 27a6efe has been approved by Manishearth

@bors
Copy link
Collaborator

bors commented Mar 25, 2015

⌛ Testing commit 27a6efe with merge e990c7a...

@bors
Copy link
Collaborator

bors commented Mar 25, 2015

💔 Test failed - auto-mac-32-opt

@Manishearth
Copy link
Member Author

@bors: r+ force

@bors
Copy link
Collaborator

bors commented Mar 25, 2015

📌 Commit e962a1d has been approved by Manishearth

@bors
Copy link
Collaborator

bors commented Mar 25, 2015

⌛ Testing commit e962a1d with merge a923278...

bors added a commit that referenced this pull request Mar 25, 2015
…matsakis

`PathBuf::new` have been changed. Use `PathBuf::from` instead.

Apply the same change for freebsd too, while here.
 The reassignment checker effectively only checks whether the last
assignment in a body affects the discriminant, but it should of course
check all the assignments.

Fixes rust-lang#23698
@bors bors merged commit e962a1d into rust-lang:master Mar 25, 2015
@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.