Commit Graph

49483 Commits

Author SHA1 Message Date
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
bors
da4a21e91a Auto merge of #30400 - fbergr:master, r=steveklabnik
See: https://github.com/rust-lang/rust/issues/30397

r? @steveklabnik
2015-12-21 06:02:13 +00:00
bors
29e60aba7d Auto merge of #30493 - semarie:openbsd-cc, r=alexcrichton
this PR reverts previous ones, that tried to make `cc` to found `estdc++` in `/usr/local/lib`. It causes more trouble than it resolvs things: rustc become unbuildable if another version already exists in `/usr/local` (for example, `libstd-xxxx.so` is found in `/usr/local/lib` and in builddir).

so this PR tries another way to achieve build, but using the good linker for building. By default, rustc use `cc` for linking. But under OpenBSD, `cc` is gcc 4.2.1 from base, whereas we build with gcc 4.9 from ports. By linking using the compiler found at compile-time, we ensure that the compiler will found his own stdc++ library without trouble.

r? @alexcrichton
2015-12-21 04:15:28 +00:00
Luke Jones
1522350ecc Revert to colon. The text is introducing a list. 2015-12-21 16:24:17 +13:00
Luke Jones
1bb131cdca Update patterns.md 2015-12-21 16:20:56 +13:00
Luke Jones
fc4bb5f770 Correct line wrap 2015-12-21 16:20:20 +13:00
bors
c6079d0586 Auto merge of #30486 - nagisa:mir-fix-geps, r=luqmana
Fixes https://github.com/rust-lang/rust/issues/30474
2015-12-21 02:26:10 +00:00
bors
2b8e96dad2 Auto merge of #30482 - luqmana:const-fat-ptr, r=dotdash
Fixes #30479.
2015-12-21 00:39:24 +00:00
bors
3d150397a2 Auto merge of #30470 - petrochenkov:owned5, r=nrc
cc https://github.com/rust-lang/rust/pull/30095

r? @nrc
2015-12-20 22:50:34 +00:00
Ms2ger
143b9d80d0 Stop re-exporting the ast::BindingMode variants. 2015-12-20 22:15:26 +01:00
bors
19c997ea5e Auto merge of #30469 - nagisa:mir-gv-prettify, r=luqmana
One will look at graphviz often when working with MIR, so may as well make the tables a bit more
pretty :)

![This is what it looks like now](https://cloud.githubusercontent.com/assets/679122/11908983/438f228e-a5ea-11e5-90bd-a2c2ec52412e.png)
2015-12-20 21:03:48 +00:00
Luke Jones
981ac6d332 Rewrite paragraph in 'match' to be more concise and readable. Start
correcting use of ':' in sentences.
The colon `:` should be used only when the sentence preceeding it is a
complete sentence. If this is not the case, then a `;` should be used;
this denotes that the following fragment is a part of the previous
fragment.
2015-12-21 09:53:07 +13:00
ebadf
a8df425dd5 Corrected deprecation reference to appropriate crate 2015-12-20 14:37:53 -06:00
bors
33914f2713 Auto merge of #30468 - Eljay:fix-doc-link, r=alexcrichton 2015-12-20 16:34:09 +00:00
bors
d3aec9fd20 Auto merge of #30454 - mmcco:size_t, r=alexcrichton
It returns sizeof(dirent_t), so I'm not sure why its return type is int.
It's only used once, and that usage immediately casts it to usize.
2015-12-20 07:19:07 +00:00
Sébastien Marie
b74359a0a0 openbsd: use specific linker for building
By default, rustc use `cc` as linker. Under OpenBSD, `cc` is gcc version 4.2.1.
So use the compiler found at configure-time for linking: it will be gcc 4.9.

It permits to resolv problem of finding -lestdc++ or -lgcc. For base gcc (4.2), there are in not standard path, whereas for ports gcc (4.9) there are in standard path.
2015-12-20 07:21:36 +01:00
Sébastien Marie
e6418964b9 remove specific code for OpenBSD that define STDCPP_LIBDIR_RUSTFLAGS
it isn't the good way to process, as it makes conflicts when building rustc while another version of rustc in installed system-wide.
2015-12-20 07:21:36 +01:00
bors
b9fd0ca16d Auto merge of #30455 - mmcco:beautify-isaac, r=alexcrichton
Call me verbose, but the existing logic was hideously formatted. The
result still fits in a small terminal. No functional change.
2015-12-20 05:28:26 +00:00
bors
f23157b693 Auto merge of #30436 - durka:patch-14, r=alexcrichton
Relevant to #30422.
2015-12-20 02:15:06 +00:00
bors
abf60b20aa Auto merge of #30430 - mmcco:master, r=alexcrichton
Rust already supports Linux's getrandom(2), which is very similar and
was based on getentropy(2). This is a pretty clean, simple addition that
uses the same approach as the iOS randomness API support.
2015-12-19 23:21:12 +00:00
bors
cef0d0f9a8 Auto merge of #30401 - DiamondLovesYou:pnacl-target, r=alexcrichton
r? @alexcrichton
2015-12-19 21:29:04 +00:00
bors
712eccee29 Auto merge of #30394 - geofft:dt-runpath, r=alexcrichton
This causes the linker to emit DT_RUNPATH instead of DT_RPATH, which fixes #30378. See that bug for rationale.
2015-12-19 19:39:25 +00:00
Simonas Kazlauskas
2b2f983523 Fix GEPs for MIR indexing translation
Fixes #30474
2015-12-19 20:30:13 +02:00
Luqman Aden
0f860c2977 [MIR] Handle FatPtr in mir::constant::trans_constval. 2015-12-19 09:58:11 -05:00
bors
d8cc67fb26 Auto merge of #30435 - Ms2ger:ParseResult, r=alexcrichton 2015-12-19 14:07:08 +00:00
nwin
aacdfb8a2a Update no-stdlib.md
Clarify the difference between compiler-panic and libcore-panic.
2015-12-19 09:19:05 +01:00
bors
fec739bee2 Auto merge of #30408 - durka:issue-26873, r=alexcrichton
I think we can close #26873 with these tests.
2015-12-19 08:08:53 +00:00
Richard Diamond
0442be8e1c Add PNaCl target info to the makefile target cfgs and initialize the PNaCl target
machine if available.
2015-12-19 00:26:53 -06:00
bors
67a2d1f34f Auto merge of #30403 - webmobster:master, r=alexcrichton
I didn't see any reason that debug couldn't be added to this object, since every field derives debug.
2015-12-19 06:21:10 +00:00
Michael McConville
9fde3e9b94 Use libc's syscall() and NR_GETENTROPY const 2015-12-18 22:40:07 -05:00
Michael McConville
314062b701 Pull newer version of libc for NR_GETENTROPY 2015-12-18 22:37:54 -05:00
Michael McConville
e8d2706cba Merge branch 'master' of https://github.com/rust-lang/rust 2015-12-18 22:37:00 -05:00
bors
440ef8b154 Auto merge of #30184 - petrochenkov:ascr, r=nikomatsakis
This PR is a rebase of the original PR by @eddyb https://github.com/rust-lang/rust/pull/21836 with some unrebasable parts manually reapplied, feature gate added + type equality restriction added as described below.

This implementation is partial because the type equality restriction is applied to all type ascription expressions and not only those in lvalue contexts. Thus, all difficulties with detection of these contexts and translation of coercions having effect in runtime are avoided.
So, you can't write things with coercions like `let slice = &[1, 2, 3]: &[u8];`. It obviously makes type ascription less useful than it should be, but it's still much more useful than not having type ascription at all.
In particular, things like `let v = something.iter().collect(): Vec<_>;` and `let u = t.into(): U;` work as expected and I'm pretty happy with these improvements alone.

Part of https://github.com/rust-lang/rust/issues/23416
2015-12-19 02:45:15 +00:00
Vadim Petrochenkov
e3da2a9003 Improve OwnedSlice and use it in HIR 2015-12-19 04:20:11 +03:00
bors
8ad12c3e25 Auto merge of #30381 - fhahn:memchr-in-std, r=alexcrichton
This PR adds `memchr`and `memrchr` based on @BurntSushi 's rust-memchr crate to libstd (as discussed in #30151).

I've update some places in libstd to use memchr/memrchr, but I am not sure if there are other places where it could be used as well.

ref #30076
2015-12-19 00:57:25 +00:00
Sebastian Hahn
5b3bdafb96 Have to use Weak instead of Arc in Weak::new() example 2015-12-19 01:49:36 +01:00
Sebastian Hahn
7dd618fd23 Address review comments 2015-12-19 01:31:21 +01:00
Michael McConville
33113f86f4 Fix build by removing needless type prefix 2015-12-18 19:26:11 -05:00
Michael McConville
5b282981d3 Simplify logic checking getentropy's return value 2015-12-18 19:26:11 -05:00
Michael McConville
3ee3a784bf Use a const for getentropy(2)'s syscall number
Reported by Sebastien Marie.
2015-12-18 19:26:10 -05:00
Michael McConville
a51b70b816 Use the correct syscall name in panic message
I copied it from the getrandom code but forgot to change the name.
Reported by Sebastien Marie.
2015-12-18 19:26:10 -05:00
Michael McConville
f4d409d6ed Use the getentropy(2) syscall on OpenBSD
Rust already supports Linux's getrandom(2), which is very similar and
was based on getentropy(2). This is a pretty clean, simple addition that
uses the same approach as the iOS randomness API support.
2015-12-18 19:26:09 -05:00
Simonas Kazlauskas
03903cbc20 Prettify MIR graphviz output
One will look at graphviz often when working with MIR, so may as well make the tables a bit more
pretty :)
2015-12-19 01:25:10 +02:00
Sebastian Hahn
9697076b62 Implement arc::Weak::new() 2015-12-19 00:23:07 +01:00
Sebastian Hahn
4741ad38b5 Rename Weak::new_downgraded to Weak::new 2015-12-19 00:23:07 +01:00
Sebastian Hahn
0e043862bf use core::mem::unintialized instead of uninit intrinsic 2015-12-19 00:23:07 +01:00
Sebastian Hahn
8bed2acf92 Fix doctest failure 2015-12-19 00:23:07 +01:00
bors
9e278950c2 Auto merge of #30364 - luqmana:mir-calls, r=nikomatsakis 2015-12-18 23:06:24 +00:00