]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoRollup merge of #53267 - GuillaumeGomez:fix-styles, r=QuietMisdreavus
Guillaume Gomez [Sun, 12 Aug 2018 21:27:02 +0000 (23:27 +0200)]
Rollup merge of #53267 - GuillaumeGomez:fix-styles, r=QuietMisdreavus

Fix styles

Fixes #53262.

r? @QuietMisdreavus

5 years agoRollup merge of #53264 - Havvy:patch-3, r=GuillaumeGomez
Guillaume Gomez [Sun, 12 Aug 2018 21:27:01 +0000 (23:27 +0200)]
Rollup merge of #53264 - Havvy:patch-3, r=GuillaumeGomez

Show that Command can be reused and remodified

The prior documentation did not make it clear this was possible.

I wanted to make the `list_dir` example work on Windows, but I don't know if passing "/" will error or show the root of the current volume (e.g. `C:`).

r? @GuillaumeGomez

5 years agoRollup merge of #53253 - GuillaumeGomez:remove-console, r=kennytm
Guillaume Gomez [Sun, 12 Aug 2018 21:26:59 +0000 (23:26 +0200)]
Rollup merge of #53253 - GuillaumeGomez:remove-console, r=kennytm

Remove unwanted console log

Forgot to remove a `console.log`, now it's fixed.

r? @QuietMisdreavus

5 years agoRollup merge of #53240 - llogiq:doc-num-swap-reverse, r=joshtriplett
Guillaume Gomez [Sun, 12 Aug 2018 21:26:58 +0000 (23:26 +0200)]
Rollup merge of #53240 - llogiq:doc-num-swap-reverse, r=joshtriplett

Add individual documentation for <integer>`.swap_bytes`/.`reverse_bits`

5 years agoRollup merge of #53231 - GuillaumeGomez:let-keyword, r=QuietMisdreavus
Guillaume Gomez [Sun, 12 Aug 2018 21:26:57 +0000 (23:26 +0200)]
Rollup merge of #53231 - GuillaumeGomez:let-keyword, r=QuietMisdreavus

Add let keyword doc

Part of #34601.

r? @rust-lang/docs

5 years agoRollup merge of #53230 - memoryruins:nll_bootstrap_4, r=nikomatsakis
Guillaume Gomez [Sun, 12 Aug 2018 21:26:56 +0000 (23:26 +0200)]
Rollup merge of #53230 - memoryruins:nll_bootstrap_4, r=nikomatsakis

[nll] enable feature(nll) on various crates for bootstrap: part 4

#53172

r? @nikomatsakis

5 years agoRollup merge of #53223 - ljedrz:cleanup_data_structures, r=oli-obk
Guillaume Gomez [Sun, 12 Aug 2018 21:26:55 +0000 (23:26 +0200)]
Rollup merge of #53223 - ljedrz:cleanup_data_structures, r=oli-obk

A few cleanups for rustc_data_structures

- remove a redundant `clone()`
- make some calls to `.iter()` implicit
- collapse/simplify a few operations
- remove some explicit `return`s
- make `SnapshotMap::{commit, rollback_to}` take references
- remove unnecessary struct field names
- change `transmute()`s in `IdxSet::{from_slice, from_slice_mut}` to casts
- remove some unnecessary lifetime annotations
- split 2 long literals

5 years agoRollup merge of #53210 - alexcrichton:deny-rustc-syntax, r=nrc
Guillaume Gomez [Sun, 12 Aug 2018 21:26:54 +0000 (23:26 +0200)]
Rollup merge of #53210 - alexcrichton:deny-rustc-syntax, r=nrc

Deny future duplication of rustc-ap-syntax

Enable the tidy check to forbid this!

Closes #53006

5 years agoRollup merge of #53165 - jakllsch:netbsd-ad22a005-b917-47f3-8156-f717d36f6bbe, r...
Guillaume Gomez [Sun, 12 Aug 2018 21:26:52 +0000 (23:26 +0200)]
Rollup merge of #53165 - jakllsch:netbsd-ad22a005-b917-47f3-8156-f717d36f6bbe, r=estebank

 Add aarch64-unknown-netbsd target

Depends on #53116.

5 years agoRollup merge of #53059 - ljedrz:unneeded_returns, r=kennytm
Guillaume Gomez [Sun, 12 Aug 2018 21:26:51 +0000 (23:26 +0200)]
Rollup merge of #53059 - ljedrz:unneeded_returns, r=kennytm

Remove explicit returns where unnecessary

5 years agoRollup merge of #53025 - ljedrz:debug_asserts_limited, r=varkor
Guillaume Gomez [Sun, 12 Aug 2018 21:26:50 +0000 (23:26 +0200)]
Rollup merge of #53025 - ljedrz:debug_asserts_limited, r=varkor

Consider changing assert! to debug_assert! when it calls visit_with

The perf run from #52956 revealed that there were 3 benchmarks that benefited most from changing `assert!`s to `debug_assert!`s:

- issue #46449: avg -4.7% for -check
- deeply-nested (AKA #38528): avg -3.4% for -check
- regression #31157: avg -3.2% for -check

I analyzed their fixing PRs and decided to look for potentially heavy assertions in the files they modified. I noticed that all of the non-trivial ones contained indirect calls to `visit_with()`.

It might be a good idea to consider changing `assert!` to `debug_assert!` in those places in order to get the performance wins shown by the benchmarks.

5 years agoRollup merge of #53019 - ljedrz:bad_collects, r=estebank
Guillaume Gomez [Sun, 12 Aug 2018 21:26:49 +0000 (23:26 +0200)]
Rollup merge of #53019 - ljedrz:bad_collects, r=estebank

Don't collect() when size_hint is useless

This adjusts PRs #52738 and #52697 by falling back to calculating capacity and extending or pushing in a loop where `collect()` can't be trusted to calculate the right capacity.

It is a performance win.

5 years agoRollup merge of #52955 - tromey:compiler-test-docs, r=nikomatsakis
Guillaume Gomez [Sun, 12 Aug 2018 21:26:48 +0000 (23:26 +0200)]
Rollup merge of #52955 - tromey:compiler-test-docs, r=nikomatsakis

Update compiler test documentation

Update the compiler test documentation to document ignore-gdb-version
and min-system-llvm-version; and expand the min-gdb-version,
min-lldb-version, and min-llvm-version documentation a little.

5 years agoFix indent
Havvy (Ryan Scheel) [Sat, 11 Aug 2018 20:02:49 +0000 (13:02 -0700)]
Fix indent

5 years agoAdd let keyword doc
Guillaume Gomez [Sat, 11 Aug 2018 15:02:31 +0000 (17:02 +0200)]
Add let keyword doc

5 years agoShow that Command can be reused and remodified
Ryan Scheel [Sat, 11 Aug 2018 10:13:29 +0000 (03:13 -0700)]
Show that Command can be reused and remodified

The prior documentation did not make it clear this was possible.

5 years agoFix styles
Guillaume Gomez [Sat, 11 Aug 2018 11:34:15 +0000 (13:34 +0200)]
Fix styles

5 years agoaarch64-unknown-netbsd: add openssl configuration
Jonathan A. Kollasch [Fri, 10 Aug 2018 18:42:31 +0000 (13:42 -0500)]
aarch64-unknown-netbsd: add openssl configuration

5 years agoAuto merge of #53177 - nikomatsakis:nll-redundant-borrows-and-escaping-values, r...
bors [Fri, 10 Aug 2018 19:18:22 +0000 (19:18 +0000)]
Auto merge of #53177 - nikomatsakis:nll-redundant-borrows-and-escaping-values, r=pnkfelix

optimize redundant borrows and escaping paths in NLL

This builds on https://github.com/rust-lang/rust/pull/53168 and adds a commit that addresses https://github.com/rust-lang/rust/issues/53176 -- or at least I think it does. I marked this as WIP because I want to see the test results (and measure the performance). I also want to double check we're not adding in any unsoundness here.

5 years agoRemove unwanted console log
Guillaume Gomez [Fri, 10 Aug 2018 16:48:36 +0000 (18:48 +0200)]
Remove unwanted console log

5 years agoLink compiler test documentation to rustc-guide
Tom Tromey [Wed, 1 Aug 2018 17:36:28 +0000 (11:36 -0600)]
Link compiler test documentation to rustc-guide

Update the compiler test documentation to point to the relevant
rustc-guide page.

5 years ago[nll] librustc_codegen_llvm: remove unused mut annotation
memoryruins [Fri, 10 Aug 2018 10:31:40 +0000 (06:31 -0400)]
[nll] librustc_codegen_llvm: remove unused mut annotation

5 years ago[nll] librustc_codegen_llvm: change Child signature to fix error pointed out by nll
memoryruins [Fri, 10 Aug 2018 10:31:10 +0000 (06:31 -0400)]
[nll] librustc_codegen_llvm: change Child signature to fix error pointed out by nll

As explained by eddyb in #53221, "An &ArchiveChild doesn't point into the archive itself, it points to an owned object that itself points to the archive, and LLVMRustArchiveMemberNew copies the ArchiveChild (whereas the current signature suggests it keeps the &ArchiveChild)."

5 years ago[nll] librustc_codegen_llvm: enable feature(nll) for bootstrap
memoryruins [Fri, 10 Aug 2018 10:28:24 +0000 (06:28 -0400)]
[nll] librustc_codegen_llvm: enable feature(nll) for bootstrap

5 years ago[nll] librustc_mir: enable feature(nll) for bootstrap
memoryruins [Fri, 10 Aug 2018 10:27:35 +0000 (06:27 -0400)]
[nll] librustc_mir: enable feature(nll) for bootstrap

5 years ago[nll] libstd: enable feature(nll) for bootstrap
memoryruins [Fri, 10 Aug 2018 10:27:10 +0000 (06:27 -0400)]
[nll] libstd: enable feature(nll) for bootstrap

5 years agoAdd individual documentation for <integer>`.swap_bytes`/.`reverse_bits`
Andre Bogus [Fri, 10 Aug 2018 04:53:07 +0000 (06:53 +0200)]
Add individual documentation for <integer>`.swap_bytes`/.`reverse_bits`

5 years agodon't walk MIR if no local variables need liveness
Niko Matsakis [Fri, 10 Aug 2018 08:17:46 +0000 (04:17 -0400)]
don't walk MIR if no local variables need liveness

This is true for tuple-stress and html5ever

5 years agoAuto merge of #53131 - davidtwco:issue-52663-thread-local-static, r=nikomatsakis
bors [Fri, 10 Aug 2018 06:54:11 +0000 (06:54 +0000)]
Auto merge of #53131 - davidtwco:issue-52663-thread-local-static, r=nikomatsakis

NLL says something "does not live long enough" when talking about a (thread-local) static

Part of #52663.

r? @nikomatsakis

5 years agoConsider changing assert! to debug_assert! when it calls visit_with
ljedrz [Fri, 3 Aug 2018 11:19:17 +0000 (13:19 +0200)]
Consider changing assert! to debug_assert! when it calls visit_with

5 years agoAuto merge of #53124 - davidtwco:issue-52742, r=nikomatsakis
bors [Fri, 10 Aug 2018 02:18:21 +0000 (02:18 +0000)]
Auto merge of #53124 - davidtwco:issue-52742, r=nikomatsakis

region error messages involving impls are confusing

Part of #52742.

r? @nikomatsakis

5 years agoAuto merge of #53073 - Mark-Simulacrum:data-structures, r=pnkfelix
bors [Fri, 10 Aug 2018 00:14:52 +0000 (00:14 +0000)]
Auto merge of #53073 - Mark-Simulacrum:data-structures, r=pnkfelix

Cleanup to librustc::session and related code

No functional changes, just some cleanup.

This also creates the `rustc_fs_util` crate, but I can remove that change if desired. It felt a little odd to force crates to depend on librustc for some fs utilities; and also seemed good to generally keep the size of librustc lower (for compile times); fs_util will compile in parallel with essentially the first crate since it has no dependencies beyond std.

5 years agoAuto merge of #52788 - LukasKalbertodt:improve-index-mut-error, r=estebank
bors [Thu, 9 Aug 2018 22:05:18 +0000 (22:05 +0000)]
Auto merge of #52788 - LukasKalbertodt:improve-index-mut-error, r=estebank

Add help message for missing `IndexMut` impl

Code:
```rust
let mut map = HashMap::new();
map.insert("peter", 23);
map["peter"] = 27;
```

Before:
```
error[E0594]: cannot assign to immutable indexed content
 --> src/main.rs:7:5
  |
7 |     map["peter"] = 27;
  |     ^^^^^^^^^^^^^^^^^ cannot borrow as mutable
```

With this change (just the `help` was added):
```
error[E0594]: cannot assign to immutable indexed content
 --> index-error.rs:7:5
  |
7 |     map["peter"] = 27;
  |     ^^^^^^^^^^^^^^^^^ cannot borrow as mutable
  |
  = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for std::collections::HashMap<&str, i32>
```

---

Yesterday I did some pair programming with a Rust-beginner. We created a type and implemented `Index` for it. Trying to modify the value returned by the index operation returns in a rather vague error that was not very clear for the Rust beginner. So I tried to improve the situation.

## Notes/questions for reviewers:
- Is the formulation OK like that? I'm fine with changing it.
- Can we be absolutely sure that `IndexMut` is actually not implemented in the case my `help` message is added? I'm fairly sure myself, but there could be some cases I didn't think of. Also, I don't know the compiler very well, so I don't know what exactly certain enum variants are used for.
  - It would be nice to test if `IndexMut` is in fact not implemented for the type, but I couldn't figure out how to check that. If you think that additional check would be beneficial, could you tell me how to check if a trait is implemented?
- Do you think I should change the error message instead of only adding an additional help message?

5 years ago[nll] librustc_data_structures: remove unused mut annotation in test
memoryruins [Thu, 9 Aug 2018 21:31:15 +0000 (17:31 -0400)]
[nll] librustc_data_structures: remove unused mut annotation in test

5 years ago[nll] librustdoc: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 19:35:06 +0000 (15:35 -0400)]
[nll] librustdoc: enable feature(nll) for bootstrap

5 years ago[nll] librustc_typeck: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 19:34:54 +0000 (15:34 -0400)]
[nll] librustc_typeck: enable feature(nll) for bootstrap

5 years ago[nll] librustc_platform_intrinsics: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 19:34:31 +0000 (15:34 -0400)]
[nll] librustc_platform_intrinsics: enable feature(nll) for bootstrap

5 years ago[nll] librustc_msan: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 19:34:05 +0000 (15:34 -0400)]
[nll] librustc_msan: enable feature(nll) for bootstrap

5 years ago[nll] librustc_lsan: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 19:33:50 +0000 (15:33 -0400)]
[nll] librustc_lsan: enable feature(nll) for bootstrap

5 years ago[nll] librustc_llvm: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 19:33:24 +0000 (15:33 -0400)]
[nll] librustc_llvm: enable feature(nll) for bootstrap

5 years ago[nll] librustc_codegen_utils: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 19:33:06 +0000 (15:33 -0400)]
[nll] librustc_codegen_utils: enable feature(nll) for bootstrap

5 years ago[nll] libproc_macro: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 19:32:45 +0000 (15:32 -0400)]
[nll] libproc_macro: enable feature(nll) for bootstrap

5 years ago[nll] libsyntax_ext: remove unnecessary mut annotation on variable
memoryruins [Thu, 9 Aug 2018 19:32:23 +0000 (15:32 -0400)]
[nll] libsyntax_ext: remove unnecessary mut annotation on variable

Pointed out by nll. It is correct that the mut annotation is not needed.

5 years ago[nll] libsyntax_ext: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 19:28:39 +0000 (15:28 -0400)]
[nll] libsyntax_ext: enable feature(nll) for bootstrap

5 years agoAuto merge of #53216 - kennytm:rollup, r=kennytm
bors [Thu, 9 Aug 2018 19:05:14 +0000 (19:05 +0000)]
Auto merge of #53216 - kennytm:rollup, r=kennytm

Rollup of 15 pull requests

Successful merges:

 - #52773 (Avoid unnecessary pattern matching against Option and Result)
 - #53082 (Fix doc link (again))
 - #53094 (Automatically expand section if url id point to one of its component)
 - #53106 (atomic ordering docs)
 - #53110 (Account for --remap-path-prefix in save-analysis)
 - #53116 (NetBSD: fix signedess of char)
 - #53179 (Whitelist wasm32 simd128 target feature)
 - #53183 (Suggest comma when missing in macro call)
 - #53207 (Add individual docs for rotate_{left, right})
 - #53211 ([nll] enable feature(nll) on various crates for bootstrap)
 - #53214 ([nll] enable feature(nll) on various crates for bootstrap: part 2)
 - #53215 (Slightly refactor syntax_ext/format)
 - #53217 (inline some short functions)
 - #53219 ([nll] enable feature(nll) on various crates for bootstrap: part 3)
 - #53222 (A few cleanups for rustc_target)

5 years agoRollup merge of #53207 - llogiq:num-rotate-docs, r=QuietMisdreavus
kennytm [Thu, 9 Aug 2018 17:55:31 +0000 (01:55 +0800)]
Rollup merge of #53207 - llogiq:num-rotate-docs, r=QuietMisdreavus

Add individual docs for rotate_{left, right}

5 years agoA few cleanups for rustc_data_structures
ljedrz [Thu, 9 Aug 2018 15:00:14 +0000 (17:00 +0200)]
A few cleanups for rustc_data_structures

5 years agoChange transmute()s in IdxSet::{from_slice, from_slice_mut} to casts
ljedrz [Thu, 9 Aug 2018 14:59:10 +0000 (16:59 +0200)]
Change transmute()s in IdxSet::{from_slice, from_slice_mut} to casts

5 years agoMake SnapshotMap::{commit, rollback_to} take references
ljedrz [Thu, 9 Aug 2018 14:57:55 +0000 (16:57 +0200)]
Make SnapshotMap::{commit, rollback_to} take references

5 years agoRollup merge of #53222 - ljedrz:cleanup_rustc_target, r=Mark-Simulacrum
kennytm [Thu, 9 Aug 2018 17:04:10 +0000 (01:04 +0800)]
Rollup merge of #53222 - ljedrz:cleanup_rustc_target, r=Mark-Simulacrum

A few cleanups for rustc_target

- remove redundant struct field names
- shorten a self-assignment
- prefer `unwrap_or_else` in case of function calls
- collapse an `if`
- collapse a double `map()`
- match on dereferenced objects
- consume `self` if it implements `Copy`

5 years agoRollup merge of #53215 - ljedrz:refactor_format, r=estebank
kennytm [Thu, 9 Aug 2018 17:03:45 +0000 (01:03 +0800)]
Rollup merge of #53215 - ljedrz:refactor_format, r=estebank

Slightly refactor syntax_ext/format

expand_preparsed_format_args:
- move a potential error `return` earlier in the processing
- pre-allocate some of the required space for `cx.pieces` and `cx.str_pieces`
- create `cx`-independent objects before `cx`
- build `pieces` and `errs` using `collect` instead of a `push` loop

describe_num_args:
- return `Cow<str>` instead of `String`

5 years agoRollup merge of #53219 - memoryruins:nll_bootstrap_3, r=nikomatsakis
kennytm [Thu, 9 Aug 2018 13:35:35 +0000 (21:35 +0800)]
Rollup merge of #53219 - memoryruins:nll_bootstrap_3, r=nikomatsakis

[nll] enable feature(nll) on various crates for bootstrap: part 3

#53172

5 years agoRollup merge of #53214 - memoryruins:nll_bootstrap_2, r=nikomatsakis
kennytm [Thu, 9 Aug 2018 13:35:23 +0000 (21:35 +0800)]
Rollup merge of #53214 - memoryruins:nll_bootstrap_2, r=nikomatsakis

[nll] enable feature(nll) on various crates for bootstrap: part 2

#53172

5 years agoRollup merge of #53211 - memoryruins:nll_bootstrap, r=nikomatsakis
kennytm [Thu, 9 Aug 2018 13:35:01 +0000 (21:35 +0800)]
Rollup merge of #53211 - memoryruins:nll_bootstrap, r=nikomatsakis

[nll] enable feature(nll) on various crates for bootstrap

#53172

5 years agoRollup merge of #53082 - felixrabe:fix-doc-link-again, r=GuillaumeGomez
kennytm [Thu, 9 Aug 2018 13:34:36 +0000 (21:34 +0800)]
Rollup merge of #53082 - felixrabe:fix-doc-link-again, r=GuillaumeGomez

Fix doc link (again)

Similar to #52404. The link for comparison:

-   https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized (broken)

-   https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait (correct, stable 2nd ed)

-   https://doc.rust-lang.org/nightly/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait (correct, nightly 2nd ed)

-   https://doc.rust-lang.org/nightly/book/2018-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait (correct, nightly 2018 ed)

This commit is the result of (first) searching via ripgrep (0.8.1 -SIMD -AVX):

    rg -l dynamically-sized-types-and-sized

and then replacing all relevant occurrences via:

    find src/{libcore,test/ui} -type f -print0 | xargs -0 sed -i.bak \
      s/dynamically-sized-types-and-sized/dynamically-sized-types-and-the-sized-trait/g
    find src/{libcore,test/ui} -type f -name '*.bak' -print0 | xargs -0 rm

(Note: Tested on on macOS 10.13 (BSD). `sed -i.bak` should work on Linux
(GNU sed) as well, but not tested.)

5 years agoRollup merge of #53217 - strake:inline, r=nagisa
kennytm [Thu, 9 Aug 2018 13:33:49 +0000 (21:33 +0800)]
Rollup merge of #53217 - strake:inline, r=nagisa

inline some short functions

I found these were outline in binaries i link. I think they ought to be inline, considering their size.

5 years agoRollup merge of #53106 - RalfJung:ordering, r=stjepang
kennytm [Thu, 9 Aug 2018 13:31:41 +0000 (21:31 +0800)]
Rollup merge of #53106 - RalfJung:ordering, r=stjepang

atomic ordering docs

Discussion in https://github.com/rust-lang/rfcs/pull/2503 revealed that this could be improved. I hope this helps.

5 years agoRollup merge of #53183 - estebank:println-comma, r=oli-obk
kennytm [Thu, 9 Aug 2018 08:58:49 +0000 (16:58 +0800)]
Rollup merge of #53183 - estebank:println-comma, r=oli-obk

Suggest comma when missing in macro call

When missing a comma in a macro call, suggest it, regardless of
position. When a macro call doesn't match any of the patterns, check
if the call's token stream could be missing a comma between two idents,
and if so, create a new token stream containing the comma and try to
match against the macro patterns. If successful, emit the suggestion.

This works on arbitrary macros, with no need of special support from
the macro writers.

```
error: no rules expected the token `d`
  --> $DIR/missing-comma.rs:26:18
   |
LL |     foo!(a, b, c d, e);
   |                 -^
   |                 |
   |                 help: missing comma here
```
Follow up to #52397.

5 years agoRollup merge of #53179 - gnzlbg:patch-3, r=alexcrichton
kennytm [Thu, 9 Aug 2018 08:58:48 +0000 (16:58 +0800)]
Rollup merge of #53179 - gnzlbg:patch-3, r=alexcrichton

Whitelist wasm32 simd128 target feature

r? @alexcrichton

5 years agoMove span_bug and bug helper functions to util
Mark Rousskov [Sat, 4 Aug 2018 12:51:33 +0000 (06:51 -0600)]
Move span_bug and bug helper functions to util

5 years agoCache ignored attributes inside ICH entirely
Mark Rousskov [Sat, 4 Aug 2018 00:39:28 +0000 (18:39 -0600)]
Cache ignored attributes inside ICH entirely

5 years agoMove Fingerprint to data structures
Mark Rousskov [Sat, 4 Aug 2018 00:34:23 +0000 (18:34 -0600)]
Move Fingerprint to data structures

5 years agoReuse Hash impls for session data structures
Mark Rousskov [Fri, 3 Aug 2018 22:41:30 +0000 (16:41 -0600)]
Reuse Hash impls for session data structures

5 years agoRemove dependency on rustc::ty from code_stats
Mark Rousskov [Fri, 3 Aug 2018 22:10:33 +0000 (16:10 -0600)]
Remove dependency on rustc::ty from code_stats

5 years agoMove path2cstr to rustc_fs_util
Mark Rousskov [Fri, 3 Aug 2018 21:37:15 +0000 (15:37 -0600)]
Move path2cstr to rustc_fs_util

5 years agoMove rustc::util::fs into separate (new) crate
Mark Rousskov [Fri, 3 Aug 2018 21:31:03 +0000 (15:31 -0600)]
Move rustc::util::fs into separate (new) crate

5 years agoMove SVH structure to data structures
Mark Rousskov [Fri, 3 Aug 2018 18:22:22 +0000 (12:22 -0600)]
Move SVH structure to data structures

5 years agoAdd individual docs for rotate_{left, right}
Andre Bogus [Wed, 8 Aug 2018 21:42:33 +0000 (23:42 +0200)]
Add individual docs for rotate_{left, right}

5 years agoDeny future duplication of rustc-ap-syntax
Alex Crichton [Thu, 9 Aug 2018 04:42:26 +0000 (21:42 -0700)]
Deny future duplication of rustc-ap-syntax

Enable the tidy check to forbid this!

Closes #53006

5 years agoA few cleanups for rustc_target
ljedrz [Thu, 9 Aug 2018 13:42:43 +0000 (15:42 +0200)]
A few cleanups for rustc_target

5 years ago[nll] libtest: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 13:22:45 +0000 (09:22 -0400)]
[nll] libtest: enable feature(nll) for bootstrap

5 years ago[nll] libsyntax: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 13:22:33 +0000 (09:22 -0400)]
[nll] libsyntax: enable feature(nll) for bootstrap

5 years ago[nll] libserialize: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 13:22:08 +0000 (09:22 -0400)]
[nll] libserialize: enable feature(nll) for bootstrap

5 years ago[nll] librustc_data_structures: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 13:21:23 +0000 (09:21 -0400)]
[nll] librustc_data_structures: enable feature(nll) for bootstrap

5 years ago[nll] librustc_allocator: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 13:21:01 +0000 (09:21 -0400)]
[nll] librustc_allocator: enable feature(nll) for bootstrap

5 years ago[nll] librustc: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 13:20:41 +0000 (09:20 -0400)]
[nll] librustc: enable feature(nll) for bootstrap

5 years ago[nll] libprofiler_builtins: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 13:20:20 +0000 (09:20 -0400)]
[nll] libprofiler_builtins: enable feature(nll) for bootstrap

5 years agoAuto merge of #53031 - michaelwoerister:cross-lto, r=alexcrichton
bors [Thu, 9 Aug 2018 13:20:14 +0000 (13:20 +0000)]
Auto merge of #53031 - michaelwoerister:cross-lto, r=alexcrichton

Apply some fixes to cross-language LTO (especially when targeting MSVC)

This PR contains a few fixes that were needed in order to get Firefox compiling with Rust/C++ cross-language ThinLTO on Windows. The commits are self-contained and should be self-explanatory.

r? @alexcrichton

5 years ago[nll] libcore: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 13:19:53 +0000 (09:19 -0400)]
[nll] libcore: enable feature(nll) for bootstrap

5 years ago[nll] libunwind: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 10:52:12 +0000 (06:52 -0400)]
[nll] libunwind: enable feature(nll) for bootstrap

5 years ago[nll] libterm: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 10:51:56 +0000 (06:51 -0400)]
[nll] libterm: enable feature(nll) for bootstrap

5 years ago[nll] libsyntax_pos: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 10:51:42 +0000 (06:51 -0400)]
[nll] libsyntax_pos: enable feature(nll) for bootstrap

5 years ago[nll] librustc_target: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 10:51:13 +0000 (06:51 -0400)]
[nll] librustc_target: enable feature(nll) for bootstrap

5 years ago[nll] librustc_incremental: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 10:50:57 +0000 (06:50 -0400)]
[nll] librustc_incremental: enable feature(nll) for bootstrap

5 years ago[nll] librustc_driver: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 10:50:40 +0000 (06:50 -0400)]
[nll] librustc_driver: enable feature(nll) for bootstrap

5 years ago[nll] librustc_cratesio_shim: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 10:50:25 +0000 (06:50 -0400)]
[nll] librustc_cratesio_shim: enable feature(nll) for bootstrap

5 years ago[nll] librustc_apfloat: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 10:49:31 +0000 (06:49 -0400)]
[nll] librustc_apfloat: enable feature(nll) for bootstrap

5 years ago[nll] libpanic_unwind: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 10:49:12 +0000 (06:49 -0400)]
[nll] libpanic_unwind: enable feature(nll) for bootstrap

5 years ago[nll] libpanic_abort: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 10:48:53 +0000 (06:48 -0400)]
[nll] libpanic_abort: enable feature(nll) for bootstrap

5 years ago[nll] libfmt_macros: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 10:48:10 +0000 (06:48 -0400)]
[nll] libfmt_macros: enable feature(nll) for bootstrap

5 years agoUpdated tests after rebase.
David Wood [Thu, 9 Aug 2018 10:03:20 +0000 (12:03 +0200)]
Updated tests after rebase.

5 years agoinline some short functions
M Farkas-Dyck [Thu, 9 Aug 2018 09:27:48 +0000 (01:27 -0800)]
inline some short functions

5 years agoRollup merge of #53116 - jakllsch:netbsd-unsigned-char, r=alexcrichton
kennytm [Thu, 9 Aug 2018 08:58:44 +0000 (16:58 +0800)]
Rollup merge of #53116 - jakllsch:netbsd-unsigned-char, r=alexcrichton

NetBSD: fix signedess of char

5 years agoRollup merge of #53110 - Xanewok:save-analysis-remap-path, r=nrc
kennytm [Thu, 9 Aug 2018 08:58:42 +0000 (16:58 +0800)]
Rollup merge of #53110 - Xanewok:save-analysis-remap-path, r=nrc

Account for --remap-path-prefix in save-analysis

Fixes #52549.

Didn't add a test since save-analysis is still unstable, only tested this locally. Should I add a test for that? If so, is run-make-fulldeps an appropriate format?

Session is already created with remapped working directory, so use that instead of the actual cwd.
This was the only place affected, since the rest of the paths in save-analysis are directly derived from files in spans from `sess.codemap()`, which already creates remapped ones.

r? @nrc

5 years agoRollup merge of #53094 - GuillaumeGomez:automatic-expand, r=nrc
kennytm [Thu, 9 Aug 2018 08:58:41 +0000 (16:58 +0800)]
Rollup merge of #53094 - GuillaumeGomez:automatic-expand, r=nrc

Automatically expand section if url id point to one of its component

Fixes #52517.

r? @nrc

5 years agoRollup merge of #52773 - ljedrz:unncecessary_patterns, r=nikomatsakis
kennytm [Thu, 9 Aug 2018 08:58:39 +0000 (16:58 +0800)]
Rollup merge of #52773 - ljedrz:unncecessary_patterns, r=nikomatsakis

Avoid unnecessary pattern matching against Option and Result

5 years agoFallback to 'has type' error messages rather than 'lifetime appears in type'.
David Wood [Mon, 6 Aug 2018 21:09:36 +0000 (23:09 +0200)]
Fallback to 'has type' error messages rather than 'lifetime appears in type'.

5 years agoCorrectly identify named early bound regions.
David Wood [Mon, 6 Aug 2018 19:15:15 +0000 (21:15 +0200)]
Correctly identify named early bound regions.

5 years ago[nll] librustc_tsan: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 08:11:06 +0000 (04:11 -0400)]
[nll] librustc_tsan: enable feature(nll) for bootstrap

5 years ago[nll] librustc_traits: enable feature(nll) for bootstrap
memoryruins [Thu, 9 Aug 2018 08:10:46 +0000 (04:10 -0400)]
[nll] librustc_traits: enable feature(nll) for bootstrap