]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoRollup merge of #56476 - GuillaumeGomez:invalid-line-number-match, r=QuietMisdreavus
Pietro Albini [Wed, 5 Dec 2018 22:54:34 +0000 (23:54 +0100)]
Rollup merge of #56476 - GuillaumeGomez:invalid-line-number-match, r=QuietMisdreavus

Fix invalid line number match

If a code line is longer than the width, it then gets to the next line making the line number not matching it anymore.

r? @QuietMisdreavus

5 years agoRollup merge of #56466 - ljedrz:delete_tuple_slice, r=nikomatsakis
Pietro Albini [Wed, 5 Dec 2018 22:54:33 +0000 (23:54 +0100)]
Rollup merge of #56466 - ljedrz:delete_tuple_slice, r=nikomatsakis

data_structures: remove tuple_slice

It looks like we're not using it anywhere.

5 years agoRollup merge of #56456 - oli-obk:private_impl_trait, r=cramertj
Pietro Albini [Wed, 5 Dec 2018 22:54:32 +0000 (23:54 +0100)]
Rollup merge of #56456 - oli-obk:private_impl_trait, r=cramertj

Handle existential types in dead code analysis

fixes #55124

r? @cramertj

5 years agoRollup merge of #56452 - sinkuu:redundant_clone, r=nikic
Pietro Albini [Wed, 5 Dec 2018 22:54:30 +0000 (23:54 +0100)]
Rollup merge of #56452 - sinkuu:redundant_clone, r=nikic

Remove redundant clones

5 years agoRollup merge of #56424 - mark-i-m:explain-raw, r=Centril
Pietro Albini [Wed, 5 Dec 2018 22:54:29 +0000 (23:54 +0100)]
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

5 years agoRollup merge of #56388 - matthewjasper:more-lexical-mir-cleanup, r=nikomatsakis
Pietro Albini [Wed, 5 Dec 2018 22:54:28 +0000 (23:54 +0100)]
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

5 years agoRollup merge of #56372 - wildarch:issue-55314-second-borrow-ref, r=davidtwco
Pietro Albini [Wed, 5 Dec 2018 22:54:27 +0000 (23:54 +0100)]
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

5 years agoRollup merge of #56119 - frewsxcv:frewsxcv-option-carrier, r=TimNN
Pietro Albini [Wed, 5 Dec 2018 22:54:25 +0000 (23:54 +0100)]
Rollup merge of #56119 - frewsxcv:frewsxcv-option-carrier, r=TimNN

Utilize `?` instead of `return None`.

None

5 years agoRollup merge of #55987 - Thomasdezeeuw:weak-ptr_eq, r=sfackler
Pietro Albini [Wed, 5 Dec 2018 22:54:24 +0000 (23:54 +0100)]
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.

5 years agoRollup merge of #55563 - GuillaumeGomez:doc-search-sentence, r=QuietMisdreavus
Pietro Albini [Wed, 5 Dec 2018 22:54:22 +0000 (23:54 +0100)]
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

5 years agoRollup merge of #51753 - gruberb:document-from-conversions-libstdpath, r=QuietMisdreavus
Pietro Albini [Wed, 5 Dec 2018 22:54:21 +0000 (23:54 +0100)]
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.

5 years agoAuto merge of #56535 - matthiaskrgr:clippy, r=oli-obk
bors [Wed, 5 Dec 2018 17:54:17 +0000 (17:54 +0000)]
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 :)

5 years agosubmodules: update clippy from b2601beb to 29bf75cd
Matthias Krüger [Wed, 5 Dec 2018 14:31:30 +0000 (15:31 +0100)]
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
````

5 years agoAuto merge of #55466 - sinkuu:cleanup, r=petrochenkov
bors [Wed, 5 Dec 2018 13:56:07 +0000 (13:56 +0000)]
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.

5 years agoAuto merge of #55922 - oli-obk:slice_pat_ice, r=zackmdavis
bors [Wed, 5 Dec 2018 07:16:17 +0000 (07:16 +0000)]
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

5 years agoFix pretty test
Shotaro Yamada [Wed, 5 Dec 2018 03:15:28 +0000 (12:15 +0900)]
Fix pretty test

5 years agoAuto merge of #56519 - steveklabnik:edition-guide, r=pietroalbini
bors [Wed, 5 Dec 2018 02:24:35 +0000 (02:24 +0000)]
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

5 years agobuild the edition guide
Steve Klabnik [Tue, 4 Dec 2018 21:47:46 +0000 (16:47 -0500)]
build the edition guide

and update it so that links are correct

5 years agoAuto merge of #56486 - matthewjasper:propagate-all-closure-bounds, r=pnkfelix
bors [Tue, 4 Dec 2018 20:56:11 +0000 (20:56 +0000)]
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

5 years agoCall methods on the right tcx
Matthew Jasper [Tue, 4 Dec 2018 19:14:13 +0000 (19:14 +0000)]
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.

5 years agoUtilize `?` instead of `return None`.
Corey Farwell [Wed, 21 Nov 2018 04:01:56 +0000 (23:01 -0500)]
Utilize `?` instead of `return None`.

5 years agoAuto merge of #56244 - oli-obk:loud_ui_errors, r=nikomatsakis
bors [Tue, 4 Dec 2018 16:26:18 +0000 (16:26 +0000)]
Auto merge of #56244 - oli-obk:loud_ui_errors, r=nikomatsakis

Report failing tests without `//~ ERROR` comments

r? @nikomatsakis

5 years agoAuto merge of #55871 - ljedrz:llvm_back_allocations, r=nagisa
bors [Tue, 4 Dec 2018 11:47:07 +0000 (11:47 +0000)]
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.

5 years agoAuto merge of #56224 - ehuss:update-cargo, r=alexcrichton
bors [Tue, 4 Dec 2018 09:21:21 +0000 (09:21 +0000)]
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)

5 years agoAdd extra comment slash
Bastian Gruber [Tue, 4 Dec 2018 09:10:07 +0000 (10:10 +0100)]
Add extra comment slash

5 years agoUpdate doc-ui tests
Oliver Scherer [Fri, 30 Nov 2018 15:20:07 +0000 (16:20 +0100)]
Update doc-ui tests

5 years agoUpdate ui tests
Oliver Scherer [Fri, 30 Nov 2018 08:41:26 +0000 (09:41 +0100)]
Update ui tests

5 years agoRemove unused stderr file
Oliver Scherer [Tue, 27 Nov 2018 11:13:49 +0000 (12:13 +0100)]
Remove unused stderr file

5 years agoNewlines.... newlines everywhere
Oliver Scherer [Tue, 27 Nov 2018 10:29:29 +0000 (11:29 +0100)]
Newlines.... newlines everywhere

5 years agoAdd a test ensuring that we don't regress this
Oliver Scherer [Tue, 27 Nov 2018 09:56:49 +0000 (10:56 +0100)]
Add a test ensuring that we don't regress this

5 years agoUpdate tests
Oliver Scherer [Tue, 27 Nov 2018 09:56:36 +0000 (10:56 +0100)]
Update tests

5 years agoReport failing tests without `//~ ERROR` comments
Oliver Scherer [Mon, 26 Nov 2018 16:58:26 +0000 (17:58 +0100)]
Report failing tests without `//~ ERROR` comments

5 years agoAuto merge of #55707 - GuillaumeGomez:file-sidebar, r=QuietMisdreavus
bors [Tue, 4 Dec 2018 07:00:19 +0000 (07:00 +0000)]
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

5 years agosort_by_cached_key -> sort_by
Shotaro Yamada [Fri, 30 Nov 2018 23:39:51 +0000 (08:39 +0900)]
sort_by_cached_key -> sort_by

5 years agoRemove redundant clone
Shotaro Yamada [Wed, 28 Nov 2018 03:19:22 +0000 (12:19 +0900)]
Remove redundant clone

5 years agoAuto merge of #55682 - GuillaumeGomez:primitive-sidebar-link-gen, r=QuietMisdreavus
bors [Tue, 4 Dec 2018 03:34:32 +0000 (03:34 +0000)]
Auto merge of #55682 - GuillaumeGomez:primitive-sidebar-link-gen, r=QuietMisdreavus

Fixes primitive sidebar link generation

Fixes #50746.
Fixes #55656.

r? @QuietMisdreavus

5 years agoAuto merge of #56467 - oli-obk:osx_stack_bump, r=nagisa
bors [Tue, 4 Dec 2018 01:03:17 +0000 (01:03 +0000)]
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

5 years agoFix test
Shotaro Yamada [Mon, 29 Oct 2018 13:39:34 +0000 (22:39 +0900)]
Fix test

5 years agoUse iterator and pattern APIs instead of `char_at`
Shotaro Yamada [Sat, 27 Oct 2018 12:41:26 +0000 (21:41 +0900)]
Use iterator and pattern APIs instead of `char_at`

5 years agoPropagate all closure requirements to the caller
Matthew Jasper [Mon, 3 Dec 2018 23:17:02 +0000 (23:17 +0000)]
Propagate all closure requirements to the caller

5 years agoAuto merge of #55041 - evq:thumbv8m, r=alexcrichton
bors [Mon, 3 Dec 2018 22:38:18 +0000 (22:38 +0000)]
Auto merge of #55041 - evq:thumbv8m, r=alexcrichton

targets: thumbv8m: Add target for baseline ARMv8-M

Tested against a SAM L11 MCU.

5 years agoDon't generate suffix for source-file.js
Guillaume Gomez [Mon, 3 Dec 2018 21:37:34 +0000 (22:37 +0100)]
Don't generate suffix for source-file.js

5 years agolink to raw identifiers
Mark Mansi [Sun, 2 Dec 2018 00:24:11 +0000 (18:24 -0600)]
link to raw identifiers

5 years agoExplain raw identifer syntax
Mark Mansi [Sun, 2 Dec 2018 00:16:08 +0000 (18:16 -0600)]
Explain raw identifer syntax

5 years agoBump stack size to 32MB
Oliver Scherer [Mon, 3 Dec 2018 16:38:04 +0000 (17:38 +0100)]
Bump stack size to 32MB

5 years agodata_structures: remove tuple_slice
ljedrz [Mon, 3 Dec 2018 16:33:06 +0000 (17:33 +0100)]
data_structures: remove tuple_slice

5 years agoAuto merge of #56451 - kennytm:rollup, r=kennytm
bors [Mon, 3 Dec 2018 15:44:43 +0000 (15:44 +0000)]
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

5 years agoUpdate rls
Eric Huss [Mon, 3 Dec 2018 14:04:09 +0000 (06:04 -0800)]
Update rls

5 years agoRun x86_64-gnu-tools job for "update cargo" PRs since cargo can break RLS.
Eric Huss [Mon, 3 Dec 2018 07:09:47 +0000 (23:09 -0800)]
Run x86_64-gnu-tools job for "update cargo" PRs since cargo can break RLS.

5 years agoUpdate cargo
Eric Huss [Mon, 3 Dec 2018 01:33:20 +0000 (17:33 -0800)]
Update cargo

5 years agoHandle existential types in dead code analysis
Oliver Scherer [Mon, 3 Dec 2018 13:44:58 +0000 (14:44 +0100)]
Handle existential types in dead code analysis

5 years agoAuto merge of #55010 - tromey:Bug-9224-generic-parameters, r=michaelwoerister
bors [Mon, 3 Dec 2018 11:59:11 +0000 (11:59 +0000)]
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

5 years agoRollup merge of #56438 - yui-knk:remove_not_used_DotEq_token, r=petrochenkov
kennytm [Mon, 3 Dec 2018 10:07:20 +0000 (18:07 +0800)]
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.

5 years agoRollup merge of #56435 - RalfJung:libstd-without-c, r=alexcrichton
kennytm [Mon, 3 Dec 2018 10:07:19 +0000 (18:07 +0800)]
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:

https://github.com/rust-lang-nursery/compiler-builtins/blob/fe74674f6e4be76d47b66f67d529ebf4186f4eb1/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

5 years agoRollup merge of #56433 - yui-knk:update_comment_of_parse_visibility, r=petrochenkov
kennytm [Mon, 3 Dec 2018 10:07:18 +0000 (18:07 +0800)]
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.

5 years agoRollup merge of #56432 - ordovicia:shrink-to-issue, r=Centril
kennytm [Mon, 3 Dec 2018 10:07:16 +0000 (18:07 +0800)]
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

5 years agoRollup merge of #56419 - mark-i-m:remove-try, r=Centril
kennytm [Mon, 3 Dec 2018 10:07:15 +0000 (18:07 +0800)]
Rollup merge of #56419 - mark-i-m:remove-try, r=Centril

Remove some uses of try!

5 years agoRollup merge of #56418 - petrochenkov:wintidy, r=nagisa
kennytm [Mon, 3 Dec 2018 10:07:14 +0000 (18:07 +0800)]
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.

5 years agoRollup merge of #56416 - GuillaumeGomez:css-body, r=QuietMisdreavus
kennytm [Mon, 3 Dec 2018 10:07:13 +0000 (18:07 +0800)]
Rollup merge of #56416 - GuillaumeGomez:css-body, r=QuietMisdreavus

Remove unneeded body class selector

r? @QuietMisdreavus

5 years agoRollup merge of #56412 - petrochenkov:extself, r=Centril
kennytm [Mon, 3 Dec 2018 10:07:11 +0000 (18:07 +0800)]
Rollup merge of #56412 - petrochenkov:extself, r=Centril

Update tracking issue for `extern_crate_self`

5 years agoRollup merge of #56402 - scottmcm:better-marker-trait-example, r=Centril
kennytm [Mon, 3 Dec 2018 10:07:10 +0000 (18:07 +0800)]
Rollup merge of #56402 - scottmcm:better-marker-trait-example, r=Centril

Improve the unstable book example for #[marker] trait

The previous one didn't actually use the Display&Debug bounds in any way, so I think this one is a bit more meaningful.

5 years agoRollup merge of #56401 - scottmcm:vecdeque-resize-with, r=dtolnay
kennytm [Mon, 3 Dec 2018 10:07:09 +0000 (18:07 +0800)]
Rollup merge of #56401 - scottmcm:vecdeque-resize-with, r=dtolnay

Move VecDeque::resize_with out of the impl<T:Clone> block

I put this in the wrong `impl` block in https://github.com/rust-lang/rust/pull/56016, so fixing.

Tracking issue for the unstable method: https://github.com/rust-lang/rust/issues/41758#issuecomment-443077953

5 years agoRollup merge of #56395 - Centril:stabilize-dbg-macro, r=SimonSapin
kennytm [Mon, 3 Dec 2018 10:07:08 +0000 (18:07 +0800)]
Rollup merge of #56395 - Centril:stabilize-dbg-macro, r=SimonSapin

Stabilize dbg!(...)

Per FCP in https://github.com/rust-lang/rust/issues/54306 (which is ~1 day from completion).

r? @SimonSapin

The PR is fairly isolated so a rollup should probably work.

5 years agoRollup merge of #56366 - alexreg:stabilise-self_in_typedefs, r=Centril
kennytm [Mon, 3 Dec 2018 10:07:07 +0000 (18:07 +0800)]
Rollup merge of #56366 - alexreg:stabilise-self_in_typedefs, r=Centril

Stabilize self_in_typedefs feature

[**Tracking Issue**](https://github.com/rust-lang/rust/issues/49303)

r? @centril

5 years agoRollup merge of #56141 - jnqnfe:osstr_len_clarity, r=nagisa
kennytm [Mon, 3 Dec 2018 10:07:06 +0000 (18:07 +0800)]
Rollup merge of #56141 - jnqnfe:osstr_len_clarity, r=nagisa

[std] Osstr len clarity

5 years agoFix link in Weak::new
Thomas de Zeeuw [Fri, 23 Nov 2018 11:26:13 +0000 (12:26 +0100)]
Fix link in Weak::new

5 years agoAdd sync::Weak::ptr_eq
Thomas de Zeeuw [Thu, 15 Nov 2018 19:24:02 +0000 (20:24 +0100)]
Add sync::Weak::ptr_eq

5 years agoAdd rc::Weak.ptr_eq
Thomas de Zeeuw [Thu, 15 Nov 2018 15:41:06 +0000 (16:41 +0100)]
Add rc::Weak.ptr_eq

5 years agoAuto merge of #56305 - RalfJung:miri, r=oli-obk
bors [Mon, 3 Dec 2018 09:36:10 +0000 (09:36 +0000)]
Auto merge of #56305 - RalfJung:miri, r=oli-obk

update miri

This should make miri green again :)
(Includes https://github.com/solson/miri/pull/553)

r? @oli-obk

5 years agocodegen_llvm_back: improve allocations
ljedrz [Sat, 6 Oct 2018 09:45:11 +0000 (11:45 +0200)]
codegen_llvm_back: improve allocations

5 years agoupdate miri
Ralf Jung [Fri, 30 Nov 2018 07:08:31 +0000 (08:08 +0100)]
update miri

5 years agoupdate miri
Ralf Jung [Wed, 28 Nov 2018 20:22:45 +0000 (21:22 +0100)]
update miri

5 years agoAuto merge of #56394 - cuviper:interrupted-timeout, r=sfackler
bors [Mon, 3 Dec 2018 07:10:15 +0000 (07:10 +0000)]
Auto merge of #56394 - cuviper:interrupted-timeout, r=sfackler

Deal with EINTR in net timeout tests

We've seen sporadic QE failures in the timeout tests on this assertion:

    assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);

So there's an error, but not either of the expected kinds.  Adding a
format to show the kind revealed `ErrorKind::Interrupted` (`EINTR`).

For the cases that were using `read`, we can just use `read_exact` to
keep trying after interruption.  For those using `recv_from`, we have to
manually loop until we get a non-interrupted result.

5 years agoAuto merge of #56358 - nikic:mergefunc-aliases, r=rkruppe
bors [Mon, 3 Dec 2018 02:27:15 +0000 (02:27 +0000)]
Auto merge of #56358 - nikic:mergefunc-aliases, r=rkruppe

Enable -mergefunc-use-aliases

If the Rust LLVM fork is used, enable the -mergefunc-use-aliases
flag, which will create aliases for merged functions, rather than
inserting a call from one to the other.

A number of codegen tests needed to be adjusted, because functions
that previously fell below the thunk limit are now being merged.
Merging is prevented in various ways now.

I expect that this is going to break something, somewhere, because
it isn't able to deal with aliases properly, but we won't find out
until we try :)

This fixes #52651.

r? @rkruppe

5 years agoAuto merge of #56110 - varkor:inhabitedness-union-enum, r=cramertj
bors [Sun, 2 Dec 2018 22:22:12 +0000 (22:22 +0000)]
Auto merge of #56110 - varkor:inhabitedness-union-enum, r=cramertj

Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks

It isn't settled exactly how references to uninhabited types and unions of uninhabited types should act, but we should be more conservative here, as it's likely it will be permitted to soundly have values of such types.

This will also be more important in light of the changes at https://github.com/rust-lang/rust/pull/54125.

cc @RalfJung

5 years agoFix invalid line number match
Guillaume Gomez [Sun, 2 Dec 2018 18:12:37 +0000 (19:12 +0100)]
Fix invalid line number match

5 years agoAuto merge of #56198 - bjorn3:cg_ssa_refactor, r=eddyb
bors [Sun, 2 Dec 2018 18:02:20 +0000 (18:02 +0000)]
Auto merge of #56198 - bjorn3:cg_ssa_refactor, r=eddyb

Refactor rustc_codegen_ssa

cc #56108 (not all things are done yet)

This removes an unsafe method from cg_ssa.

r? @eddyb
cc @sunfishcode

5 years agoRemove not used `DotEq` token
yui-knk [Sun, 2 Dec 2018 13:15:50 +0000 (22:15 +0900)]
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.

5 years agoAuto merge of #56275 - RalfJung:win-mutex, r=SimonSapin
bors [Sun, 2 Dec 2018 13:45:22 +0000 (13:45 +0000)]
Auto merge of #56275 - RalfJung:win-mutex, r=SimonSapin

use MaybeUninit instead of mem::uninitialized for Windows Mutex

I hope this builds, I do not have a Windows machine to test...

5 years agoRun name-anon-globals after all other passes
Nikita Popov [Sun, 2 Dec 2018 13:41:39 +0000 (14:41 +0100)]
Run name-anon-globals after all other passes

name-anon-globals should always be run at the very end of the pass
pipeline, as optimization passes (in particular mergefunc) may
introduce new anonymous globals.

I believe we did not run into this earlier because it requires the
rather specific combination of a) mergefunc merging two weak functions
b) compilation not using thinlto.

5 years agomake the C part of compiler-builtins opt-out
Ralf Jung [Sun, 2 Dec 2018 12:33:00 +0000 (13:33 +0100)]
make the C part of compiler-builtins opt-out

5 years agoexplicitly control compiler_builts/c feature from libstd
Ralf Jung [Sun, 2 Dec 2018 12:27:12 +0000 (13:27 +0100)]
explicitly control compiler_builts/c feature from libstd

5 years agoavoid MaybeUninit::get_mut where it is not needed
Ralf Jung [Sun, 2 Dec 2018 11:34:39 +0000 (12:34 +0100)]
avoid MaybeUninit::get_mut where it is not needed

5 years agolet FIXME refer to tracking issue
Ralf Jung [Sun, 2 Dec 2018 11:29:54 +0000 (12:29 +0100)]
let FIXME refer to tracking issue

5 years agono reason to use mutable references here at all
Ralf Jung [Sun, 2 Dec 2018 11:16:43 +0000 (12:16 +0100)]
no reason to use mutable references here at all

5 years agoAuto merge of #56378 - ljedrz:arena_tweaks, r=nagisa
bors [Sun, 2 Dec 2018 11:14:14 +0000 (11:14 +0000)]
Auto merge of #56378 - ljedrz:arena_tweaks, r=nagisa

arena: speed up TypedArena::clear and improve common patterns

- speed up `TypedArena::clear`: improves its performance by up to **33%** (in case of a single entry)
- simplify `DroplessArena::in_arena`

5 years agoFix "line longer than 100 chars"
yui-knk [Sun, 2 Dec 2018 09:33:12 +0000 (18:33 +0900)]
Fix "line longer than 100 chars"

5 years agoAuto merge of #56406 - nrc:update, r=kennytm
bors [Sun, 2 Dec 2018 08:36:14 +0000 (08:36 +0000)]
Auto merge of #56406 - nrc:update, r=kennytm

Update RLS and Rustfmt

Closes #56261

5 years agoAdd description about `crate` for parse_visibility's comment
yui-knk [Sun, 2 Dec 2018 08:01:44 +0000 (17:01 +0900)]
Add description about `crate` for parse_visibility's comment

This rule was introduced by https://github.com/rust-lang/rust/pull/45401.

5 years agoarena: improve common patterns
ljedrz [Fri, 30 Nov 2018 15:38:30 +0000 (16:38 +0100)]
arena: improve common patterns

5 years agoUpdate issue number of `shrink_to` methods to point the tracking issue
Hidehito Yabuuchi [Sun, 2 Dec 2018 07:07:57 +0000 (16:07 +0900)]
Update issue number of `shrink_to` methods to point the tracking issue

5 years agoAuto merge of #56396 - dlrobertson:fix_va_list_tests, r=nikic
bors [Sun, 2 Dec 2018 00:08:58 +0000 (00:08 +0000)]
Auto merge of #56396 - dlrobertson:fix_va_list_tests, r=nikic

tests: Simplify VaList run-make test

The va_list tests were too complex and were causing some spurious
test failures on Windows.

Example: https://github.com/rust-lang/rust/pull/55011#issuecomment-443211097

5 years agoremove some uses of try!
Mark Mansi [Sat, 1 Dec 2018 21:48:55 +0000 (15:48 -0600)]
remove some uses of try!

5 years agoFix failing tidy (line endings on Windows)
Vadim Petrochenkov [Sat, 1 Dec 2018 21:19:06 +0000 (00:19 +0300)]
Fix failing tidy (line endings on Windows)

5 years agoRemove unneeded body class selector
Guillaume Gomez [Sat, 1 Dec 2018 17:20:43 +0000 (18:20 +0100)]
Remove unneeded body class selector

5 years agoUpdate tracking issue for `extern_crate_self`
Vadim Petrochenkov [Sat, 1 Dec 2018 15:58:43 +0000 (18:58 +0300)]
Update tracking issue for `extern_crate_self`

5 years agoAuto merge of #55275 - petrochenkov:extself, r=eddyb
bors [Sat, 1 Dec 2018 12:45:52 +0000 (12:45 +0000)]
Auto merge of #55275 - petrochenkov:extself, r=eddyb

experiment: Support aliasing local crate root in extern prelude

This PR provides some minimally invasive solution for the 2018 edition migration issue described in https://github.com/rust-lang/rust/issues/54647 and affecting proc macro crates.

`extern crate NAME as RENAME;` now accepts `NAME`=`self` and interprets it as referring to the local crate.
As with other `extern crate` items, `RENAME` in this case gets into extern prelude in accordance with https://github.com/rust-lang/rust/pull/54658, thus resolving https://github.com/rust-lang/rust/issues/54647.
```rust
extern crate self as serde; // Adds local crate to extern prelude as `serde`
```
This solution doesn't introduce any new syntax and has minimal maintenance cost, so it can be easily deprecated if something better is found in the future.

Closes https://github.com/rust-lang/rust/issues/54647

5 years agoresolve: Support aliasing local crate root in extern prelude
Vadim Petrochenkov [Thu, 25 Oct 2018 22:39:47 +0000 (01:39 +0300)]
resolve: Support aliasing local crate root in extern prelude

5 years agoUpdate RLS and Rustfmt
Nick Cameron [Sat, 1 Dec 2018 10:36:32 +0000 (23:36 +1300)]
Update RLS and Rustfmt

Closes #56261

5 years agoImprove the unstable book example for `#[marker]`
Scott McMurray [Sat, 1 Dec 2018 10:07:50 +0000 (02:07 -0800)]
Improve the unstable book example for `#[marker]`

The previous one didn't actually use the Display&Debug bounds in any way, so I think this one is a bit more meaningful.