bors [Fri, 25 May 2018 22:18:27 +0000 (22:18 +0000)]
Auto merge of #51033 - coryshrmn:master, r=dtolnay
stabilize RangeBounds collections_range #30877
The FCP for #30877 closed last month, with the decision to:
1. move from `collections::range::RangeArgument` to `ops::RangeBounds`, and
2. rename `start()` and `end()` to `start_bounds()` and `end_bounds()`.
Simon Sapin already moved it to `ops::RangeBounds` in #49163.
I renamed the functions, and removed the old `collections::range::RangeArgument` alias.
This is my first Rust PR, please let me know if I can improve anything. This passes all tests for me, except the `clippy` tool (which uses `RangeArgument::start()`).
I considered deprecating `start()` and `end()` instead of removing them, but the contribution guidelines indicate we can break `clippy` temporarily. I thought it was best to remove the functions, since we're worried about name collisions with `Range::start` and `end`.
bors [Fri, 25 May 2018 01:33:45 +0000 (01:33 +0000)]
Auto merge of #50879 - petrochenkov:lintconv, r=nikomatsakis
Fix naming conventions for new lints
We actually have an RFC from Oct 2014 specifying naming conventions for lints that is still relevant - https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#lints.
Unfortunately, human memory doesn't work for such prolonged periods of time, so a number of recently added edition-related lints don't follow the conventions.
This PR fixes names for those lints.
New lints stabilized in the last couple of releases, registered as renamed (old names still work with a warning):
- `single_use_lifetime` -> `single_use_lifetimes`
- `elided_lifetime_in_path` -> `elided_lifetimes_in_paths`
- `bare_trait_object` -> `bare_trait_objects`
- `unstable_name_collision` -> `unstable_name_collisions`
- `unused_doc_comment` -> `unused_doc_comments`
NOT changed, too old to rename:
- `const_err` -> `const_errors`
- `unused_allocation` -> `unused_allocations`
NOT changed, deprecation lints, no need to rename, they are going to be removed anyway:
- `invalid_type_param_default` -> `invalid_type_param_defaults`
- `missing_fragment_specifier` -> `missing_fragment_specifiers`
- `tyvar_behind_raw_pointer` -> `tyvars_behind_raw_pointer`
- `illegal_floating_point_literal_pattern` -> `illegal_floating_point_literal_patterns`
bors [Thu, 24 May 2018 23:10:18 +0000 (23:10 +0000)]
Auto merge of #50937 - nikomatsakis:chalkify-engine-2, r=scalexm
implement the chalk-engine traits
Preliminary implementation for the Chalk traits in rustc. Lots of `panic!()` placeholders to be filled in later.
This is currently blocked on us landing https://github.com/rust-lang-nursery/chalk/pull/131 in chalk and issuing a new release, which should occur later today.
bors [Thu, 24 May 2018 12:05:47 +0000 (12:05 +0000)]
Auto merge of #51023 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests
Successful merges:
- #50864 (Add NetBSD/arm target specs)
- #50956 (rust-gdb: work around the re-used -d argument in cgdb)
- #50964 (Make sure that queries have predictable symbol names.)
- #50965 (Update LLVM to pull in another wasm fix)
- #50972 (Add -Z no-parallel-llvm flag)
- #50979 (Fix span for type-only arguments)
- #50981 (Shrink `LiveNode`.)
- #50995 (move type out of unsafe block)
- #51011 ( rustdoc: hide macro export statements from docs)
kennytm [Thu, 24 May 2018 08:02:47 +0000 (16:02 +0800)]
Rollup merge of #51011 - QuietMisdreavus:duplicitous-macros, r=ollie27
rustdoc: hide macro export statements from docs
As mentioned in https://github.com/rust-lang/rust/issues/50647, rustdoc now prints both the import statement and the macro itself when re-exporting macros. This is a stopgap solution to clean up the std docs and get something small backported into beta.
What this does: When rustdoc finds an export statement for a macro, instead of printing the export and bailing, now it will instead hide the export and bail. Until we can solve https://github.com/rust-lang/rust/issues/34843 or have a better way to find the attributes on an export statement when inlining macros, this will at least match the current behavior and clean up the re-export statements from the docs.
kennytm [Thu, 24 May 2018 08:02:44 +0000 (16:02 +0800)]
Rollup merge of #50981 - nnethercote:shrink-LiveNode, r=nikomatsakis
Shrink `LiveNode`.
`Liveness::users` is a vector that is occasionally enormous. For
example, doing a "clean incremental" check build of `inflate`, there is
one instance that represents 5,499 live nodes and 1087 vars, which
requires 5,977,413 entries. At 24 bytes per entry, that is 143MB.
This patch changes LiveNode from a usize to a u32. On 64-bit machines
that halves the size of these entries, significantly reducing peak
memory usage and memory traffic, and speeding up "clean incremental"
builds of `inflate` by about 10%.
kennytm [Thu, 24 May 2018 08:02:41 +0000 (16:02 +0800)]
Rollup merge of #50972 - nikic:no-parallel, r=michaelwoerister
Add -Z no-parallel-llvm flag
Codegen issues commonly only manifest under specific circumstances,
e.g. if multiple codegen units are used and ThinLTO is enabled.
However, these configuration are threaded, making the use of LLVM
debugging facilities hard, as output is interleaved.
This patch adds a -Z no-parallel-llvm flag, which allows disabling
parallelization of codegen and linking, while otherwise preserving
behavior with regard to codegen units and LTO.
kennytm [Thu, 24 May 2018 08:02:39 +0000 (16:02 +0800)]
Rollup merge of #50964 - michaelwoerister:query-symbol-names, r=nikomatsakis
Make sure that queries have predictable symbol names.
Some recent refactorings led to query names not showing up in the corresponding symbol names. [perf-focus](https://github.com/nikomatsakis/perf-focus) and manual profiling have been broken by this. This PR makes sure that query providers always get their own symbol and that that symbol has a predictable name.
Since this adds `#[inline(never)]` to a function that wraps the provider call, let's check if this does not regress performance before merging.
kennytm [Thu, 24 May 2018 08:02:38 +0000 (16:02 +0800)]
Rollup merge of #50956 - atopia:rust-gdb-with-cdgb, r=nikomatsakis
rust-gdb: work around the re-used -d argument in cgdb
Use --directory= to pass $GDB_PYTHON_MODULE_DIRECTORY instead of -d, because [cgdb](https://github.com/cgdb/cgdb) reuses '-d' to select a debugger, whereas the long option works with both gdb and cgdb.
bors [Thu, 24 May 2018 07:14:21 +0000 (07:14 +0000)]
Auto merge of #50971 - alexcrichton:no-stringify, r=petrochenkov
rustc: Correctly pretty-print macro delimiters
This commit updates the `Mac_` AST structure to keep track of the delimiters
that it originally had for its invocation. This allows us to faithfully
pretty-print macro invocations not using parentheses (e.g. `vec![...]`). This in
turn helps procedural macros due to #43081.
bors [Wed, 23 May 2018 12:24:48 +0000 (12:24 +0000)]
Auto merge of #50866 - michaelwoerister:relocations-in-vec, r=oli-obk
Use different datastructure for MIRI relocations
This PR makes relocations in MIRI used a sorted vector instead of a `BTreeMap` which should make a few common operations more efficient. Let's see if that's true.
bors [Wed, 23 May 2018 09:50:54 +0000 (09:50 +0000)]
Auto merge of #50528 - whitfin:issue-50508, r=michaelwoerister
Remove attribute_cache from CrateMetadata
This PR will fix #50508 by removing the `attribute_cache` from the `CrateMetadata` struct. Seeing as performance was referenced in the original issue, I also cleaned up a `self.entry(node_id);` call which might have occasionally happened redundantly.
bors [Wed, 23 May 2018 07:15:34 +0000 (07:15 +0000)]
Auto merge of #50798 - bobtwinkles:nll_facts_invalidate, r=nikomatsakis
Generate "invalidates" facts when -Znll-facts is passed
Most of the new code is copied directly from the heart of the MIR borrowchecker. I was expecting more fundamental structural changes, hence the copying. This appears to work as it stands, but I'd like to submit a follow-up PR to reduce code duplication. I figured that could wait though, since this is blocking a large amount of work in the borrow check repository and I'm out of time for tonight =).
bors [Wed, 23 May 2018 02:44:08 +0000 (02:44 +0000)]
Auto merge of #50982 - alexcrichton:less-warnings, r=nikomatsakis
rustc: Fix another double-lint issue with `crate::`
This commit fixes another issue in the `absolute_path_not_starting_with_crate`
lint where it warns twice about an import which may contain `self`. It turns out
there were a few more locations that needed updating to use `root_id` and
`root_span` introduced in #50970 and after that it looks to work like a charm!