Commit Graph

62290 Commits

Author SHA1 Message Date
Ariel Ben-Yehuda
5694ac9e7b Rollup merge of #40265 - wesleywiser:rustdoc_style, r=GuillaumeGomez
Improve the style of the sidebar in rustdoc output

Makes the sidebar a light grey and highlights the currently viewed item in the sidebar more prominently.

All visual design credit goes to @johnwhelchel (#37856)

Sample screenshots:

![screen shot 2017-03-04 at 12 29 48 pm](https://cloud.githubusercontent.com/assets/831192/23580829/db6c26c2-00d6-11e7-8d89-822e25ba79f0.png)

![screen shot 2017-03-04 at 12 30 10 pm](https://cloud.githubusercontent.com/assets/831192/23580828/db69eeca-00d6-11e7-9f89-1e06fd3bf098.png)

![screen shot 2017-03-04 at 12 30 31 pm](https://cloud.githubusercontent.com/assets/831192/23580830/db6d00ce-00d6-11e7-89ca-cd03e148a121.png)
2017-03-08 20:53:55 +02:00
Ariel Ben-Yehuda
f38e332b79 Rollup merge of #40258 - est31:master, r=nikomatsakis
Fix description of closure coercion feature

Thanks to @whitequark for pointing this out.
2017-03-08 20:53:54 +02:00
Ariel Ben-Yehuda
1e536245e8 Rollup merge of #40254 - nagisa:compiler-builtin-no-panic, r=alexcrichton
Fix personality_fn within the compiler_builtins

compiler_builtins may not have any unwinding within it to link correctly. This is notoriously
finicky, and this small piece of change removes yet another case where personality function
happens to get introduced.

Side note: I do remember solving the exact same thing before. I wonder why it has reappered...

@cuviper, could you please try building beta with this patch applied? It should apply cleanly. If it works, I’ll nominate to land this into beta.

Fixes(?) https://github.com/rust-lang/rust/issues/40251
2017-03-08 20:53:53 +02:00
Ariel Ben-Yehuda
2c252ff1fb Rollup merge of #40237 - arthurprs:hm-adapt2, r=alexcrichton
Reduce size overhead of adaptative hashmap

Exposes a boolean flag in RawTable and use it instead of a bool field in HashMap.

Taking a bit from capacity or length would make overflow handling tricky.

Fixes: #40042
2017-03-08 20:53:52 +02:00
Ariel Ben-Yehuda
68a5a16740 Rollup merge of #40226 - jdhorwitz:master, r=frewsxcv
Issue #39688 - Help people find String::as_bytes() for UTF-8

Added in links for the inverse functions so people will know that as_bytes() is the inverse of from_utf8() and vice versa.
?r @steveklabnik
2017-03-08 20:53:51 +02:00
Ariel Ben-Yehuda
7c18194498 Rollup merge of #40222 - steveklabnik:extract-nomicon, r=alexcrichton
Extract nomicon to its own repo

part of https://github.com/rust-lang/rust/issues/39588

same as https://github.com/rust-lang/rust/pull/40213 but for the nomicon

r? @alexcrichton
2017-03-08 20:53:50 +02:00
Ariel Ben-Yehuda
df9a721a55 Rollup merge of #40154 - steveklabnik:link-unstable-book, r=frewsxcv
add unstable book to the bookshelf

r? @frewsxcv @GuillaumeGomez
2017-03-08 20:53:48 +02:00
bors
ee60afa094 Auto merge of #39860 - japaric:san, r=alexcrichton
cleanup: remove the *san Cargo features from std

these belong to a previous iteration of the sanitizer implementation

r? @alexcrichton
cc @whitequark
2017-03-08 13:00:13 +00:00
Eduard-Mihai Burtescu
319890487a Disallow subtyping between T and U in T: Unsize<U>. 2017-03-08 14:36:19 +02:00
bors
f91c3f6755 Auto merge of #39713 - estebank:issue-39698, r=jonathandturner
Clean up "pattern doesn't bind x" messages

Group "missing variable bind" spans in `or` matches and clarify wording
for the two possible cases: when a variable from the first pattern is
not in any of the subsequent patterns, and when a variable in any of the
other patterns is not in the first one.

Before:

```rust
error[E0408]: variable `a` from pattern #1 is not bound in pattern #2
  --> file.rs:10:23
   |
10 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |                       ^^^^^^^^^^^ pattern doesn't bind `a`

error[E0408]: variable `b` from pattern #2 is not bound in pattern #1
  --> file.rs:10:32
   |
10 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |                                ^ pattern doesn't bind `b`

error[E0408]: variable `a` from pattern #1 is not bound in pattern #3
  --> file.rs:10:37
   |
10 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |                                     ^^^^^^^^ pattern doesn't bind `a`

error[E0408]: variable `d` from pattern #1 is not bound in pattern #3
  --> file.rs:10:37
   |
10 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |                                     ^^^^^^^^ pattern doesn't bind `d`

error[E0408]: variable `c` from pattern #3 is not bound in pattern #1
  --> file.rs:10:43
   |
10 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |                                           ^ pattern doesn't bind `c`

error[E0408]: variable `d` from pattern #1 is not bound in pattern #4
  --> file.rs:10:48
   |
10 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |                                                ^^^^^^^^ pattern doesn't bind `d`

error: aborting due to 6 previous errors
```

After:

```rust
error[E0408]: variable `d` is not bound in all patterns
  --> $DIR/issue-39698.rs:20:37
   |
20 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |                  -          -       ^^^^^^^^   ^^^^^^^^ pattern doesn't bind `d`
   |                  |          |       |
   |                  |          |       pattern doesn't bind `d`
   |                  |          variable not in all patterns
   |                  variable not in all patterns

error[E0408]: variable `c` is not bound in all patterns
  --> $DIR/issue-39698.rs:20:48
   |
20 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |         ^^^^^^^^^^^   ^^^^^^^^^^^         -    ^^^^^^^^ pattern doesn't bind `c`
   |         |             |                   |
   |         |             |                   variable not in all patterns
   |         |             pattern doesn't bind `c`
   |         pattern doesn't bind `c`

error[E0408]: variable `a` is not bound in all patterns
  --> $DIR/issue-39698.rs:20:37
   |
20 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |               -       ^^^^^^^^^^^   ^^^^^^^^         - variable not in all patterns
   |               |       |             |
   |               |       |             pattern doesn't bind `a`
   |               |       pattern doesn't bind `a`
   |               variable not in all patterns

error[E0408]: variable `b` is not bound in all patterns
  --> $DIR/issue-39698.rs:20:37
   |
20 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |         ^^^^^^^^^^^            -    ^^^^^^^^   ^^^^^^^^ pattern doesn't bind `b`
   |         |                      |    |
   |         |                      |    pattern doesn't bind `b`
   |         |                      variable not in all patterns
   |         pattern doesn't bind `b`

error: aborting due to 4 previous errors
```

Fixes #39698.
2017-03-08 09:30:13 +00:00
Paul Daniel Faria
234753a5ca Fix missing backtick typo
Fixes rendering of the end of the `Configure and Make` section.
2017-03-07 21:49:43 -05:00
Alex Crichton
e412af2a88 rustbuild: Assert directory creation succeeds
I've been seeing failures on the bots when building jemalloc and my assumption
is that it's because cwd isn't created. That may be possible if this
`create_dir_all` call change in this commit fails, in which case we ignore the
error.

This commit updates the location to call `create_dir_racy` which handles
concurrent invocations, as multiple build scripts may be trying to create the
`native` dir.
2017-03-07 15:24:36 -08:00
Tobias Bucher
f3a2f90c88 Document why str.to_{lower,upper}case return String
Fixes #39201.
2017-03-08 00:06:09 +01:00
Tobias Bucher
025bf9582e Clarify handling of src in ptr::write
Fixes #39733.
2017-03-07 23:39:49 +01:00
Guillaume Gomez
65ac1e92fe Add missing urls in some macros doc 2017-03-07 19:13:17 +01:00
madseagames
df617195f0 Added remove_from to vec.rs 2017-03-07 19:44:51 +02:00
CrazyMerlyn
b5533d2953 Update link to COMPILER_TESTS.md in CONTRIBUTING.md 2017-03-07 23:13:31 +05:30
Joel Gallant
f283141656 README formatting in configure/make section 2017-03-07 09:00:33 -07:00
Oliver Schneider
acd8fe8fe8 Fix a typo in the docs 2017-03-07 10:45:13 +01:00
topecongiro
7dc36e9d99 Add tests for issues with the 'E-needtest' label. 2017-03-07 14:01:19 +09:00
Wesley Wiser
2bb2a2975f Improve the style of the sidebar in rustdoc output
Makes the sidebar a light grey and highlights the currently viewed item
in the sidebar more prominently.

All visual design credit goes to @johnwhelchel (#37856)
2017-03-06 18:23:55 -05:00
bors
b04ebef432 Auto merge of #40272 - jseyfried:fix_const_macro_invocations, r=petrochenkov
macros: fix const expression invocations

Fixes #40136.
r? @nrc
2017-03-06 15:04:10 +00:00
Mark Simulacrum
403ae37ce8 Remove reference to Ty. 2017-03-06 07:04:04 -07:00
Mark Simulacrum
89fe4df9c7 Unify both conflicting default searches into one. 2017-03-06 07:04:04 -07:00
Marco A L Barbosa
2e5b380180 Remove extra space in test description (of a mod test) 2017-03-06 10:05:31 -03:00
Mátyás Mustoha
f121e6180b Fix text formatting in README 2017-03-06 12:29:52 +01:00
bors
11bc48a15a Auto merge of #40276 - topecongiro:add-test, r=petrochenkov
Add missing tests for 'E-needstest' labeled issues

This PR adds missing tests for issue #35988, #19712, ~~#18627~~, #24947, #28600 and #34751.
2017-03-06 09:17:06 +00:00
topecongiro
a54f9dd556 Add missing tests for 'E-needstest' labeled issues 2017-03-06 12:52:26 +09:00
bors
bd62cbfdb1 Auto merge of #40285 - estebank:issue-40221, r=frewsxcv
Fix ICE: don't use `struct_variant` on enums

Fix #40221 and add unittest.
2017-03-06 03:24:09 +00:00
Esteban Küber
3ffa4b5240 Use BTreeSet instead of FxHashSet 2017-03-06 00:20:26 -03:00
Esteban Küber
75eface16d Clean up "pattern doesn't bind x" messages
Group "missing variable bind" spans in `or` matches and clarify wording
for the two possible cases: when a variable from the first pattern is
not in any of the subsequent patterns, and when a variable in any of the
other patterns is not in the first one.

Before:

```
error[E0408]: variable `a` from pattern #1 is not bound in pattern #2
  --> file.rs:10:23
   |
10 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |                       ^^^^^^^^^^^ pattern doesn't bind `a`

error[E0408]: variable `b` from pattern #2 is not bound in pattern #1
  --> file.rs:10:32
   |
10 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |                                ^ pattern doesn't bind `b`

error[E0408]: variable `a` from pattern #1 is not bound in pattern #3
  --> file.rs:10:37
   |
10 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |                                     ^^^^^^^^ pattern doesn't bind `a`

error[E0408]: variable `d` from pattern #1 is not bound in pattern #3
  --> file.rs:10:37
   |
10 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |                                     ^^^^^^^^ pattern doesn't bind `d`

error[E0408]: variable `c` from pattern #3 is not bound in pattern #1
  --> file.rs:10:43
   |
10 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |                                           ^ pattern doesn't bind `c`

error[E0408]: variable `d` from pattern #1 is not bound in pattern #4
  --> file.rs:10:48
   |
10 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
   |                                                ^^^^^^^^ pattern doesn't bind `d`

error: aborting due to 6 previous errors
```

After:

```
error[E0408]: variable `a` is not bound in all patterns
  --> file.rs:20:37
   |
20 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => {
intln!("{:?}", a); }
   |               -       ^^^^^^^^^^^   ^^^^^^^^         - variable
t in all patterns
   |               |       |             |
   |               |       |             pattern doesn't bind `a`
   |               |       pattern doesn't bind `a`
   |               variable not in all patterns

error[E0408]: variable `d` is not bound in all patterns
  --> file.rs:20:37
   |
20 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => {
intln!("{:?}", a); }
   |                  -          -       ^^^^^^^^   ^^^^^^^^ pattern
esn't bind `d`
   |                  |          |       |
   |                  |          |       pattern doesn't bind `d`
   |                  |          variable not in all patterns
   |                  variable not in all patterns

error[E0408]: variable `b` is not bound in all patterns
  --> file.rs:20:37
   |
20 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => {
intln!("{:?}", a); }
   |         ^^^^^^^^^^^            -    ^^^^^^^^   ^^^^^^^^ pattern
esn't bind `b`
   |         |                      |    |
   |         |                      |    pattern doesn't bind `b`
   |         |                      variable not in all patterns
   |         pattern doesn't bind `b`

error[E0408]: variable `c` is not bound in all patterns
  --> file.rs:20:48
   |
20 |         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => {
intln!("{:?}", a); }
   |         ^^^^^^^^^^^   ^^^^^^^^^^^         -    ^^^^^^^^ pattern
esn't bind `c`
   |         |             |                   |
   |         |             |                   variable not in all
tterns
   |         |             pattern doesn't bind `c`
   |         pattern doesn't bind `c`

error: aborting due to 4 previous errors
```

* Have only one presentation for binding consistency errors
* Point to same binding in multiple patterns when possible
* Check inconsistent bindings in all arms
* Simplify wording of diagnostic message
* Sort emition and spans of binding errors for deterministic output
2017-03-06 00:20:26 -03:00
Esteban Küber
ad06fc718b Fix ICE: don't use struct_variant on enums
Fix #40221 and add unittest.
2017-03-06 00:13:14 -03:00
Joshua Horwitz
86bad49ec1 Issue #39688 - Help people find String::as_bytes() for UTF-8 r? @steveklabnik 2017-03-05 19:56:51 -05:00
Jeffrey Seyfried
9fe7d3ffe4 Fix const expression macro invocations. 2017-03-05 23:58:19 +00:00
Jack O'Connor
03b83a01ad clarify docs for Args and ArgsOs
The args() and args_os() docs include a line about how the first element
is usually the program name. Include that line in the struct docs too.
2017-03-05 16:39:26 -05:00
Gibson Fahnestock
7c88d9e86e
Remove the compile-fail feature gates whitelist
No longer necessary now that the whitelist is empty.

Fixes: https://github.com/rust-lang/rust/issues/39059
2017-03-05 20:26:23 +00:00
Gibson Fahnestock
cee4ef8e7c
Add compile-fail test for cfg_target_thread_local
Test copied from src/test/run-pass/thread-local-extern-static.rs.

Refs: https://github.com/rust-lang/rust/issues/39059
2017-03-05 20:17:47 +00:00
Gibson Fahnestock
ea3f148d3d
Add compile-fail test for unwind_attributes
Test copied from src/test/codegen/extern-functions.rs.

Refs: https://github.com/rust-lang/rust/issues/39059
2017-03-05 20:17:01 +00:00
bors
65e2a1454f Auto merge of #40266 - Mark-Simulacrum:cleanup-parser, r=petrochenkov
Inline function to avoid naming confusion.

Fixes the non-RFC requiring portion of #18394. The suggestion for a new token there probably needs to either be refiled onto rust-lang/rfcs if it's still relevant (may not be given Macros 2.0 work, not sure).
2017-03-05 19:53:29 +00:00
Jorge Aparicio
28baa27570 sanitizer runtime crates shouldn't be tested 2017-03-05 14:25:47 -05:00
Jorge Aparicio
872a0ebf21 cleanup: remove the *san Cargo features from std
these belong to a previous iteration of the sanitizer implementation
2017-03-05 14:25:47 -05:00
bors
6b76c9ea19 Auto merge of #40252 - topecongiro:compile-fail-test-cfg-stmt-expr, r=petrochenkov
Add compile fail test for stmt_expr_attributes

Adds a missing feature gate test for `stmt_expr_attributes`. Issue #39059.
2017-03-05 17:47:06 +00:00
topecongiro
255d59f884 Add compile fail test for stmt_expr_attributes 2017-03-05 14:40:29 +09:00
Mark Simulacrum
69899b7f27 Inline function to avoid naming confusion. 2017-03-04 18:02:04 -07:00
Mark Simulacrum
155ef41c84 Fix normalization error. 2017-03-04 16:44:02 -07:00
bors
ba07bd5d23 Auto merge of #40236 - petrochenkov:btweak, r=alexcrichton
rustbuild: A few tweaks

Fixes https://github.com/rust-lang/rust/issues/40016
Fixes https://github.com/rust-lang/rust/issues/39507

r? @alexcrichton
2017-03-04 19:20:58 +00:00
Vadim Petrochenkov
428f063fcd Automate timestamp creation and build skipping for native libraries
Add comments
2017-03-04 21:38:26 +03:00
Vadim Petrochenkov
c652a4fb56 Do not purge LLVM build directory on rebuild
Add some comments
2017-03-04 21:38:26 +03:00
Vadim Petrochenkov
e2f6185294 Separate "ui-fulldeps" tests from "ui" tests 2017-03-04 21:38:26 +03:00
Vadim Petrochenkov
11adac350b bootstrap.py: Report build status
Move some code from x.py to bootstrap.py
2017-03-04 21:38:26 +03:00