about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2018-12-20Remove nil-enum testvarkor-24/+0
2018-12-20display rustc_private APIs as "Internal"Andy Russell-8/+52
2018-12-20Move compiletest test run to mingw-check builderPhilipp Hansch-6/+2
This way, checktools.sh continues to be used only for tools that are published later on.
2018-12-20split extra_scripts to handle root_path shenanigansQuietMisdreavus-10/+29
2018-12-20new --static-root-path flag for controlling static file locationsQuietMisdreavus-14/+80
2018-12-20Run compiletest tests on CIPhilipp Hansch-0/+5
I was assuming that https://github.com/rust-lang/rust/pull/56792 would have resulted in compiletest tests being executed in CI. However, I couldn't find any mentions of the unit test names in any CI logs. This adds the compiletest test execution to the checktools.sh script.
2018-12-20CopyriteOliver Scherer-10/+0
2018-12-20Auto merge of #56647 - petrochenkov:dcrate2, r=alexcrichtonbors-189/+487
Rework treatment of `$crate` in procedural macros Important clarification: `$crate` below means "processed `$crate`" or "output `$crate`". In the input of a decl macro `$crate` is just two separate tokens, but in the *output of a decl macro* `$crate` is a single keyword identifier (https://github.com/rust-lang/rust/issues/55640#issuecomment-435692791). First of all, this PR removes the `eliminate_crate_var` hack. `$crate::foo` is no longer replaced with `::foo` or `::crate_name::foo` in the input of derive proc macros, it's passed to the macro instead with its precise span and hygiene data, and can be treated as any other path segment keyword (like `crate` or `self`) after that. (Note: `eliminate_crate_var` was never used for non-derive proc macros.) This creates an annoying problem - derive macros still may stringify their input before processing and expect `$crate` survive that stringification and refer to the same crate (the Rust 1.15-1.29 way of doing things). Moreover, the input of proc macro attributes and derives (but not fn-like proc macros) also effectively survives stringification before being passed to the macro (also for legacy implementation reasons). So we kind of resurrect the `eliminate_crate_var` hack in reduced form, but apply it only to AST pretty-printing. If an AST fragment is pretty-printed, the resulting *text* will have `$crate` replaced with `crate` or `::crate_name`. This should be enough to keep all the legacy cases working. Closes https://github.com/rust-lang/rust/issues/55640 Closes https://github.com/rust-lang/rust/issues/56622 r? @ghost
2018-12-20Fix typo in commentAdrian Budau-1/+1
2018-12-20Fix pipe2 and accept4 on static linked executables on linux (like musl).Adrian Budau-27/+81
2018-12-20Auto merge of #56741 - RalfJung:retag-to-raw, r=oli-obkbors-128/+76
treat ref-to-raw cast like a reborrow: do a special kind of retag r? @oli-obk Cc @nikomatsakis
2018-12-20Add test for associated const version displayGuillaume Gomez-0/+26
2018-12-20fix nitsNicole Mazzuca-2/+4
2018-12-20Update src/libcore/num/mod.rsDavid Tolnay-1/+1
Co-Authored-By: ubsan <npmazzuca@gmail.com>
2018-12-20Auto merge of #56649 - davidtwco:issue-46589, r=pnkfelixbors-184/+300
MIR borrowck doesn't accept the example of iterating and updating a mutable reference Fixes #46589. r? @pnkfelix or @nikomatsakis
2018-12-20Refactor and add comments to code in receiver_is_validMichael Hewson-69/+46
also updated some error messages removed the code manually checking for `receiver_ty: Deref<Target=self_ty>`, in favour of using autoderef but only doing one iteration. This will cause error messages to be more consistent. Before, a "mismatched method receiver" error would be emitted when `receiver_ty` was valid except for a lifetime parameter, but only when `feature(arbitrary_self_types)` was enabled, and without the feature flag the error would be "uncoercible receiver". Now it emits "mismatched method receiver" in both cases.
2018-12-20Add DoubleEndedIterator::nth_backClar Fon-6/+107
2018-12-20add a doc comment on `receiver_is_valid`Michael Hewson-0/+8
2018-12-20Stabilize `Rc`, `Arc` and `Pin` as method receiversMichael Hewson-91/+250
This lets you write methods using `self: Rc<Self>`, `self: Arc<Self>`, `self: Pin<&mut Self>`, `self: Pin<Box<Self>`, and other combinations involving `Pin` and another stdlib receiver type, without needing the `arbitrary_self_types`. Other user-created receiver types can be used, but they still require the feature flag to use. This is implemented by introducing a new trait, `Receiver`, which the method receiver's type must implement if the `arbitrary_self_types` feature is not enabled. To keep composed receiver types such as `&Arc<Self>` unstable, the receiver type is also required to implement `Deref<Target=Self>` when the feature flag is not enabled. This lets you use `self: Rc<Self>` and `self: Arc<Self>` in stable Rust, which was not allowed previously. It was agreed that they would be stabilized in #55786. `self: Pin<&Self>` and other pinned receiver types do not require the `arbitrary_self_types` feature, but they cannot be used on stable because `Pin` still requires the `pin` feature.
2018-12-19Stabilize Vec(Deque)::resize_withScott McMurray-7/+2
Closes #41758
2018-12-20Add `std::os::fortanix_sgx` moduleJethro Beekman-56/+325
2018-12-20Auto merge of #56219 - arielb1:never-coerce-box, r=nikomatsakisbors-65/+172
trigger unsized coercions keyed on Sized bounds This PR causes unsized coercions to not be disabled by `$0: Unsize<dyn Object>` coercion obligations when we have an `$0: Sized` obligation somewhere. This should be mostly backwards-compatible, because in these cases not doing the unsize coercion should have caused the `$0: Sized` obligation to fail. Note that `X: Unsize<dyn Object>` obligations can't fail *as obligations* if `X: Sized` holds, so this still maintains some version of monotonicity (I think that an unsized coercion can't be converted to no coercion by unifying type variables). Fixes #49593 (unblocking never_type). r? @eddyb cc @nikomatsakis
2018-12-20Remove `TokenStream::JointTree`.Nicholas Nethercote-60/+46
This is done by adding a new `IsJoint` field to `TokenStream::Tree`, which simplifies a lot of `match` statements. And likewise for `CursorKind`. The commit also adds a new method `TokenTree:stream()` which can replace a choice between `.into()` and `.joint()`.
2018-12-19Auto merge of #54252 - arielb1:deref-query, r=nikomatsakisbors-192/+488
process nested obligations in autoderef Fixes #53843. r? @nikomatsakis
2018-12-19suggest similar lint names for unknown lintsAndy Russell-47/+69
2018-12-20Workaround issues with crate loading during cross-compilationVadim Petrochenkov-3/+9
2018-12-19Do not interpret mismatches from pretty-printed `$crate` as token stream ↵Vadim Petrochenkov-60/+50
invalidation
2018-12-19Reintroduce special pretty-printing for `$crate` when it's necessary for ↵Vadim Petrochenkov-14/+403
proc macros
2018-12-19proc_macro: Accept `$crate` as an identifier if it comes from the compilerVadim Petrochenkov-0/+34
2018-12-19proc_macro: Validate tokens coming from the compiler againVadim Petrochenkov-72/+56
2018-12-19Remove `eliminate_crate_var` and special pretty-printing for `$crate`Vadim Petrochenkov-112/+7
2018-12-19Auto merge of #56613 - Zoxc:query-perf1, r=michaelwoeristerbors-75/+167
Tweak query code for performance Split from https://github.com/rust-lang/rust/pull/56509 r? @michaelwoerister
2018-12-19FIXME(9639) remove fixme and accept non-utf8 paths in librustdocNiv Kaminer-7/+5
2018-12-19FIXME(9639) remove fixme and accept non-utf8 paths in compiletestNiv Kaminer-18/+18
2018-12-19Fix compiletest `trim` deprecation warningsPhilipp Hansch-10/+10
2018-12-19test: Ignore ui/target-feature-gate on sparc and sparc64John Paul Adrian Glaubitz-1/+3
2018-12-19test: Ignore ui/target-feature-gate on powerpc and powerpc64(le)John Paul Adrian Glaubitz-1/+4
2018-12-19query: simplify stack trimming in cycle_checkljedrz-1/+1
2018-12-19rustc: Move jemalloc from rustc_driver to rustcAlex Crichton-14/+14
This commit moves jemalloc to just the rustc binary rather than the rustc_driver shared library, enusring that it's only used for binaries that opt-in to it like rustc rather than other binaries using librustc_driver like rustdoc/rls/etc. This will hopefully address #56980
2018-12-19Allow testing pointers for inboundedness while forbidding dangling pointersOliver Scherer-8/+6
2018-12-19dropck: remove unnecessary call to cloned()ljedrz-1/+1
2018-12-19dropck: simplify common patternsljedrz-7/+6
2018-12-19Auto merge of #56601 - Zoxc:lifetime-killer, r=nikomatsakisbors-48/+56
Make the 'a lifetime on TyCtxt useless cc @rust-lang/compiler r? @nikomatsakis
2018-12-19query: minor refactoringljedrz-10/+3
2018-12-19query: insert visited queries more eagerlyljedrz-6/+3
2018-12-19miri: allocation is infallibleRalf Jung-18/+18
2018-12-19Adding unwinding support for x86_64_fortanix_unknown_sgx target.Vardhan Thigle-30/+168
2018-12-19Auto merge of #56977 - pietroalbini:rollup, r=pietroalbinibors-254/+459
Rollup of 15 pull requests Successful merges: - #56363 (Defactored Bytes::read) - #56663 (Remove lifetime from Resolver) - #56689 (add a lint group for lints emitted by rustdoc) - #56772 (fix issue 54153 by not testing issue-18804 on Windows nor OS X.) - #56820 (format-related tweaks) - #56881 (Implement Eq, PartialEq and Hash for atomic::Ordering) - #56907 (Fix grammar in compiler error for array iterators) - #56908 (rustc: Don't ICE on usage of two new target features) - #56910 (Do not point at delim spans for complete correct blocks) - #56913 (Enable stack probes for UEFI images) - #56918 (Profiler: simplify total_duration, improve readability) - #56931 (Update release notes for Rust 1.31.1) - #56947 (Add targets thumbv7neon-linux-androideabi and thumbv7neon-unknown-linux-gnueabihf) - #56948 (Update LLVM submodule) - #56959 (Fix mobile menu rendering collision with tooltip.) Failed merges: - #56914 (Ignore ui/target-feature-gate on sparc, sparc64, powerpc, powerpc64 and powerpc64le) r? @ghost
2018-12-19query: faster stack reversal in remove_cycleljedrz-5/+3
2018-12-19Rollup merge of #56959 - JohnHeitmann:mobile-z-fix, r=GuillaumeGomezPietro Albini-1/+1
Fix mobile menu rendering collision with tooltip. Bring the mobile-mode menu in front of the ⓘ icon. Here's what the bug looks like: ![screen shot 2018-12-18 at 1 53 46 pm](https://user-images.githubusercontent.com/4282480/50185501-cbf62180-02cc-11e9-927e-3c6469901323.png)