about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2018-01-12Avoid panicking when invalid argument is passed to cfg(..)Seiichi Uchida-3/+43
Closes #43925. Closes #43926.
2018-01-12Ignore CTFE errors while lowering patternsSeiichi Uchida-1/+22
Closes #43105.
2018-01-12Auto merge of #46551 - jseyfried:improve_legacy_modern_macro_interaction, r=nrcbors-9/+217
macros: improve 1.0/2.0 interaction This PR supports using unhygienic macros from hygienic macros without breaking the latter's hygiene. ```rust // crate A: #[macro_export] macro_rules! m1 { () => { f(); // unhygienic: this macro needs `f` in its environment fn g() {} // (1) unhygienic: `g` is usable outside the macro definition } } // crate B: #![feature(decl_macro)] extern crate A; use A::m1; macro m2() { fn f() {} // (2) m1!(); // After this PR, `f()` in the expansion resolves to (2), not (3) g(); // After this PR, this resolves to `fn g() {}` from the above expansion. // Today, it is a resolution error. } fn test() { fn f() {} // (3) m2!(); // Today, `m2!()` can see (3) even though it should be hygienic. fn g() {} // Today, this conflicts with `fn g() {}` from the expansion, even though it should be hygienic. } ``` Once this PR lands, you can make an existing unhygienic macro hygienic by wrapping it in a hygienic macro. There is an [example](https://github.com/rust-lang/rust/pull/46551/commits/b766fa887dc0e4b923a38751fe4d570e35a75710) of this in the tests. r? @nrc
2018-01-12Remove unused configuration parameter `libdir_relative`.O01eg-5/+3
2018-01-12Remove unused argument `rustc_cargo`.O01eg-4/+3
2018-01-12Add library path for real rustdoc with `RUSTDOC_LIBDIR` environment variable.O01eg-2/+5
2018-01-12Fix Duration::subsec_millis and Duration::subsec_micros examplesNeil Shen-2/+2
2018-01-12Build all stages with relative libdirs.O01eg-8/+4
2018-01-12Stage 1 and later use relative libdir.O01eg-1/+1
2018-01-12Accept verbosity in rustdoc.O01eg-0/+11
2018-01-12Fix #45345.O01eg-0/+1
Re-implement ```bash CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-` ``` from old `configure` script.
2018-01-11Add NLL tests for #46557 and #38899Chris Vittal-0/+79
Closes #47366 Adapt the sample code from the issues into mir-borrowck/nll test cases.
2018-01-11Enable num tests on wasmDiggory Blake-1/+0
2018-01-11s/OsStr/&OsStr in docs to align with &str/String comparisonmuvlon-2/+3
2018-01-11Don't track local_needs_drop separately in qualify_consts (fixes #47351).Alexander Regueiro-23/+41
2018-01-11Add i586-unknown-linux-musl targetMarco A L Barbosa-10/+40
2018-01-11Fix dead links in docs for OsStrmuvlon-0/+2
2018-01-11Fix confusing documentation for OsStrmuvlon-1/+1
2018-01-11Extend tidy to allow conditionalizing tests for multiple targets.Ed Schouten-2/+2
2018-01-11Auto merge of #47180 - varkor:range-iterator-overrides, r=alexcrichtonbors-0/+75
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-11Make libtest build on CloudABI.Ed Schouten-8/+9
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-11Make the documentation build work on CloudABI.Ed Schouten-5/+7
Just like with wasm, we can't just import unix::ext and windows::ext. Our shims are not complete enough for that.
2018-01-11Make tests build on CloudABI.Ed Schouten-6/+13
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-11Add shims for modules that we can't implement on CloudABI.Ed Schouten-9/+980
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-11Implement libstd for CloudABI.Ed Schouten-0/+1165
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-11Import the CloudABI system call bindings into the libstd tree.Ed Schouten-0/+2898
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-11Add tests to fixed issues.Seiichi Uchida-0/+110
Closes #36792. Closes #38091. Closes #39687. Closes #42148. Closes #42956.
2018-01-11Auto merge of #47087 - Zoxc:incr_no_in_ignore, r=michaelwoeristerbors-261/+273
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-10Glued tokens can themselves be joint.Geoffry Song-6/+24
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-11Auto merge of #47243 - wesleywiser:incr_fingerprint_encoding, r=michaelwoeristerbors-2/+78
[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-10Fix typo.Alexis Hunt-1/+1
2018-01-10Use the new fs_read_write functions in rustc internalsMatt Brubeck-64/+42
2018-01-10Fix panic strings.Dan Robertson-1/+1
- Fix panic string in `check_ast_crate`.
2018-01-10Modify message to match labelEsteban Küber-18/+30
2018-01-10Updated other tests affected by change.David Wood-19/+24
2018-01-10Pre-allocate in fs::read and fs::read_stringMatt Brubeck-2/+10
2018-01-10Add -Ztime-passes line for dep-graph loading.Michael Woerister-4/+5
2018-01-10Fixes #46983. Fixes bad error message when converting anonymous lifetime to ↵David Wood-12/+13
`'static`
2018-01-10Added test for #46983David Wood-0/+28
2018-01-10resolve type and region variables in "NLL dropck"Niko Matsakis-0/+48
Fixes #47022.
2018-01-10Auto merge of #47167 - ivanbakel:builtin_indexing, r=nikomatsakisbors-12/+104
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-10rustdoc: Populate external_traits with traits only seen in implsOliver Middleton-5/+52
This means default methods can always be found and "Important traits" will include all spotlight traits.
2018-01-10Auto merge of #46830 - Diggsey:cursor-vec-mut, r=alexcrichtonbors-32/+58
Implement `Write` for `Cursor<&mut Vec<T>>` Fixes #30132 r? @dtolnay (I'm just going through `feature-accepted` issues I swear 😛)
2018-01-10Add test for #45868Manish Goregaokar-0/+29
2018-01-10fix typo rwlock.rsBulat Musin-1/+1
Hi. Fixed typo: contained -> content
2018-01-10Use correct line offsets for doctests (fixes #45868)Manish Goregaokar-11/+55
2018-01-10Auto merge of #47308 - frewsxcv:rollup, r=frewsxcvbors-278/+501
Rollup of 5 pull requests - Successful merges: #46762, #46777, #47262, #47285, #47301 - Failed merges:
2018-01-09Rollup merge of #47301 - GuillaumeGomez:fix-error-index-display, ↵Corey Farwell-224/+325
r=QuietMisdreavus Fix error index display Fixes #47284. r? @QuietMisdreavus
2018-01-09Rollup merge of #47285 - AndrewBrinker:master, r=kennytmCorey Farwell-1/+1
Fixed a typo in the compile_error docs Noticed a typo and fixed it.
2018-01-09Rollup merge of #47262 - estebank:issue-45562, r=petrochenkovCorey Farwell-1/+32
Account for `pub` in `const` -> `static` suggestion Fix #45562.