Commit Graph

49328 Commits

Author SHA1 Message Date
Michael McConville
b0a9b3d458 Use libc's Linux syscall()
There's no need for us to redeclare it in an extern block.
2015-12-23 22:46:45 -05:00
Michael McConville
d958cfc2de Simply two cfg attributes 2015-12-23 22:31:53 -05:00
Ulrik Sverdrup
1b438314a0 book: Some operator fixes for the syntax index
- Correct the names of the comparison traits (PartialOrd)
- Mention only the traits that overload the operator (PartialOrd,
  PartialEq), not operator-unrelated traits (Ord, Eq).
- Add `!=` operator.
2015-12-24 00:41:10 +01:00
Steve Klabnik
944b337c95 Rollup merge of #30543 - brson:doc, r=steveklabnik
The website will [shortly](https://github.com/rust-lang/rust-www/pull/241) provide the main documentation landing page as well as the [FAQ](https://github.com/rust-lang/rust-www/issues/202). All of the content here will be there.

This strips out everything and makes the index *just* an index into the in-tree content. My only real qualm with this is that this will become the content on doc.rust-lang.org (a sweet URL), while the main documentation page will be www.rust-lang.org/documentation.html.

r? @steveklabnik
2015-12-23 18:09:12 -05:00
Steve Klabnik
87a8f1fbf1 Rollup merge of #30541 - fbergr:doc, r=luqmana
Country-code top level domain names are tied to a specific country (for example .de for Germany).

r? @steveklabnik
2015-12-23 18:09:12 -05:00
Steve Klabnik
2aade14bd9 Rollup merge of #30539 - erickt:whitespace, r=sfackler 2015-12-23 18:09:12 -05:00
Steve Klabnik
1b68a357fd Rollup merge of #30537 - tshepang:make-visible, r=Gankro 2015-12-23 18:09:12 -05:00
Steve Klabnik
2651b4a564 Rollup merge of #30529 - alexcrichton:less-c-code, r=sanxiyn
The corresopnding C file was removed in #30175 and looks like I forgot to remove
the header as well.
2015-12-23 18:09:12 -05:00
Steve Klabnik
cc2731222b Rollup merge of #30473 - nwin:patch-2, r=steveklabnik
Clarify the difference between compiler-panic and libcore-panic.
2015-12-23 18:09:11 -05:00
Steve Klabnik
1dce223d50 Rollup merge of #30465 - androm3da:master, r=alexcrichton
The `dynamic_lib` library has been deprecated in favor of contents on crates.io, but apparently `libloading` is a more specific direction that fits the need.
2015-12-23 18:09:11 -05:00
Steve Klabnik
884021b79a Rollup merge of #30461 - lnmx:doc-typo, r=steveklabnik 2015-12-23 18:09:11 -05:00
Steve Klabnik
8759f1f4cf Rollup merge of #30251 - nodakai:patch-1, r=pnkfelix
On some weird setup where $SHELL is a relative path (can happen under GNU
Screen,) `file -L "$BIN_TO_PROBE"` fails and $CFG_CPUTYPE is wrongly set to
i686.  We should not only check its string value but also permission on
filesystem.
2015-12-23 18:09:11 -05:00
Brian Anderson
9e99a27907 Strip the documentation index down to the essentials.
The main documentation page is now www.rust-lang.org/documentation.html
2015-12-23 14:15:13 -08:00
Brian Anderson
6c65cc1f8f Remove links to out-of-tree docs 2015-12-23 14:04:43 -08:00
Brian Anderson
2f3c472d10 Remove the FAQs in favor of the website 2015-12-23 14:03:45 -08:00
fbergr
aa219d9412 doc: Change Google link to generic top level domain 2015-12-23 22:42:36 +02:00
Steven Fackler
f1148a540a Implement custom panic handlers 2015-12-23 11:19:20 -07:00
Erick Tryzelaar
835bc77169 Minor fix to whitespace in libsyntax 2015-12-23 11:51:03 -05:00
Tshepang Lekhonkhobe
97547e2868 doc: make line visible 2015-12-23 17:47:12 +02:00
bors
8037e62d29 Auto merge of #30525 - semarie:ncpu, r=alexcrichton
Should unbreak build (well, remove one reason to break) for *bsd target.

r? @alexcrichton
2015-12-23 15:19:54 +00:00
bors
4ce1dafd1d Auto merge of #30377 - Wafflespeanut:levenshtein, r=Manishearth
fixes part of #30197
2015-12-23 08:55:38 +00:00
bors
38201501df Auto merge of #30504 - mitaa:rdoc_root, r=alexcrichton
fixes #30327
2015-12-23 06:20:02 +00:00
Ulrik Sverdrup
52883ab843 BinaryHeap: Use full sift down in .pop()
.sift_down can either choose to compare the element on the way down (and
place it during descent), or to sift down an element fully, then sift
back up to place it.

A previous PR changed .sift_down() to the former behavior, which is much
faster for relatively small heaps and for elements that are cheap to
compare.

A benchmarking run suggested that BinaryHeap::pop() suffers
improportionally from this, and that it should use the second strategy
instead. It's logical since .pop() brings last element from the
heapified vector into index 0, it's very likely that this element will
end up at the bottom again.
2015-12-23 04:07:36 +01:00
bors
45e52dadb8 Auto merge of #30353 - alexcrichton:rpath-by-default, r=brson
This commit changes our distribution and in-tree sources to pass the `-C rpath`
flag by default during compiles. This means that from-source builds, including
our release channels, will have this option enabled as well. Motivated
by #29941, this change means that the compiler should be usable as-is on all
platforms just after extraction or installation. This experience is already true
on Windows but on Unixes you still need to set up LD_LIBRARY_PATH or the
equivalent, which can often be unfortunate.

This option was originally turned off by default for Linux distributions who
tend to take care of these sorts of details themselves, so it is expected that
all those builds of Rust will want to pass `--disable-rpath` to the configure
script to preserve that behavior.

Closes #29941
2015-12-23 00:42:19 +00:00
mitaa
05780ace49 Don't record the root module in the search index 2015-12-22 19:10:08 +01:00
Alex Crichton
65375fda59 std: Remove old android header file
The corresopnding C file was removed in #30175 and looks like I forgot to remove
the header as well.
2015-12-22 09:03:46 -08:00
Ms2ger
2359ab0dc9 Stop re-exporting PathParameters's variants. 2015-12-22 17:12:33 +01:00
Michael Woerister
4c4195f269 Fix def paths creation for items inlined from external crates.
Avoid duplicating the last element of the def path which led to paths like "std::slice::into_vec::into_vec".
2015-12-22 10:27:59 -05:00
defyrlt
45ecdc8375 Removed usage of drop from std::net::UdpSocket docs
Resolves #30507
2015-12-22 16:34:31 +02:00
Sébastien Marie
3beb4b1a6c variable CPUS_SIZE should have a snake case name such as cpus_size 2015-12-22 14:10:17 +01:00
Sébastien Marie
fb9c2c0230 explicit use libc to refer to HW_NCPU 2015-12-22 13:46:17 +01:00
bors
42c3ef8f9f Auto merge of #30417 - alexcrichton:better-detect-elf-tls, r=alexcrichton
Currently a compiler can be built with the `--disable-elf-tls` option for compatibility with OSX 10.6 which doesn't have ELF TLS. This is unfortunate, however, as a whole new compiler must be generated which can take some time. These commits add a new (feature gated) `cfg(target_thread_local)` annotation set by the compiler which indicates whether `#[thread_local]` is available for use. The compiler now interprets `MACOSX_DEPLOYMENT_TARGET` (a standard environment variable) to set this flag on OSX. With this we may want to start compiling our OSX nightlies with `MACOSX_DEPLOYMENT_TARGET` set to 10.6 which would allow the compiler out-of-the-box to generate 10.6-compatible binaries.

For now the compiler still by default targets OSX 10.7 by allowing ELF TLS by default (e.g. if `MACOSX_DEPLOYMENT_TARGET` isn't set).
2015-12-22 09:15:29 +00:00
Kai Noda
00e6667b98 configure: test $SHELL's permission
On some weird setup where $SHELL is a relative path (can happen under GNU
Screen,) `file -L "$BIN_TO_PROBE"` fails and $CFG_CPUTYPE is wrongly set to
i686.  We should not only check its string value but also permission on
filesystem.
2015-12-22 16:25:47 +08:00
bors
5178449f1c Auto merge of #30175 - alexcrichton:less-c-code, r=brson
All these definitions can now be written in Rust, so do so!
2015-12-22 07:23:16 +00:00
Alex Crichton
2f42ac438e std: Remove rust_builtin C support library
All these definitions can now be written in Rust, so do so!
2015-12-21 22:12:48 -08:00
Alex Crichton
cd74364e5d std: Use cfg(target_thread_local) in thread_local!
This transitions the standard library's `thread_local!` macro to use the
freshly-added and gated `#[cfg(target_thread_local)]` attribute. This greatly
simplifies the `#[cfg]` logic in play here, but requires that the standard
library expose both the OS and ELF TLS implementation modules as unstable
implementation details.

The implementation details were shuffled around a bit but end up generally
compiling to the same thing.

Closes #26581 (this supersedes the need for the option)
Closes #27057 (this also starts ignoring the option)
2015-12-21 22:05:37 -08:00
Alex Crichton
617a7af704 syntax: Respect allow_internal_unstable in macros
This change modifies the feature gating of special `#[cfg]` attributes to not
require a `#![feature]` directive in the crate-of-use if the source of the macro
was declared with `#[allow_internal_unstable]`. This enables the standard
library's macro for `thread_local!` to make use of the
`#[cfg(target_thread_local)]` attribute despite it being feature gated (e.g.
it's a hidden implementation detail).
2015-12-21 22:05:37 -08:00
Alex Crichton
b67b5a8d01 rustc: Add feature-gated cfg(target_thread_local)
Currently the standard library has some pretty complicated logic to detect
whether #[thread_local] should be used or whether it's supported. This is also
unfortunately not quite true for OSX where not all versions support
the #[thread_local] attribute (only 10.7+ does). Compiling code for OSX 10.6 is
typically requested via the MACOSX_DEPLOYMENT_TARGET environment variable (e.g.
the linker recognizes this), but the standard library unfortunately does not
respect this.

This commit updates the compiler to add a `target_thread_local` cfg annotation
if the platform being targeted supports the `#[thread_local]` attribute. This is
feature gated for now, and it is only true on non-aarch64 Linux and 10.7+ OSX
(e.g. what the module already does today). Logic has also been added to parse
the deployment target environment variable.
2015-12-21 22:05:37 -08:00
Sébastien Marie
89dc44056b add openbsd snapshot 2015-12-22 06:24:13 +01:00
bors
439e1843b9 Auto merge of #30516 - retep998:non-universal-crt, r=alexcrichton
Checks for a `10.` prefix on the subfolder because that is what vcvars does.

r? @alexcrichton
2015-12-22 02:07:30 +00:00
Peter Atashian
e77ab57aae Fix Universal CRT detection on weird setups
Checks for a `10.` prefix on the subfolder

Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-12-21 20:44:48 -05:00
bors
5d4efcb132 Auto merge of #30434 - alexcrichton:update-jemalloc, r=alexcrichton
It's been awhile since we last updated jemalloc, and there's likely some bugs
that have been fixed since the last version we're using, so let's try to update
again.
2015-12-21 23:31:06 +00:00
Alex Crichton
cb3826d9ad std: Ensure AssertRecoverSafe indeed is more often
Types like `&AssertRecoverSafe<T>` and `Rc<AssertRecoverSafe<T>>` were
mistakenly not considered recover safe, but the point of the assertion wrapper
is that it indeed is! This was caused by an interaction between the
`RecoverSafe` and `NoUnsafeCell` marker traits, and this is updated by adding an
impl of the `NoUnsafeCell` marker trait for `AssertRecoverSafe` to ensure that
it never interacts with the other negative impls of `RecoverSafe`.

cc #30510
2015-12-21 14:00:17 -08:00
bors
2343a92a90 Auto merge of #30352 - alexcrichton:new-snashots, r=nikomatsakis
Lots of cruft to remove!
2015-12-21 21:37:26 +00:00
Alex Crichton
9929c246f1 std: Update jemalloc version
It's been awhile since we last updated jemalloc, and there's likely some bugs
that have been fixed since the last version we're using, so let's try to update
again.
2015-12-21 13:34:48 -08:00
bors
709d00a231 Auto merge of #30460 - Ms2ger:BindingMode, r=alexcrichton 2015-12-21 19:10:51 +00:00
Alex Crichton
cd1848a1a6 Register new snapshots
Lots of cruft to remove!
2015-12-21 09:26:21 -08:00
bors
8cd034de9f Auto merge of #30512 - semarie:openbsd-libc, r=alexcrichton
- upgrades libc to version with `si_addr` support in openbsd
- declares libc use for getentropy
- remove now unused use

r? @alexcrichton
2015-12-21 15:52:41 +00:00
Sébastien Marie
f9a8861922 unbreak openbsd code
- upgrades libc to version with si_addr support in openbsd
- declares libc use for getentropy
2015-12-21 13:36:23 +01:00
bors
e2834a20e7 Auto merge of #30413 - pnkfelix:fsk-span_note, r=Manishearth
Add note when item accessed from module via `m.i` rather than `m::i`.

(I tried to make this somewhat future-proofed, in that the `UnresolvedNameContext` could be expanded in the future with other cases besides paths that are known to be modules.)

This supersedes PR #30356 ; since I'm responsible for a bunch of new code here, someone else should review it. :)
2015-12-21 07:49:05 +00:00