Commit Graph

45176 Commits

Author SHA1 Message Date
Alex Crichton
0d8340327c syntax: Don't assume std exists for tests
This commit removes the injection of `std::env::args()` from `--test` expanded
code, relying on the test runner itself to call this funciton. This is more
hygienic because we can't assume that `std` exists at the top layer all the
time, and it meaks the injected test module entirely self contained.
2015-08-04 14:02:36 -07:00
Alex Crichton
5cccf3cd25 syntax: Implement #![no_core]
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of
the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The
`#![no_std]` attribute now injects `extern crate core` at the top of the crate
as well as the libcore prelude into all modules (in the same manner as the
standard library's prelude). The `#![no_core]` attribute disables both std and
core injection.

[rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-08-03 17:23:01 -07:00
bors
ceded6adb3 Auto merge of #27210 - vadimcn:win64-eh-pers, r=alexcrichton
After this change, the only remaining symbol we are pulling from libgcc on Win64 is `__chkstk_ms` - the stack probing routine.
2015-08-03 22:12:46 +00:00
bors
d877e65404 Auto merge of #27134 - fhartwig:derive, r=huonw
Fixes #25022

This adapts the deriving mechanism to not repeat bounds for the same type parameter. To give an example: for the following code:

```rust
#[derive(Clone)]
pub struct FlatMap<I, U: IntoIterator, F> {
    iter: I,
    f: F,
    frontiter: Option<U::IntoIter>,
    backiter: Option<U::IntoIter>,
}
```
the latest nightly generates the following impl signature:

```rust
impl <I: ::std::clone::Clone,
      U: ::std::clone::Clone + IntoIterator,
      F: ::std::clone::Clone>
::std::clone::Clone for FlatMap<I, U, F> where
    I: ::std::clone::Clone,
    F: ::std::clone::Clone,
    U::IntoIter: ::std::clone::Clone,
    U::IntoIter: ::std::clone::Clone
```

With these changes, the signature changes to this:
```rust
impl <I, U: IntoIterator, F> ::std::clone::Clone for FlatMap<I, U, F> where
    I: ::std::clone::Clone,
    F: ::std::clone::Clone,
    U::IntoIter: ::std::clone::Clone
```
(Nothing in the body of the impl changes)
Note that the second impl is more permissive, as it doesn't have a `Clone` bound on `U` at all. There was a compile-fail test that failed due to this. I don't understand why we would want the old behaviour (and nobody on IRC could tell me either), so please tell me if there is a good reason that I missed.
2015-08-03 20:29:21 +00:00
bors
1fe32ca12c Auto merge of #27495 - tshepang:patch-6, r=Gankro 2015-08-03 16:51:28 +00:00
bors
76ba3f0dd9 Auto merge of #27488 - Gankro:uninit-docs, r=bluss
Inspired by https://github.com/rust-lang/rust/issues/27484
2015-08-03 14:16:52 +00:00
Tshepang Lekhonkhobe
8d331ba8c3 reference: follow idiom in this tiny snippet 2015-08-03 16:07:36 +02:00
Alexis Beingessner
5e6973ddc5 vastly expand on the mem::uninitialized docs 2015-08-03 06:55:14 -07:00
Vadim Chugunov
96d1db2b1a Fix compile errors for ARM. 2015-08-02 21:15:01 -07:00
bors
ea5cc76aac Auto merge of #27475 - AgostonSzepessy:master, r=alexcrichton 2015-08-03 01:03:50 +00:00
bors
2a309b7f55 Auto merge of #27476 - Manishearth:rollup, r=Manishearth
- Successful merges: #27464, #27473
- Failed merges:
2015-08-02 21:04:21 +00:00
Manish Goregaokar
d33cca9b9d Rollup merge of #27473 - brson:stddocs, r=Gankro
This removes some of the more casual language.

The only outright goofiness I couldn't bear to remove is "these modules are the bedrock upon which all of Rust is forged, and they have mighty names like `std::slice` and `std::cmp`", which I believe the greatest sentence I have ever created.
2015-08-03 02:33:53 +05:30
Manish Goregaokar
0860b29b6a Rollup merge of #27464 - killercup:patch-16, r=Gankro
Because Markdown.
2015-08-03 02:33:52 +05:30
Agoston Szepessy
74787b98ba Added error explanation for E0384. 2015-08-02 15:30:06 -04:00
bors
504eaa5929 Auto merge of #27305 - KieranHunt:master, r=steveklabnik
I found that the book had little information for `loop`s and `loop` label so I've added some.
2015-08-02 19:08:21 +00:00
Brian Anderson
ffa21217d2 std: Tighten up crate docs 2015-08-02 11:09:37 -07:00
bors
30ba0ee3bc Auto merge of #27469 - SimonSapin:patch-6, r=Gankro 2015-08-02 16:03:46 +00:00
Simon Sapin
7b2dd1fb28 Docs: clarify return value of std::io::Seek::seek 2015-08-02 14:15:00 +02:00
Pascal Hertleif
6e61783dce TRPL: Add Newline Before Headline
Because Markdown.
2015-08-02 12:32:14 +02:00
Vadim Chugunov
e493027984 When a nounwind function has a personality routine, LLVM messes up .seh directives (happens to rust_try in optimized builds). A workaround is to give rust_try the uwtable attribute.
Also, make sure that the dummy "load from null" instruction inserted by init_function() gets cleaned up.
2015-08-01 22:00:46 -07:00
bors
f7b3cd3337 Auto merge of #27205 - Gankro:travis-extreme, r=alexcrichton
Only `make -j4` takes ~50 mins
`make check` bumps it up to ~1hr 30min

Travis seems more than happy to let this happen. 

Time limits appear to be meaningless.

Similar to the previous PR, it's easy to tell how much your PR definitely builds by checking the current logs or just considering how long it's been building for.
2015-08-02 02:42:24 +00:00
bors
83b9deaf24 Auto merge of #27459 - da-kid:master, r=steveklabnik
Sorry :/
2015-08-01 22:23:22 +00:00
Kieran Hunt
a989ed8880 Adding an ignore annotation to an infinite loop so that it wont hang the tester. 2015-08-01 22:02:00 +02:00
Daniel Albert
3dfab40bbc Fix off-by-one error 2015-08-01 20:53:19 +02:00
bors
832e5a02cd Auto merge of #27453 - Manishearth:rollup, r=Manishearth
- Successful merges: #26982, #27305, #27419, #27423, #27426
- Failed merges:
2015-08-01 08:36:59 +00:00
Manish Goregaokar
ead9a6dacf Rollup merge of #27426 - FuGangqiang:master, r=alexcrichton 2015-08-01 14:05:52 +05:30
Manish Goregaokar
548d552c7e Rollup merge of #27423 - oli-obk:patch-1, r=Gankro 2015-08-01 14:05:52 +05:30
Manish Goregaokar
ae9abdf705 Rollup merge of #27419 - cpjreynolds:master, r=Gankro
Corrects formatting of bullet-ed sentences and changes 'pervasive use raw pointers' to 'pervasive use of raw pointers'.
2015-08-01 14:05:52 +05:30
Manish Goregaokar
21dd5e62a2 Rollup merge of #26982 - nham:orphan-explanations, r=Gankro
part of #24407 

I'm not sure whether I should be trying to explain the general rule in the E0210 explanation or just point people to the RFC. However, if we go with the latter option I think that the RFC will need to be revised slightly, since it is not quite as gentle as I would like.

Also, the link to RFC 1023 is not the correct one (it should be https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md), but the correct one is too long. I'm aware of @michaelsproul's PR https://github.com/rust-lang/rust/pull/26290 from awhile back, but it doesn't seem to be working. Has there not been a new snapshot yet?
2015-08-01 12:31:23 +05:30
bors
f50518e05a Auto merge of #27447 - eefriedman:parser-cleanup, r=alexcrichton 2015-08-01 04:49:02 +00:00
bors
6beaedaa5f Auto merge of #27441 - dhuseby:adding_freebsd32_snap, r=brson
@alexcrichton please upload the FreeBSD 32-bit snapshot file when landing this patch:
https://github.com/dhuseby/rust-manual-snapshots/raw/master/rust-stage0-2015-07-26-a5c12f4-freebsd-i386-2fee22adec101e2f952a5548fd1437ce1bd8d26f.tar.bz2
2015-08-01 03:14:38 +00:00
bors
111fa82f35 Auto merge of #27440 - dhuseby:fixing_freebsd_unused_import, r=alexcrichton
@alexcrichton fixes the build bot failures due to unused imports being treated as errors.
2015-08-01 01:25:31 +00:00
bors
8ce69e856a Auto merge of #27437 - retep998:win10-sdk, r=alexcrichton
r? @alexcrichton
2015-07-31 23:51:25 +00:00
bors
a8b7146f70 Auto merge of #27432 - sanxiyn:impl-dotdot, r=sfackler
Fix #27255.
2015-07-31 22:17:12 +00:00
bors
8c634cef95 Auto merge of #27424 - jashank:patch-1, r=alexcrichton
#27360 removed a padding field full of uint8_t's, but didn't remove
the use.  This didn't get picked up presumably because (a) bors
doesn't have any BSD builders, and/or (b) #[cfg]'d out blocks don't
get linted.

```
rustc: x86_64-unknown-freebsd/stage1/lib/rustlib/x86_64-unknown-freebsd/lib/liblibc
src/liblibc/lib.rs:1099:42: 1099:49 error: unused import, #[deny(unused_imports)] on by default
src/liblibc/lib.rs:1099                 use types::common::c99::{uint8_t, uint32_t, int32_t};
                                                                 ^~~~~~~
error: aborting due to previous error
fatal runtime error: Could not unwind stack, error = 159555904
```
2015-07-31 19:33:02 +00:00
Dave Huseby
6109d0567d adds FreeBSD i686 snapshot 2015-07-31 11:58:38 -07:00
Peter Atashian
6a8aec3561 Add Win10 SDK lib subfolder name
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-07-31 14:40:05 -04:00
bors
89bc9fa8be Auto merge of #27418 - taliesinb:tarpl-typo, r=alexcrichton
this makes the second code block consistent with the first code block -- other than being in reversed order, the first code block claims b is u16 and c is u32, whereas the second code block claims the opposite. seems to be an obvious typo.
2015-07-31 17:55:22 +00:00
Dave Huseby
ea12c02ee2 fixes unused import compile failure 2015-07-31 09:19:02 -07:00
bors
0919f4ad86 Auto merge of #27414 - Gankro:tarpl-fixes, r=alexcrichton
This is *mostly* reducing *my* use of *italics* but there's some other misc changes interspersed as I went along.

This updates the italicizing alphabetically from `a` to `ra`.

r? @steveklabnik
2015-07-31 15:28:54 +00:00
Alexis Beingessner
554efc0134 last of the emphasis cleanup 2015-07-31 07:11:35 -07:00
bors
7597262767 Auto merge of #27431 - GuillaumeGomez:patch-3, r=Manishearth 2015-07-31 12:52:41 +00:00
Seo Sanghyeon
b5139c5c58 Fix impl A .. {} 2015-07-31 21:24:55 +09:00
Guillaume Gomez
3254ae6a52 Replace "impls" by "implementations" 2015-07-31 12:55:53 +02:00
FuGangqiang
b399729298 trpl: fix link error 2015-07-31 16:25:17 +08:00
Jashank Jeremy
44e2d3b4fe Fix #27360's unused import
#27360 removed a padding field full of uint8_t's, but didn't remove
the use.  This didn't get picked up presumably because (a) bors
doesn't have any BSD builders, and/or (b) #[cfg]'d out blocks don't
get linted.

```
rustc: x86_64-unknown-freebsd/stage1/lib/rustlib/x86_64-unknown-freebsd/lib/liblibc
src/liblibc/lib.rs:1099:42: 1099:49 error: unused import, #[deny(unused_imports)] on by default
src/liblibc/lib.rs:1099                 use types::common::c99::{uint8_t, uint32_t, int32_t};
                                                                 ^~~~~~~
error: aborting due to previous error
fatal runtime error: Could not unwind stack, error = 159555904
```
2015-07-31 18:11:10 +10:00
Oliver Schneider
6a86a0c89c fix code and error to match the surronding text 2015-07-31 09:32:53 +02:00
bors
a7b8f5bc47 Auto merge of #27405 - brson:relnotes, r=alexcrichton 2015-07-31 06:09:29 +00:00
bors
8d2eb5971a Auto merge of #27382 - brson:gate-assoc-type, r=alexcrichton
There are still problems in both the design and implementation of this, so we don't want it landing in 1.2.

cc @arielb1 @nikomatsakis 

cc #27364

r? @alexcrichton
2015-07-31 04:33:34 +00:00
Eli Friedman
f9692d5d00 Remove unused code in parser. 2015-07-30 20:51:51 -07:00