Commit Graph

49410 Commits

Author SHA1 Message Date
Peter Atashian
9749a193d6 Add JoinHandleExt to get the pthread_t on unix platforms
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-12-04 20:09:32 -05:00
Peter Atashian
95cdada99a AsRawHandle and IntoRawHandle for JoinHandle
This allows users to get the HANDLE of a spawned thread on Windows

Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-12-04 20:09:30 -05:00
bors
d49e365528 Auto merge of #30205 - alexcrichton:fix-dist, r=brson
Now that AUTHORS.txt no longer exists we shouldn't try to package it.
2015-12-05 00:42:37 +00:00
bors
e22a64e8d8 Auto merge of #30130 - tbu-:pr_array_clone, r=alexcrichton
[breaking-change]
2015-12-04 22:52:02 +00:00
Vadim Petrochenkov
eb789de803 Do MTWT resolution during lowering to HIR 2015-12-05 00:40:21 +03:00
Felix S. Klock II
288034bda2 Expand run-make test with regression tests for #30204
Fix #30204.
2015-12-04 22:02:48 +01:00
Felix S. Klock II
5bb1e648cd Change internal getopts so --a=b=c acts like --a b=c rather than --a b.
This is an adaption of

 8ec916b86a

including its unit test.
2015-12-04 22:02:09 +01:00
bors
55a4e05092 Auto merge of #30173 - sgrif:sg-fix-time-bug, r=alexcrichton
Currently if you add a duration which should lead to 0 nanos and 1
additional second, we end up with no additional seconds, and 1000000000
nanos.
2015-12-04 21:01:03 +00:00
Brian Anderson
cf34010d88 Update RELEASES.md for 1.5 2015-12-04 19:33:42 +00:00
Simonas Kazlauskas
deccd93531 Tweak manpage’s emit section 2015-12-04 21:11:04 +02:00
bors
68c15be8b5 Auto merge of #30084 - oli-obk:const_fn, r=pnkfelix 2015-12-04 17:47:18 +00:00
Jake Worth
2217cf1af2 Fix typo 2015-12-04 12:32:36 -05:00
Alex Crichton
086f02d3d1 mk: Fix make dist
Now that AUTHORS.txt no longer exists we shouldn't try to package it.
2015-12-04 08:55:02 -08:00
Sean Griffin
07471423a2 Fix the time overflow on mac as well 2015-12-04 09:49:35 -07:00
Guillaume Gomez
67eaa9e327 Add E0452 error explanation 2015-12-04 13:19:35 +01:00
bors
ac0e845224 Auto merge of #30192 - jwworth:pull-request-1449185301, r=alexcrichton
This fixes a double word typo, 'of'.
2015-12-04 11:46:44 +00:00
Tobias Bucher
6dff9d03d9 Don't use an explicit temporary for cloning an array 2015-12-04 09:16:48 +00:00
Tobias Bucher
7867de02e3 Implement Clone for arrays without using slice patterns 2015-12-04 09:16:48 +00:00
Tobias Bucher
19b9ad7444 Implement Clone for [T; 0] to [T; 32] if T: Clone 2015-12-04 09:16:22 +00:00
bors
77ed39cfe3 Auto merge of #29850 - Kimundi:attributes_that_make_a_statement, r=pnkfelix
See https://github.com/rust-lang/rfcs/pull/16 and https://github.com/rust-lang/rust/issues/15701

- Added syntax support for attributes on expressions and all syntax nodes in statement position.
- Extended `#[cfg]` folder to allow removal of statements, and
of expressions in optional positions like expression lists and trailing
block expressions.
- Extended lint checker to recognize lint levels on expressions and
locals.
- As per RFC, attributes are not yet accepted on `if` expressions.

Examples:
  ```rust
let x = y;
{
        ...
}
assert_eq!((1, #[cfg(unset)] 2, 3), (1, 3));

let FOO = 0;
```

Implementation wise, there are a few rough corners and open questions:
- The parser work ended up a bit ugly.
- The pretty printer change was based mostly on guessing.
- Similar to the `if` case, there are some places in the grammar where a new `Expr` node starts,
  but where it seemed weird to accept attributes and hence the parser doesn't. This includes:
  - const expressions in patterns
  - in the middle of an postfix operator chain (that is, after `.`, before indexing, before calls)
  - on range expressions, since `#[attr] x .. y` parses as  `(#[attr] x) .. y`, which is inconsistent with
    `#[attr] .. y` which would parse as `#[attr] (.. y)`
- Attributes are added as additional `Option<Box<Vec<Attribute>>>` fields in expressions and locals.
- Memory impact has not been measured yet.
- A cfg-away trailing expression in a block does not currently promote the previous `StmtExpr` in a block to a new trailing expr. That is to say, this won't work:
```rust
let x = {
    #[cfg(foo)]
    Foo { data: x }
    #[cfg(not(foo))]
    Foo { data: y }
};
```
- One-element tuples can have their inner expression removed to become Unit, but just Parenthesis can't. Eg, `(#[cfg(unset)] x,) == ()` but `(#[cfg(unset)] x) == error`. This seemed reasonable to me since tuples and unit are type constructors, but could probably be argued either way.
- Attributes on macro nodes are currently unconditionally dropped during macro expansion, which seemed fine since macro disappear at that point?
- Attributes on `ast::ExprParens` will be prepend-ed to the inner expression in the hir folder.
- The work on pretty printer tests for this did trigger, but not fix errors regarding macros:
  - expression `foo![]` prints as `foo!()`
  - expression `foo!{}` prints as `foo!()`
  - statement `foo![];` prints as `foo!();`
  - statement `foo!{};` prints as `foo!();`
  - statement `foo!{}` triggers a `None` unwrap ICE.
2015-12-04 08:46:29 +00:00
bors
5673a7b374 Auto merge of #30189 - crumblingstatue:patch-1, r=alexcrichton
Replace the old link pointing to an out-of-date gist with a
link to the lazy_static crate on crates.io.

We also don't need to state the author, as the crates.io page
shows the authors and owners.
2015-12-04 06:05:08 +00:00
bors
4cedff7be6 Auto merge of #30190 - tshepang:dir_builder-example, r=alexcrichton 2015-12-04 03:26:46 +00:00
Marvin Löbel
d06f48054c Ignore rpass-fulldeps test in cross compile tests 2015-12-04 03:47:53 +01:00
bors
5854fed4ae Auto merge of #30183 - retep998:min-align, r=alexcrichton
This fixes it so the Rust allocator on Windows 32-bit doesn't think the system allocator is aligned to 16 when it is really only aligned to 8.
2015-12-04 01:42:10 +00:00
Guillaume Gomez
91cd93d2b1 Split rustdoc css to modify it more easily 2015-12-04 01:54:59 +01:00
mitaa
72d5675fef Address review comments 2015-12-04 00:48:59 +01:00
Jake Worth
4632101fc2 Fix typo 2015-12-03 18:29:00 -05:00
bors
c7d58321e1 Auto merge of #30149 - mitaa:fqn, r=alexcrichton
Fixes #30109
2015-12-03 23:09:30 +00:00
mitaa
af1ad419e1 Use the extern item-path for documentation links
The local item-path includes the local crates path to the extern crate
declaration which breaks cross-crate rustdoc links if the extern crate
is not linked into the crate root or renamed via `extern foo as bar`.
2015-12-03 23:11:19 +01:00
Tshepang Lekhonkhobe
4463070126 doc: add example for std::fs::DirBuilder 2015-12-03 23:40:26 +02:00
mitaa
14f504c5b7 Add a build-aux-docs directive to compiletest
This flag causes the documentation for all `aux-build` files to
be built, which happens prior to running/building the parent test.
2015-12-03 22:20:29 +01:00
bors
372e82c9c0 Auto merge of #29999 - SingingTree:libterm_unwrapping, r=alexcrichton
This removes a number of instances of unwrap and replaces them with
pattern matching.

This is in response to rust issue #29992.
2015-12-03 19:32:57 +00:00
Mika Attila
87b865c83c Link to lazy_static crate in Design FAQ
Replace the old link pointing to an out-of-date gist with a
link to the lazy_static crate on crates.io.

We also don't need to state the author, as the crates.io page
shows the authors and owners.
2015-12-03 20:11:29 +01:00
Florian Hahn
b1b40c7ef6 Make public borrowck api more accessible 2015-12-03 18:47:47 +01:00
bors
7540dcd8df Auto merge of #30167 - GuillaumeGomez:patch-3, r=Manishearth
r? @Manishearth
2015-12-03 16:40:14 +00:00
Guillaume Gomez
e10fe2ed99 Add E0400 error explanation 2015-12-03 17:33:42 +01:00
Sean Griffin
5dbc373f70 Fix tests for SystemTime addition on mac and ios
Those platforms don't support nanosecond precision, so adding 1
nanosecond does nothing.
2015-12-03 08:27:32 -07:00
bors
f016b77dff Auto merge of #30180 - tbu-:pr_isize_to_i32, r=arielb1
s/isize/i32
2015-12-03 12:48:14 +00:00
bors
f5150dd9b4 Auto merge of #30171 - nikomatsakis:re-enable-mir, r=arielb1
Don't think there are any known regressions, but then I am still way behind on my GH notifications. cc @rust-lang/compiler thoughts?
2015-12-03 06:44:14 +00:00
Bryce Van Dyk
0ee230a094 libterm: bring across changes from term
This brings across changes made to the term library to libterm. This
includes removing instances or unwrap, fixing format string handling, and
removing a TODO.

This fix does not bring all changes across, as term now relies on cargo
deps that cannot be brought into the rust build at this stage, but has
attempted as best to cross port changes not relying on this. This notably
limits extra functionality since implemented int he Terminal trait in
Term.

This is in partly in response to rust issue #29992.
2015-12-03 19:27:59 +13:00
bors
a2f58f3644 Auto merge of #30169 - shepmaster:for-loop-into-iterator, r=steveklabnik 2015-12-03 04:34:43 +00:00
bors
e4066f5f4c Auto merge of #30176 - brson:no-more-authors, r=steveklabnik
Keeping this file up to date requires hours of work every release,
even with the script. It is a fool's errand and we shall not do it
any longer.
2015-12-03 02:40:29 +00:00
Peter Atashian
098f4fb9c7 MIN_ALIGN is definitely 8 on 32-bit x86, at least on Windows.
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-12-02 21:03:21 -05:00
mitaa
5c01cf485f Initialize the ID map with known values 2015-12-03 02:19:23 +01:00
bors
abfadfeee6 Auto merge of #30165 - dotdash:no_null_elim, r=alexcrichton
This pass causes mis-optimizations in some cases and is probably no
longer really important for us, so let's disable it for now.

Fixes #30081
2015-12-02 23:18:11 +00:00
mitaa
fa0269dd35 Generate unique IDs for each rustdoc HTML page 2015-12-03 00:07:59 +01:00
mitaa
538689ddc7 Move ID generator to a more suited location 2015-12-03 00:07:59 +01:00
Brian Anderson
402749c539 Remove AUTHORS.txt and add-authors.sh
Keeping this file up to date requires hours of work every release,
even with the script. It is a fool's errand and we shall not do it
any longer.
2015-12-02 22:16:08 +00:00
Sean Griffin
a59cd363cc Fixed make tidy error 2015-12-02 15:01:58 -07:00
Sean Griffin
a69bcd885b Ensure two SystemTimes are equal when nanos add to exactly 1B
Currently if you add a duration which should lead to 0 nanos and 1
additional second, we end up with no additional seconds, and 1000000000
nanos.
2015-12-02 13:55:35 -07:00