Commit Graph

63268 Commits

Author SHA1 Message Date
est31
873a3b0363 Allow us to remove masking in the future 2017-04-18 02:43:16 +02:00
est31
3993eb4a27 Preserve sNaN payload when converting them to quiet NaNs 2017-04-18 02:43:16 +02:00
est31
fc028b8180 Convert sNaN to quiet NaN instead of returning errors 2017-04-18 02:43:16 +02:00
est31
bdab5cdc63 assert_ne and tracking issue 2017-04-18 02:43:16 +02:00
est31
56760abf3b Add examples heading 2017-04-18 02:43:16 +02:00
est31
82eead0d0b Return Err(()) when trying to convert sNaN representation to float 2017-04-18 02:43:16 +02:00
est31
32a43da68a Add functions to safely transmute float to int 2017-04-18 02:43:16 +02:00
bors
5516bcc458 Auto merge of #41345 - frewsxcv:rollup, r=frewsxcv
Rollup of 3 pull requests

- Successful merges: #41012, #41280, #41290
- Failed merges:
2017-04-17 17:56:29 +00:00
Corey Farwell
07c6295137 Rollup merge of #41290 - GuillaumeGomez:put-back-hoedown, r=steveklabnik
Hoedown big comeback!

```bash
> cargo +local test
   Compiling libc v0.2.20
   Compiling sysinfo v0.3.4 (file:///Users/imperio/rust/sysinfo)
    Finished dev [unoptimized + debuginfo] target(s) in 3.2 secs
     Running target/debug/deps/disk_list-dbd70897f1f7e080

running 1 test
test test_disks ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured

     Running target/debug/deps/sysinfo-8ad11103abdf5941

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

   Doc-tests sysinfo
WARNING: src/sysinfo.rs -  (line 45) test will be run in the next rustdoc version. If it's not supposed to, please update your documentation and make it compliant to common mark specifications.
WARNING: src/sysinfo.rs -  (line 48) test will be run in the next rustdoc version. If it's not supposed to, please update your documentation and make it compliant to common mark specifications.

running 1 test
test src/sysinfo.rs -  (line 14) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
```

r? @rust-lang/docs
2017-04-17 13:26:21 -04:00
Corey Farwell
4ae25a60ba Rollup merge of #41280 - QuietMisdreavus:rustdoc-toc, r=GuillaumeGomez
rustdoc: add a list of headings to the sidebar

It's another misdreavus rustdoc PR, which means it's time for Bikeshed City once again! `:3`

In an effort to aid navigation in long documentation pages, this PR adds a listing of headings to the sidebars of pages where such headings exist. For example, for structs, links to their fields, inherent methods, and trait implementations are available where applicable.

Examples:

* Modules/Crate roots
  ![image](https://cloud.githubusercontent.com/assets/5217170/25019930/1000fa3a-2052-11e7-98ff-ddf5af18b3e6.png)
* Enums
  ![image](https://cloud.githubusercontent.com/assets/5217170/25019954/33497f9e-2052-11e7-88cf-df46f1b3b8a3.png)
* Primitives
  ![image](https://cloud.githubusercontent.com/assets/5217170/25019978/4820bbc6-2052-11e7-8b5a-96a864eb2a5b.png)
* Traits
  ![image](https://cloud.githubusercontent.com/assets/5217170/25020093/bd1bc9f2-2052-11e7-9cd1-00a0ad8007bc.png)
* Structs
  ![image](https://cloud.githubusercontent.com/assets/5217170/25020145/d75206b0-2052-11e7-88cc-9e9525084775.png)

Open questions:

* Right now, these kinds of pages (and also unions) are the only pages that will receive the name header - pages for functions, constants, macros, etc, won't have the corresponding name in their sidebar. Should I print the name regardless and only add table-of-contents links for pages that have them? This would make them match, for example, a struct with no public fields, no methods, and no trait implementations. The latter would still have a "Struct MyStruct" line above the module contents, with no header links to speak of, whereas a function wouldn't even have "Function my\_function".
* This is only a header listing, but there has been requests to include a more-complete listing of fields/methods/traits/etc, for example in #41123.
2017-04-17 13:26:20 -04:00
Corey Farwell
914b6f1f14 Rollup merge of #41012 - durka:vis-matcher, r=petrochenkov
:vis matcher for macro_rules

Resurrection of @DanielKeep's implementation posted with [RFC 1575](https://github.com/rust-lang/rfcs/pull/1575).

@jseyfried was of the opinion that this doesn't need an RFC.

Needed before merge:

- [x] sign-off from @DanielKeep since I stole his code
- [x] feature gate
- [x] docs
2017-04-17 13:26:19 -04:00
Guillaume Gomez
bee0291320 Add hoedown COPYRIGHT back 2017-04-17 18:10:03 +02:00
Guillaume Gomez
695354af9c Remove hoedown from tidy check 2017-04-17 18:10:03 +02:00
Guillaume Gomez
cbf8342efe Hoedown big comeback! 2017-04-17 18:10:03 +02:00
QuietMisdreavus
27bfbd56f0 rustdoc: add a list of headings to the sidebar 2017-04-17 10:41:13 -05:00
bors
011f240b89 Auto merge of #41264 - alexeyzab:41158-fix-docs, r=steveklabnik
Fix old docs

Fixes #41158
2017-04-17 15:10:23 +00:00
alexey zabelin
08a955af68
Adjust description 2017-04-17 10:48:23 -04:00
bors
5997806a6a Auto merge of #41157 - aidanhs:aphs-debug-appveyor-cache, r=TimNN
Add a comment for disabling errexit, try to debug appveyor cache

Comments added as requested.

Also, lets add some cache debugging to appveyor. I *think* this is how to ignore errors in cmd.exe (and I did try it on my own machine), but I'm not 100% sure how appveyor runs them. In the worst case it'll fail but I guess that isn't the end of the world since the build has already failed by this point.

r? @TimNN
2017-04-16 22:24:36 +00:00
bors
7627e3d31d Auto merge of #40409 - mbrubeck:calloc, r=sfackler
Specialize Vec::from_elem to use calloc

Fixes #38723.  This specializes the implementation for `u8` only, but it could be extended to other zeroable types if desired.

I haven't tested this extensively, but I did verify that it gives the expected performance boost for large `vec![0; n]` allocations with both alloc_system and jemalloc, on Linux.  (I have not tested or even built the Windows code.)
2017-04-16 19:13:52 +00:00
bors
9af79f52d0 Auto merge of #41329 - nagisa:bitflags-repr-options, r=eddyb
Compress ReprOptions a little bit

r? @eddyb
2017-04-16 16:47:18 +00:00
bors
fef1026bae Auto merge of #41308 - eddyb:order-must-be-preserved, r=nagisa
[rustbuild] Side-step HashMap iteration to preserve command-line step order.

The new `HashMap` was introduced by #41227 and it accidentally randomized step order.

r? @alexcrichton
2017-04-16 13:44:22 +00:00
Simonas Kazlauskas
fcbd898502 Compress ReprOptions a little bit 2017-04-16 16:17:13 +03:00
bors
13fd5e93de Auto merge of #41320 - Mark-Simulacrum:cleanup-methodmatch, r=arielb1
Remove MethodMatchResult and MethodMatchedData.

These two enums were unused.

Fixes #41318.

r? @nikomatsakis
2017-04-15 22:15:53 +00:00
Alex Burka
cfa51f226f satisfy completely useless tidy check 2017-04-15 21:39:19 +00:00
bors
d5cf1cb64c Auto merge of #41319 - eddyb:demand-adt-sized-constraint, r=arielb1
rustc: provide adt_sized_constraint as an on-demand query.

By using `queries::adt_sized_constraint::try_get`, we can detect cycles without a separate stack.
r? @nikomatsakis
2017-04-15 19:44:17 +00:00
Alex Burka
51c8af5093 reduce macro rule duplication in test 2017-04-15 19:06:58 +00:00
Alex Burka
e0cd76674d feature gate :vis matcher 2017-04-15 19:06:58 +00:00
Alex Burka
1d46805057 document :vis in unstable book 2017-04-15 19:06:19 +00:00
Alex Burka
37459e13fc widen :vis follow set 2017-04-15 19:06:19 +00:00
Alex Burka
06d32335e8 move NtVis enum variant to stave off comment rot 2017-04-15 19:06:19 +00:00
Alex Burka
16010c2f50 parse interpolated visibility tokens 2017-04-15 19:06:19 +00:00
Alex Burka
06411c4769 update print_visibility for new pub(restricted) syntax 2017-04-15 19:06:19 +00:00
Alex Burka
d53e413e04 update :vis implementation to current rust 2017-04-15 19:06:19 +00:00
Daniel Keep
a2489495d9 Implementation of the vis macro matcher. 2017-04-15 19:06:19 +00:00
bors
516ca2598c Auto merge of #39881 - king6cong:sys, r=japaric
code format
2017-04-15 17:17:17 +00:00
Matt Brubeck
aad2062073 Specialize Vec::from_elem for other numeric types 2017-04-15 09:01:56 -07:00
Matt Brubeck
675475c4d3 Specialize Vec::from_elem<u8> to use calloc or memset
Fixes #38723.
2017-04-15 09:01:56 -07:00
bors
ae23e65eb8 Auto merge of #41321 - frewsxcv:rollup, r=frewsxcv
Rollup of 2 pull requests

- Successful merges: #41306, #41311
- Failed merges:
2017-04-15 14:42:22 +00:00
Corey Farwell
591f62e8ce Rollup merge of #41311 - tedsta:fuchsia_error_codes, r=eddyb
Update magenta error codes

Update magenta error codes to match recent changes here: https://github.com/fuchsia-mirror/magenta/blob/master/system/public/magenta/errors.h
2017-04-15 10:41:51 -04:00
Corey Farwell
e9bc2b2942 Rollup merge of #41306 - nateozem:support/docs-mir, r=frewsxcv
add 'mir' to rustc help menu and man doc

add 'mir' to '--emit' flag list for 'rustc'.
This is added because 'rustc' can now generate MIR (referencing to
"Teach rustc --emit=mir #39891").
2017-04-15 10:41:50 -04:00
Mark Simulacrum
f8f5282e5c Remove MethodMatchResult and MethodMatchedData.
These two enums were unused.
2017-04-15 07:23:56 -06:00
Eduard-Mihai Burtescu
2a17b84cbc rustc: provide adt_sized_constraint as an on-demand query. 2017-04-15 15:40:38 +03:00
bors
c67cf5fddc Auto merge of #41316 - suchithjn225:issue-41272, r=eddyb
Do not desugar if-let-else to match arm guards

Fixes #41272
Changed the desugaring code

**Before**
```rust
match <sub_expr> {
     <pat> => <body>,
     [_ if <else_opt_if_cond> => <else_opt_if_body>,]
     _ => [<else_opt> | ()]
}
```

**After**
```rust
match <sub_expr> {
    <pat> => <body>,
     _       => [<else_opt> | ()]
}
```
With this fix, it doesn't cause E0301
2017-04-15 12:13:27 +00:00
Suchith J N
5649b3796f Aesthetic issue. Corrected indentation 2017-04-15 17:40:54 +05:30
Suchith J N
6fc7d45d64 Fixed aesthetics of if let block 2017-04-15 17:35:30 +05:30
Suchith J N
65b04fa068 Fixed aesthetics and test 2017-04-15 17:21:53 +05:30
Suchith J N
4ac11becc2 [41272] - Fixed to conform to rust project style 2017-04-15 12:17:25 +05:30
bors
5f13a3b540 Auto merge of #41286 - lukaramu:std-collections-docs, r=frewsxcv
Various improvements in std::collections docs

The meat of this PR are:
* changes to (almost all?) iterator struct docs in std::collections such that they use the standard iterator boilerplate and state where they are created
* a bunch of added links (at least as much as possible given std::collections mostly being a facade and whatnot 😅)
* an example for `Bound`
* changed phrasing for some summary sentences to be less redundant as well as more consistant with others in the module

There also are various other fixes, e.g. removing parens from method names in the module docs, changing some imperatives to 3rd person, etc.

r? @steveklabnik
2017-04-15 04:46:27 +00:00
Suchith J N
65fafd9414 [41272] - code for desugaring iflet changed 2017-04-15 10:14:09 +05:30
king6cong
7c8ca80c81 code format 2017-04-15 11:43:35 +08:00