]> git.lizzy.rs Git - rust.git/log
rust.git
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 agoAddress review comments
Vadim Petrochenkov [Sun, 2 Dec 2018 12:15:42 +0000 (15:15 +0300)]
Address review comments

5 years agoImprove filter test
Guillaume Gomez [Mon, 3 Dec 2018 22:04:59 +0000 (23:04 +0100)]
Improve filter test

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 agosyntax: Remove `#[non_exhaustive]` from `Edition`
Vadim Petrochenkov [Sun, 2 Dec 2018 00:59:25 +0000 (03:59 +0300)]
syntax: Remove `#[non_exhaustive]` from `Edition`

`Edition` is not a public API, we want users to break when a new edition is added

5 years agosyntax: Rename some keywords
Vadim Petrochenkov [Sun, 2 Dec 2018 00:35:55 +0000 (03:35 +0300)]
syntax: Rename some keywords

`CrateRoot` -> `PathRoot`, `::` doesn't necessarily mean crate root now
`SelfValue` -> `SelfLower`, `SelfType` -> `SelfUpper`, both `self` and `Self` can be used in type and value namespaces now

5 years agosyntax: `dyn` is a used keyword now
Vadim Petrochenkov [Sun, 2 Dec 2018 00:05:19 +0000 (03:05 +0300)]
syntax: `dyn` is a used keyword now

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 agoupdate miri
Ralf Jung [Mon, 3 Dec 2018 10:12:26 +0000 (11:12 +0100)]
update miri

5 years agofix recently added Retag statement
Ralf Jung [Sun, 2 Dec 2018 11:24:51 +0000 (12:24 +0100)]
fix recently added Retag statement

5 years agoprovide a way to replace the tag in a Scalar/MemPlace
Ralf Jung [Wed, 28 Nov 2018 08:22:02 +0000 (09:22 +0100)]
provide a way to replace the tag in a Scalar/MemPlace

5 years agoRetag needs to know whether this is a 2-phase-reborrow
Ralf Jung [Tue, 27 Nov 2018 10:53:18 +0000 (11:53 +0100)]
Retag needs to know whether this is a 2-phase-reborrow

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 agopass the parameter environment to `traits::find_associated_item`
Ariel Ben-Yehuda [Sun, 2 Dec 2018 22:49:12 +0000 (00:49 +0200)]
pass the parameter environment to `traits::find_associated_item`

dropping the param-env on the floor is obviously the wrong thing to do.

The ICE was probably exposed by #54490 adding the problem-exposing use of
`traits::find_associated_item`.

Fixes #55380.

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 agorustbuild: Fix issues with compiler docs
Oliver Middleton [Sun, 2 Dec 2018 16:55:00 +0000 (16:55 +0000)]
rustbuild: Fix issues with compiler docs

* Create output directories for crates beforehand so rustdoc uses relative links
* Readd rustc_codegen_ssa
* Don't build out of tree dependencies for rustdoc like we don't for rustc

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.

5 years agoMove VecDeque::resize_with out of the impl<T:Clone> block
Scott McMurray [Sat, 1 Dec 2018 07:38:05 +0000 (23:38 -0800)]
Move VecDeque::resize_with out of the impl<T:Clone> block

5 years agoAuto merge of #56165 - RalfJung:drop-glue-type, r=eddyb,nikomatsakis
bors [Sat, 1 Dec 2018 07:06:17 +0000 (07:06 +0000)]
Auto merge of #56165 - RalfJung:drop-glue-type, r=eddyb,nikomatsakis

drop glue takes in mutable references, it should reflect that in its type

When drop glue begins, it should retag, like all functions taking references do. But to do that, it needs to take the reference at a proper type: `&mut T`, not `*mut T`.

Failing to retag can mean that the memory the reference points to remains frozen, and `EscapeToRaw` on a frozen location is a NOP, meaning later mutations cause a Stacked Borrows violation.

Cc @nikomatsakis @Gankro because Stacked Borrows
Cc @eddyb for the changes to miri argument passing (the intention is to allow passing `*mut [u8]` when `&mut [u8]` is expected and vice versa)

5 years agoAuto merge of #56391 - alexcrichton:less-compare-mode, r=Mark-Simulacrum
bors [Sat, 1 Dec 2018 03:04:12 +0000 (03:04 +0000)]
Auto merge of #56391 - alexcrichton:less-compare-mode, r=Mark-Simulacrum

ci: Only run compare-mode tests on one builder

The run-pass test suite currently takes 30 minutes on Windows, and
that appears to be roughly split between two 15 minute runs of the test
suite: one without NLL and one with NLL. In discussion on Discord the
platform coverage of the NLL compare mode may not necessarily be worth
it, so this commit removes the NLL compare mode from tests by default,
and then reenables it on only one builder.

5 years agostabilize std::dbg!(...)
Mazdak Farrokhzad [Sat, 1 Dec 2018 01:54:09 +0000 (02:54 +0100)]
stabilize std::dbg!(...)

5 years agoDeal with EINTR in net timeout tests
Josh Stone [Fri, 30 Nov 2018 23:33:40 +0000 (15:33 -0800)]
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 agoci: Only run compare-mode tests on one builder
Alex Crichton [Fri, 30 Nov 2018 22:31:04 +0000 (14:31 -0800)]
ci: Only run compare-mode tests on one builder

The run-pass test suite currently takes 30 minutes on Windows, and
that appears to be roughly split between two 15 minute runs of the test
suite: one without NLL and one with NLL. In discussion on Discord the
platform coverage of the NLL compare mode may not necessarily be worth
it, so this commit removes the NLL compare mode from tests by default,
and then reenables it on only one builder.

5 years agoUpdated ui tests.
Alexander Regueiro [Fri, 30 Nov 2018 15:41:32 +0000 (15:41 +0000)]
Updated ui tests.

5 years agoRemoved chapter from Unstable Book.
Alexander Regueiro [Fri, 30 Nov 2018 04:14:51 +0000 (04:14 +0000)]
Removed chapter from Unstable Book.

5 years agoRemoved feature gate.
Alexander Regueiro [Fri, 30 Nov 2018 03:55:26 +0000 (03:55 +0000)]
Removed feature gate.

5 years agoUse visit_local to find 2PB activations
Matthew Jasper [Fri, 30 Nov 2018 21:49:43 +0000 (21:49 +0000)]
Use visit_local to find 2PB activations

5 years agoRemove the `region_map` field from `BorrowSet`
Matthew Jasper [Fri, 30 Nov 2018 21:48:31 +0000 (21:48 +0000)]
Remove the `region_map` field from `BorrowSet`

5 years agoFix some rustc doc links
Matthew Jasper [Fri, 30 Nov 2018 21:22:04 +0000 (21:22 +0000)]
Fix some rustc doc links

5 years agoFix bug in matching on floating-point ranges
varkor [Fri, 30 Nov 2018 21:13:16 +0000 (21:13 +0000)]
Fix bug in matching on floating-point ranges

5 years agoSeparate out precise_pointer_size_matching tests from exhaustive_integer_patterns...
varkor [Fri, 30 Nov 2018 21:13:07 +0000 (21:13 +0000)]
Separate out precise_pointer_size_matching tests from exhaustive_integer_patterns tests

5 years agotests: Simplify VaList run-make test
Dan Robertson [Fri, 30 Nov 2018 17:37:23 +0000 (17:37 +0000)]
tests: Simplify VaList run-make test

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

5 years agoAuto merge of #56381 - kennytm:rollup, r=kennytm
bors [Fri, 30 Nov 2018 19:24:17 +0000 (19:24 +0000)]
Auto merge of #56381 - kennytm:rollup, r=kennytm

Rollup of 19 pull requests

Successful merges:

 - #55011 (Add libstd Cargo feature "panic_immediate_abort")
 - #55821 (Use sort_by_cached_key when the key function is not trivial/free)
 - #56014 (add test for issue #21335)
 - #56131 (Assorted tweaks)
 - #56214 (Implement chalk unification routines)
 - #56216 (Add TryFrom<&[T]> for [T; $N] where T: Copy)
 - #56268 (Reuse the `P` in `InvocationCollector::fold_{,opt_}expr`.)
 - #56324 (Use raw_entry for more efficient interning)
 - #56336 (Clean up and streamline the pretty-printer)
 - #56337 (Fix const_fn ICE with non-const function pointer)
 - #56339 (Remove not used option)
 - #56341 (Rename conversion util; remove duplicate util in librustc_codegen_llvm.)
 - #56349 (rustc 1.30.0's linker flavor inference is a non-backwards compat change to -Clinker)
 - #56355 (Add inline attributes and add unit to CommonTypes)
 - #56360 (Optimize local linkchecker program)
 - #56364 (Fix panic with outlives in existential type)
 - #56365 (Stabilize self_struct_ctor feature.)
 - #56367 (Moved some feature gate tests to correct location)
 - #56373 (Update books)

5 years agoRollup merge of #56214 - scalexm:unification, r=nikomatsakis
kennytm [Fri, 30 Nov 2018 18:31:12 +0000 (02:31 +0800)]
Rollup merge of #56214 - scalexm:unification, r=nikomatsakis

Implement chalk unification routines

`ResolventOps` and `AggregateOps` are mostly straightforwardly translated from chalk. I had caught a few bugs already in my `chalk` branch and backported fixes to this branch, but there may be other ones left. EDIT: I hope there are none left now :)

Fixes #54935.

5 years agoRollup merge of #56337 - phansch:fix_const_ice, r=oli-obk
kennytm [Fri, 30 Nov 2018 18:30:30 +0000 (02:30 +0800)]
Rollup merge of #56337 - phansch:fix_const_ice, r=oli-obk

Fix const_fn ICE with non-const function pointer

Fixes #56164

5 years agoRollup merge of #56324 - Zoxc:int-ext, r=nikomatsakis
kennytm [Fri, 30 Nov 2018 18:29:45 +0000 (02:29 +0800)]
Rollup merge of #56324 - Zoxc:int-ext, r=nikomatsakis

Use raw_entry for more efficient interning

Fixes https://github.com/rust-lang/rust/issues/56308#issuecomment-442492744

5 years agoRollup merge of #55011 - vi:panic_immediate_abort, r=alexcrichton
kennytm [Fri, 30 Nov 2018 18:25:46 +0000 (02:25 +0800)]
Rollup merge of #55011 - vi:panic_immediate_abort, r=alexcrichton

Add libstd Cargo feature "panic_immediate_abort"

It stop asserts and panics from libstd to automatically
include string output and formatting code.

Use case: developing static executables smaller than 50 kilobytes,
where usual formatting code is excessive while keeping debuggability
in debug mode.

May resolve #54981.