Commit Graph

74340 Commits

Author SHA1 Message Date
O01eg
83e76d6f29
Remove unused argument rustc_cargo. 2018-01-12 10:05:02 +03:00
O01eg
f05282f036
Add library path for real rustdoc with RUSTDOC_LIBDIR environment variable. 2018-01-12 10:04:02 +03:00
Neil Shen
7cad7f6b3d Fix Duration::subsec_millis and Duration::subsec_micros examples 2018-01-12 13:38:24 +08:00
O01eg
c87a1086dc
Build all stages with relative libdirs. 2018-01-12 07:11:13 +03:00
O01eg
0f5110ea49
Stage 1 and later use relative libdir. 2018-01-12 07:11:13 +03:00
O01eg
27b4f225ea
Accept verbosity in rustdoc. 2018-01-12 07:11:12 +03:00
O01eg
ee8b5783af
Fix #45345.
Re-implement

```bash
CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
```

from old `configure` script.
2018-01-12 07:10:58 +03:00
Chris Vittal
76cf279504 Add NLL tests for #46557 and #38899
Closes #47366

Adapt the sample code from the issues into mir-borrowck/nll test cases.
2018-01-11 18:08:28 -05:00
Niko Matsakis
ea742a4e55 update test case 2018-01-11 17:36:53 -05:00
Diggory Blake
53c05ffdda Enable num tests on wasm 2018-01-11 21:26:53 +00:00
muvlon
80028760ed s/OsStr/&OsStr in docs to align with &str/String comparison 2018-01-11 22:07:06 +01:00
Alexander Regueiro
e2c1a9393b Don't track local_needs_drop separately in qualify_consts (fixes #47351). 2018-01-11 20:13:06 +00:00
Marco A L Barbosa
882cd3cf0b Add i586-unknown-linux-musl target 2018-01-11 15:57:28 -02:00
muvlon
bac725ecdf Fix dead links in docs for OsStr 2018-01-11 17:20:30 +01:00
muvlon
fc825f09e8 Fix confusing documentation for OsStr 2018-01-11 17:20:16 +01:00
Ed Schouten
6a8d55a235 Extend tidy to allow conditionalizing tests for multiple targets. 2018-01-11 17:06:33 +01:00
bors
73ac5d6a80 Auto merge of #47180 - varkor:range-iterator-overrides, r=alexcrichton
Add iterator method specialisations to Range*

Add specialised implementations of `max` for `Range`, and `last`, `min` and `max` for `RangeInclusive`, all of which lead to significant advantages in the generated assembly on x86.

Note that adding specialisations of `min` and `last` for `Range` led to no benefit, and adding `sum` for `Range` and `RangeInclusive` led to type inference issues (though this is possibly still worthwhile considering the performance gain).

This addresses some of the concerns in #39975.
2018-01-11 12:22:54 +00:00
Niko Matsakis
d201e83f71 renumber regions in the generator interior
Fixes #47189.
2018-01-11 06:05:05 -05:00
Niko Matsakis
bf02c57b16 simplify UniversalRegions::to_region_vid to just consult the map
This doesn't actually fix the bug, but seems better.
2018-01-11 06:05:05 -05:00
Ed Schouten
9babb8a863 Make libtest build on CloudABI.
Just like on UNIX systems, we need to use sysconf() to obtain the number
of CPUs. Extend the existing cfg()'s to match CloudABI as well.
2018-01-11 11:42:33 +01:00
Ed Schouten
cc8565b20a Make the documentation build work on CloudABI.
Just like with wasm, we can't just import unix::ext and windows::ext.
Our shims are not complete enough for that.
2018-01-11 11:29:52 +01:00
Ed Schouten
d9d97c9f09 Make tests build on CloudABI.
There are some tests that need to be disabled on CloudABI specifically,
due to the fact that the shims cannot be built in combination with
unix::ext or windows::ext. Also improve the scoping of some imports to
suppress compiler warnings.
2018-01-11 11:28:34 +01:00
Ed Schouten
d882bb516e Add shims for modules that we can't implement on CloudABI.
As discussed in #47268, libstd isn't ready to have certain functionality
disabled yet. Follow wasm's approach of adding no-op modules for all of
the features that we can't implement.

I've placed all of those shims in a shims/ subdirectory, so we (the
CloudABI folks) can experiment with removing them more easily. It also
ensures that the code that does work doesn't get polluted with lots of
useless boilerplate code.
2018-01-11 11:26:13 +01:00
Ed Schouten
20745264ce Implement libstd for CloudABI.
Though CloudABI is strongly inspired by POSIX, its absence of features
that don't work well with capability-based sandboxing makes it different
enough that adding bits to sys/unix will make things a mess. This change
therefore adds CloudABI specific platform code under sys/cloudabi and
borrows parts from sys/unix that can be used without changes.

One of the goals of this implementation is to build as much as possible
directly on top of CloudABI's system call layer, as opposed to using the
C library. This is preferred, as the system call layer is supposed to be
stable, whereas the C library ABI technically is not. An advantage of
this approach is that it allows us to implement certain interfaces, such
as mutexes and condition variables more optimally. They can be lighter
than the ones provided by pthreads.

This change disables some modules that cannot realistically be
implemented right now. For example, libstd's pathname abstraction is not
designed with POSIX *at() (e.g., openat()) in mind. The *at() functions
are the only set of file system APIs available on CloudABI. There is no
global file system namespace, nor a process working directory.
Discussions on how to port these modules over are outside the scope of
this change.

Apart from this change, there are still some other minor fixups that
need to be made to platform independent code to make things build. These
will be sent out separately, so they can be reviewed more thoroughly.
2018-01-11 11:21:54 +01:00
Ed Schouten
795e173a76 Import the CloudABI system call bindings into the libstd tree.
These automatically generated Rust source files allow us to invoke
system calls within CloudABI processes. These will be used by libstd to
implement primitives for I/O, threading, etc.

These source files are normally part of the 'cloudabi' crate. In the
case of libstd, we'd better copy them into the source tree, as having
external dependencies in libstd is a bit messy. Original source files
can be found here:

    https://github.com/NuxiNL/cloudabi/tree/master/rust
2018-01-11 11:21:51 +01:00
Seiichi Uchida
9649c4a27c Add tests to fixed issues.
Closes #36792. Closes #38091. Closes #39687. Closes #42148. Closes #42956.
2018-01-11 13:03:25 +09:00
bors
619ced0578 Auto merge of #47087 - Zoxc:incr_no_in_ignore, r=michaelwoerister
Replace uses of DepGraph.in_ignore with DepGraph.with_ignore

I currently plan to track tasks in thread local storage. Ignoring things in a closure ensures that the ignore tasks do not overlap the beginning or end of any other task. The TLS API will also use a closure to change a TLS value, so having the ignore task be a closure also helps there.

It also adds `assert_ignored` which is used before a `TyCtxt` is created. Instead of adding a new ignore task this simply ensures that we are in a context where reads are ignored.

r? @michaelwoerister
2018-01-11 03:24:16 +00:00
Taylor Cramer
c9ae249265 Add transpose conversions for Option and Result
These impls are useful when working with combinator
methods that expect an option or a result, but you
have a Result<Option<T>, E> instead of an Option<Result<T, E>>
or vice versa.
2018-01-10 17:42:47 -08:00
Geoffry Song
2e0ad5af30 Glued tokens can themselves be joint.
When gluing two tokens, the second of which is joint, the result should also be
joint.
This fixes an issue with joining three `Dot` tokens to make a `DotDotDot` - the
intermediate `DotDot` would not be joint and therefore we would not attempt to
glue the last `Dot` token, yielding `.. .` instead of `...`.
2018-01-10 17:20:04 -08:00
bors
c9c2980736 Auto merge of #47243 - wesleywiser:incr_fingerprint_encoding, r=michaelwoerister
[incremental] Specialize encoding and decoding of Fingerprints

This saves the storage space used by about 32 bits per `Fingerprint`.
On average, this reduces the size of the `/target/{mode}/incremental`
folder by roughly 5% [Full details here](https://gist.github.com/wesleywiser/264076314794fbd6a4c110d7c1adc43e).

Fixes #45875

r? @michaelwoerister
2018-01-11 00:23:23 +00:00
Alexis Hunt
9d9504a27c Fix typo. 2018-01-10 17:58:00 -05:00
Matt Brubeck
3f9c057ea6 Use the new fs_read_write functions in rustc internals 2018-01-10 14:53:40 -08:00
Dan Robertson
c78679db08
Fix panic strings.
- Fix panic string in `check_ast_crate`.
2018-01-10 21:39:21 +00:00
Esteban Küber
90bc98c5d1 Modify message to match label 2018-01-10 11:41:12 -08:00
David Wood
1aa454e1e6
Updated other tests affected by change. 2018-01-10 19:12:57 +00:00
Matt Brubeck
44912bf77b Pre-allocate in fs::read and fs::read_string 2018-01-10 10:48:11 -08:00
Michael Woerister
fe21c4c522 Add -Ztime-passes line for dep-graph loading. 2018-01-10 18:23:50 +01:00
David Wood
cad7b4f450
Fixes #46983. Fixes bad error message when converting anonymous lifetime to 'static 2018-01-10 17:13:16 +00:00
David Wood
ee43e6d6c9
Added test for #46983 2018-01-10 17:12:23 +00:00
Niko Matsakis
00ce7eed7d resolve type and region variables in "NLL dropck"
Fixes #47022.
2018-01-10 10:15:08 -05:00
bors
f62f774035 Auto merge of #47167 - ivanbakel:builtin_indexing, r=nikomatsakis
Fix built-in indexing not being used where index type wasn't "obviously" usize

Fixes #33903
Fixes #46095

This PR was made possible thanks to the generous help of @eddyb

Following the example of binary operators, builtin checking for indexing has been moved from the typecheck stage to a writeback stage, after type constraints have been resolved.
2018-01-10 12:29:05 +00:00
Oliver Middleton
45cad0456f rustdoc: Populate external_traits with traits only seen in impls
This means default methods can always be found and "Important traits" will include all spotlight traits.
2018-01-10 07:05:30 +00:00
bors
27ede55414 Auto merge of #46830 - Diggsey:cursor-vec-mut, r=alexcrichton
Implement `Write` for `Cursor<&mut Vec<T>>`

Fixes #30132

r? @dtolnay (I'm just going through `feature-accepted` issues I swear 😛)
2018-01-10 06:33:31 +00:00
Manish Goregaokar
44b659ac2d Add test for #45868 2018-01-10 10:34:14 +05:30
Bulat Musin
d0d5db65c7
fix typo rwlock.rs
Hi. Fixed typo: contained -> content
2018-01-10 08:03:10 +03:00
Manish Goregaokar
730679685e Use correct line offsets for doctests (fixes #45868) 2018-01-10 10:10:34 +05:30
bors
92c32d2d8c Auto merge of #47308 - frewsxcv:rollup, r=frewsxcv
Rollup of 5 pull requests

- Successful merges: #46762, #46777, #47262, #47285, #47301
- Failed merges:
2018-01-10 03:52:19 +00:00
Corey Farwell
8fbfd2c940 Rollup merge of #47301 - GuillaumeGomez:fix-error-index-display, r=QuietMisdreavus
Fix error index display

Fixes #47284.

r? @QuietMisdreavus
2018-01-09 22:28:26 -05:00
Corey Farwell
14a9e264ba Rollup merge of #47285 - AndrewBrinker:master, r=kennytm
Fixed a typo in the compile_error docs

Noticed a typo and fixed it.
2018-01-09 22:28:25 -05:00
Corey Farwell
14284f3646 Rollup merge of #47262 - estebank:issue-45562, r=petrochenkov
Account for `pub` in `const` -> `static` suggestion

Fix #45562.
2018-01-09 22:28:24 -05:00