Commit graph

86875 commits

Author SHA1 Message Date
Pietro Albini
21ba28f1c6
Rollup merge of #56424 - mark-i-m:explain-raw, r=Centril
Mention raw-ident syntax

According to https://github.com/rust-lang/rust/pull/56419#pullrequestreview-180542790

Blocked on #56419

r? @Centril
2018-12-05 23:54:29 +01:00
Pietro Albini
b6e2fc9aff
Rollup merge of #56388 - matthewjasper:more-lexical-mir-cleanup, r=nikomatsakis
More MIR borrow check cleanup

* Fix some rustc doc links
* Remove the `region_map` field from `BorrowSet`
*  Use `visit_local` to find 2PB activations

r? @nikomatsakis
2018-12-05 23:54:28 +01:00
Pietro Albini
b2a002dc4b
Rollup merge of #56372 - wildarch:issue-55314-second-borrow-ref, r=davidtwco
Refer to the second borrow as the "second borrow" in E0501.rs

Fixes #55314.

r? @davidtwco
2018-12-05 23:54:27 +01:00
Pietro Albini
64371f1cfe
Rollup merge of #56119 - frewsxcv:frewsxcv-option-carrier, r=TimNN
Utilize `?` instead of `return None`.

None
2018-12-05 23:54:25 +01:00
Pietro Albini
1594a4245b
Rollup merge of #55987 - Thomasdezeeuw:weak-ptr_eq, r=sfackler
Add Weak.ptr_eq

I hope the doc tests alone are good enough.

We also might want to discuss the dangling pointer case (from `Weak::new()`).

Updates #55981.
2018-12-05 23:54:24 +01:00
Pietro Albini
66ba6b3a66
Rollup merge of #55563 - GuillaumeGomez:doc-search-sentence, r=QuietMisdreavus
Improve no result found sentence in doc search

Fixes #55531.

Look:

<img width="1440" alt="screenshot 2018-11-01 at 02 21 56" src="https://user-images.githubusercontent.com/3050060/47827257-f6236c80-dd7c-11e8-9ea9-99c8cb4b2de5.png">

r? @QuietMisdreavus
2018-12-05 23:54:22 +01:00
Pietro Albini
159886863b
Rollup merge of #51753 - gruberb:document-from-conversions-libstdpath, r=QuietMisdreavus
Document `From` implementations

This PR is solves part of https://github.com/rust-lang/rust/issues/51430. It's my first PR, so I might need some guidance from @skade (as already mentioned in the issue).

The purpose of the PR is to document the `impl From` inside `path.rs` and answering the questions:
- What does it convert?
- Does it allocate memory?
- How expensive are the allocations?

I gave it a first shot, though an experienced rust developer might want to look over it.
2018-12-05 23:54:21 +01:00
bors
b866f7d258 Auto merge of #56535 - matthiaskrgr:clippy, r=oli-obk
submodules: update clippy from b2601beb to 29bf75cd

Changes:
````
Fix ty::TyKind usage
Fix TyKind::<kind> usage in codebase
Extract single_match_else UI test
cargo fmt
Adds inequality cases to bool comparison lint
Remove unsafe_vector_initialization lint
Fix wildcard_dependencies false positive
Fix rustfmt format
Disable incremental build for windows
Travis: Add rustc sysroot bin to PATH for windows build
Fix some nursery links
Enforce LF lineendings for everything
Mention triage procedure in contributing.md
Keep testing large_digit_groups as ui test
Keep testing unsafe_vector_initialization as ui test
Downgrade large_digit_groups to pedantic
Downgrade unsafe_vector_initialization to restriction
remove macro_at_most_once_rep feature attribute since it's stable
Add missing word
Update docs in regards to the merged RFC
Document how to run rustfmt in CONTRIBUTING.md
Don't run integration tests in forks
Fix some formatting issues
Run rustfmt on clippy_lints
Run rustfmt on build.rs
Run rustfmt on clippy_dev
Run rustfmt on rustc_tools_util
Run rustfmt on src
Run rustfmt on the tests
Let travis run cargo fmt --all -- --check
Error on line overflow
````

No need to increase priority, please just rollup :)
2018-12-05 17:54:17 +00:00
Matthias Krüger
dc0bbd0b31 submodules: update clippy from b2601beb to 29bf75cd
Changes:
````
Fix ty::TyKind usage
Fix TyKind::<kind> usage in codebase
Extract single_match_else UI test
cargo fmt
Adds inequality cases to bool comparison lint
Remove unsafe_vector_initialization lint
Fix wildcard_dependencies false positive
Fix rustfmt format
Disable incremental build for windows
Travis: Add rustc sysroot bin to PATH for windows build
Fix some nursery links
Enforce LF lineendings for everything
Mention triage procedure in contributing.md
Keep testing large_digit_groups as ui test
Keep testing unsafe_vector_initialization as ui test
Downgrade large_digit_groups to pedantic
Downgrade unsafe_vector_initialization to restriction
remove macro_at_most_once_rep feature attribute since it's stable
Add missing word
Update docs in regards to the merged RFC
Document how to run rustfmt in CONTRIBUTING.md
Don't run integration tests in forks
Fix some formatting issues
Run rustfmt on clippy_lints
Run rustfmt on build.rs
Run rustfmt on clippy_dev
Run rustfmt on rustc_tools_util
Run rustfmt on src
Run rustfmt on the tests
Let travis run cargo fmt --all -- --check
Error on line overflow
````
2018-12-05 15:31:30 +01:00
bors
93ac09c3b5 Auto merge of #55466 - sinkuu:cleanup, r=petrochenkov
syntax: Use iterator and pattern APIs instead of `char_at`

Iterating over chars with the `char_at(str, i)` `i += ch.len_utf8()` loop seems unidiomatic.
2018-12-05 13:56:07 +00:00
bors
21cb46a6e9 Auto merge of #55922 - oli-obk:slice_pat_ice, r=zackmdavis
Fix ICE in `const` slice patterns

fixes #55911

based on https://github.com/rust-lang/rust/pull/55915

New commits start at eabc1551e0d0953f1951020afb5919ab4c129cf5
2018-12-05 07:16:17 +00:00
Shotaro Yamada
f423ff7be8 Fix pretty test 2018-12-05 12:15:28 +09:00
bors
d8046ed51a Auto merge of #56519 - steveklabnik:edition-guide, r=pietroalbini
update edition guide

spiritual successor to https://github.com/rust-lang/rust/pull/56457

not to be backported, being in nightly is enough.

i'm testing this locally now but figure travis can test it in parallel
2018-12-05 02:24:35 +00:00
Steve Klabnik
6b0ac4987a build the edition guide
and update it so that links are correct
2018-12-04 17:06:16 -05:00
bors
b3af09205b Auto merge of #56486 - matthewjasper:propagate-all-closure-bounds, r=pnkfelix
Propagate all closure requirements to the caller

Closes #56477

This should be backported to 1.32 if it doesn't make the cut.

r? @pnkfelix
cc @nikomatsakis
2018-12-04 20:56:11 +00:00
Matthew Jasper
b2e6da7a7f Call methods on the right tcx
There are two `TyCtxt`s, one global, one local. Methods must be called
on the right one, as they differ by invariant lifetimes.
2018-12-04 19:52:47 +00:00
Corey Farwell
9012af6f19 Utilize ? instead of return None. 2018-12-04 08:57:34 -08:00
bors
906deae079 Auto merge of #56244 - oli-obk:loud_ui_errors, r=nikomatsakis
Report failing tests without `//~ ERROR` comments

r? @nikomatsakis
2018-12-04 16:26:18 +00:00
bors
431e0ab62f Auto merge of #55871 - ljedrz:llvm_back_allocations, r=nagisa
codegen_llvm_back: improve allocations

This commit was split out from https://github.com/rust-lang/rust/pull/54864. Last time it was causing an LLVM OOM, which was most probably caused by not collecting the globals.

- preallocate vectors of known length
- `extend` instead of `append` where the argument is consumable
- turn 2 `push` loops into `extend`s
- create a vector from a function producing one instead of using `extend_from_slice` on it
- consume `modules` when no longer needed
- ~~return an `impl Iterator` from `generate_lto_work`~~
- ~~don't `collect` `globals`, as they are iterated over and consumed right afterwards~~

While I'm hoping it won't cause an OOM anymore, I would still consider this a "high-risk" PR and not roll it up.
2018-12-04 11:47:07 +00:00
bors
58e9832a0d Auto merge of #56224 - ehuss:update-cargo, r=alexcrichton
Update cargo, rls

26 commits in b3d0b2e545b61d4cd08096911724b7d49d213f73..5e85ba14aaa20f8133863373404cb0af69eeef2c
2018-11-15 19:13:04 +0000 to 2018-12-02 14:37:25 +0000
- ConflictStoreTrie: Faster filtered search (rust-lang/cargo#6366)
- Remove `cmake` as a requirement (rust-lang/cargo#6368)
- progress: display "Downloading 1 crate" instead of "Downloading 1 crates" (rust-lang/cargo#6369)
- Use expect over unwrap, for panic-in-panic aborts (rust-lang/cargo#6364)
- Switch to pretty_env_logger, under --features pretty-env-logger (rust-lang/cargo#6362)
- use allow-dirty option in `cargo package` to skip vcs checks (rust-lang/cargo#6280)
- remove clones made redundant by Intern PackageId (rust-lang/cargo#6352)
- docs: correct profile usage of `cargo test --release` (rust-lang/cargo#6345)
- Improve doc for `cargo install` (rust-lang/cargo#6354)
- Intern PackageId (rust-lang/cargo#6332)
- Clean only release artifacts if --release option is set (rust-lang/cargo#6349)
- remove clones made redundant by Intern SourceId (rust-lang/cargo#6347)
- Intern SourceId (rust-lang/cargo#6342)
- Tweak Layout to allow for non json file targets with internal "." (rust-lang/cargo#6255)
- Correct Target Directory command-line option (rust-lang/cargo#6343)
- Persistent data structures by im-rs (rust-lang/cargo#6336)
- Move command prelude into main library (rust-lang/cargo#6335)
- Distinguish custom build invocations (rust-lang/cargo#6331)
- Allow crate_type=bin examples to run (rust-lang/cargo#6330)
- Make verify-project honour unstable features (rust-lang/cargo#6326)
- Make autodiscovery disable inferred targets (rust-lang/cargo#6329)
- Add `c` alias for `check` (rust-lang/cargo#6218)
- Allow user aliases to override built-in aliases (rust-lang/cargo#6259)
- Fix renaming directory project using build scripts with cross-compiling. (rust-lang/cargo#6328)
- Fix add_plugin_deps-related tests. (rust-lang/cargo#6327)
- Add a glossary. (rust-lang/cargo#6321)
2018-12-04 09:21:21 +00:00
Bastian Gruber
450a8a6f35 Add extra comment slash 2018-12-04 10:10:07 +01:00
Oliver Scherer
ff97569dd9 Update doc-ui tests 2018-12-04 10:06:05 +01:00
Oliver Scherer
690439bb45 Update ui tests 2018-12-04 10:06:05 +01:00
Oliver Scherer
374a096cb1 Remove unused stderr file 2018-12-04 10:06:05 +01:00
Oliver Scherer
1b636b1cd9 Newlines.... newlines everywhere 2018-12-04 10:06:05 +01:00
Oliver Scherer
296398ab52 Add a test ensuring that we don't regress this 2018-12-04 10:06:05 +01:00
Oliver Scherer
61efc3b71b Update tests 2018-12-04 10:06:05 +01:00
Oliver Scherer
2664aadaa2 Report failing tests without //~ ERROR comments 2018-12-04 10:05:27 +01:00
bors
596e10fd32 Auto merge of #55707 - GuillaumeGomez:file-sidebar, r=QuietMisdreavus
Add source file sidebar

This is just a start currently but that gives a good overview of what it'll look like:

<img width="1440" alt="screenshot 2018-11-06 at 01 39 15" src="https://user-images.githubusercontent.com/3050060/48035592-05336180-e165-11e8-82e1-5ead0c345eb9.png">

r? @QuietMisdreavus
2018-12-04 07:00:19 +00:00
bors
91d5d56c00 Auto merge of #55682 - GuillaumeGomez:primitive-sidebar-link-gen, r=QuietMisdreavus
Fixes primitive sidebar link generation

Fixes #50746.
Fixes #55656.

r? @QuietMisdreavus
2018-12-04 03:34:32 +00:00
bors
5912a690e0 Auto merge of #56467 - oli-obk:osx_stack_bump, r=nagisa
Bump stack size to 32MB

cc https://github.com/rust-lang/rust/issues/55471

A short term solution (really this time! Full fix being grown in https://github.com/rust-lang/rust/pull/55617) for stack overflows due to deeply recursive syntax trees.

r? @nagisa

cc @alexcrichton @eddyb @michaelwoerister @pietroalbini
2018-12-04 01:03:17 +00:00
Shotaro Yamada
4e3128223b Fix test 2018-12-04 09:28:14 +09:00
Shotaro Yamada
11af6f66cb Use iterator and pattern APIs instead of char_at 2018-12-04 09:27:24 +09:00
Matthew Jasper
d748712521 Propagate all closure requirements to the caller 2018-12-03 23:17:02 +00:00
bors
c8ae2de836 Auto merge of #55041 - evq:thumbv8m, r=alexcrichton
targets: thumbv8m: Add target for baseline ARMv8-M

Tested against a SAM L11 MCU.
2018-12-03 22:38:18 +00:00
Guillaume Gomez
82a7b6fde8 Don't generate suffix for source-file.js 2018-12-03 22:37:34 +01:00
Mark Mansi
0b40be696e link to raw identifiers 2018-12-03 13:05:04 -06:00
Mark Mansi
9c8802dc01 Explain raw identifer syntax 2018-12-03 13:05:04 -06:00
Oliver Scherer
db64f60b1d Bump stack size to 32MB 2018-12-03 17:38:04 +01:00
bors
0c999ed132 Auto merge of #56451 - kennytm:rollup, r=kennytm
Rollup of 13 pull requests

Successful merges:

 - #56141 ([std] Osstr len clarity)
 - #56366 (Stabilize self_in_typedefs feature)
 - #56395 (Stabilize dbg!(...))
 - #56401 (Move VecDeque::resize_with out of the impl<T:Clone> block)
 - #56402 (Improve the unstable book example for #[marker] trait)
 - #56412 (Update tracking issue for `extern_crate_self`)
 - #56416 (Remove unneeded body class selector)
 - #56418 (Fix failing tidy (line endings on Windows))
 - #56419 (Remove some uses of try!)
 - #56432 (Update issue number of `shrink_to` methods to point the tracking issue)
 - #56433 (Add description about `crate` for parse_visibility's comment)
 - #56435 (make the C part of compiler-builtins opt-out)
 - #56438 (Remove not used `DotEq` token)

Failed merges:

r? @ghost
2018-12-03 15:44:43 +00:00
Eric Huss
46c88b9502 Update rls 2018-12-03 06:04:48 -08:00
Eric Huss
9dfc98ff17 Run x86_64-gnu-tools job for "update cargo" PRs since cargo can break RLS. 2018-12-03 06:04:48 -08:00
Eric Huss
8c20adddbc Update cargo 2018-12-03 06:04:48 -08:00
bors
9cd3bef4cf Auto merge of #55010 - tromey:Bug-9224-generic-parameters, r=michaelwoerister
Add template parameter debuginfo to generic types

This changes debuginfo generation to add template parameters to
generic types.  With this change the DWARF now has
DW_TAG_template_type_param for types, not just for functions, like:

 <2><40d>: Abbrev Number: 6 (DW_TAG_structure_type)
    <40e>   DW_AT_name        : (indirect string, offset: 0x375): Generic<i32>
    <412>   DW_AT_byte_size   : 4
    <413>   DW_AT_alignment   : 4
...
 <3><41f>: Abbrev Number: 8 (DW_TAG_template_type_param)
    <420>   DW_AT_type        : <0x42a>
    <424>   DW_AT_name        : (indirect string, offset: 0xa65e): T

Closes #9224
2018-12-03 11:59:11 +00:00
kennytm
ac363d8793
Rollup merge of #56438 - yui-knk:remove_not_used_DotEq_token, r=petrochenkov
Remove not used `DotEq` token

Currently libproc_macro does not use `DotEq` token.
https://github.com/rust-lang/rust/pull/49545 changed libproc_macro
to not generate `DotEq` token.
2018-12-03 18:07:20 +08:00
kennytm
21433f2812
Rollup merge of #56435 - RalfJung:libstd-without-c, r=alexcrichton
make the C part of compiler-builtins opt-out

I'd like to be able to use Xargo to build a libstd without having a full C toolchain for the target.  This is a start (but the fact that libstd is a dylib is still a problem).

However, compiler_builtin already has somewhat similar logic to not require a C compiler for wasm:

fe74674f6e/build.rs (L36-L41)

(WTF GitHub, why doesn't this show an embedded code preview??)

I wonder if there is a way to not have two separate mechanisms? Like, move the above wasm logic to some place that controls the libstd feature, or so? Or is it okay to have these two mechanisms co-exist?

Cc @alexcrichton
2018-12-03 18:07:19 +08:00
kennytm
a498a6d198
Rollup merge of #56433 - yui-knk:update_comment_of_parse_visibility, r=petrochenkov
Add description about `crate` for parse_visibility's comment

This rule was introduced by https://github.com/rust-lang/rust/pull/45401.
2018-12-03 18:07:18 +08:00
kennytm
52a4fc8130
Rollup merge of #56432 - ordovicia:shrink-to-issue, r=Centril
Update issue number of `shrink_to` methods to point the tracking issue

Tracking issue: #56431
2018-12-03 18:07:16 +08:00
kennytm
ca98bce303
Rollup merge of #56419 - mark-i-m:remove-try, r=Centril
Remove some uses of try!
2018-12-03 18:07:15 +08:00
kennytm
71d76bec1e
Rollup merge of #56418 - petrochenkov:wintidy, r=nagisa
Fix failing tidy (line endings on Windows)

Updates to `rustc-guide` and `edition-guide` including https://github.com/rust-lang/rustc-guide/pull/246 and https://github.com/rust-lang-nursery/edition-guide/pull/122.
2018-12-03 18:07:14 +08:00