]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAuto merge of #53404 - oconnor663:current_dir_behavior, r=alexcrichton
bors [Tue, 28 Aug 2018 03:22:21 +0000 (03:22 +0000)]
Auto merge of #53404 - oconnor663:current_dir_behavior, r=alexcrichton

document the platform-specific behavior of Command::current_dir

See also https://github.com/rust-lang/rust/issues/37868.

Here's my initial wording:

> Note that if the program path is relative (e.g. `"./script.sh"`), the interaction between that path and `current_dir` varies across platforms. Windows currently ignores `current_dir` when locating the program, but Unix-like systems interpret the program path relative to `current_dir`. These implementation details aren't considered stable, and it's recommended to call `canonicalize` to get an absolute program path instead of using relative paths and `current_dir` together.

I'd like to get feedback on:

- _Should_ we consider those details stable? It might be disruptive to change them, regardless of what I can get away with claiming in docs :)
- Is `canonicalize` an appropriate recommendation? As discussed in #37868 above, there are reasons it's not called automatically in the `Command` implementation.

5 years agoAuto merge of #53272 - mark-i-m:anon_param_error_now, r=nikomatsakis
bors [Tue, 28 Aug 2018 01:04:05 +0000 (01:04 +0000)]
Auto merge of #53272 - mark-i-m:anon_param_error_now, r=nikomatsakis

Warn on anon params in 2015 edition

cc #41686 https://github.com/rust-lang/rfcs/pull/2522
cc  @Centril @nikomatsakis

TODO:
- [x] Make sure the tests pass.
- [x] Make sure there is rustfix-able suggestion. Current plan is to just suggest `_ : Foo`
- [x] Add a rustfix ui test.

EDIT: It seems I already did the last two in #48309

5 years agoAuto merge of #53227 - nivkner:pin_move, r=RalfJung
bors [Mon, 27 Aug 2018 22:56:15 +0000 (22:56 +0000)]
Auto merge of #53227 - nivkner:pin_move, r=RalfJung

move the Pin API into its own module for centralized documentation

This implements the change proposed by @withoutboats in #49150, as suggested by @RalfJung in the review of #53104,
along with the documentation that was originally in it, that was deemed more appropriate in module-level documentation.

r? @RalfJung

5 years agoAuto merge of #51456 - qmx:crate-in-path, r=nikomatsakis
bors [Mon, 27 Aug 2018 19:51:01 +0000 (19:51 +0000)]
Auto merge of #51456 - qmx:crate-in-path, r=nikomatsakis

resolve suggestions should use `crate::` when enabled

I couldn't find a way to add a specific assertion for the ui test, so the expected output is living under the `crates-in-path.stderr` ui test.

- is this the right place for the test?

fixes #51212

5 years agofix test stderrs
Mark Mansi [Mon, 27 Aug 2018 18:06:26 +0000 (13:06 -0500)]
fix test stderrs

5 years agoAuto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakis
bors [Mon, 27 Aug 2018 17:42:45 +0000 (17:42 +0000)]
Auto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakis

fix for late-bound regions

Fix for https://github.com/rust-lang/rust/issues/53419

r? @nikomatsakis

5 years agoFix anon param + make it allow-by-def
Mark Mansi [Mon, 27 Aug 2018 17:14:31 +0000 (12:14 -0500)]
Fix anon param + make it allow-by-def

5 years agofix another
Mark Mansi [Sat, 11 Aug 2018 17:44:35 +0000 (12:44 -0500)]
fix another

5 years agofix some anon params
Mark Mansi [Sat, 11 Aug 2018 17:28:35 +0000 (12:28 -0500)]
fix some anon params

5 years agooops
Mark Mansi [Sat, 11 Aug 2018 16:39:10 +0000 (11:39 -0500)]
oops

5 years agowarn on anon params in 015
Mark Mansi [Sat, 11 Aug 2018 16:15:57 +0000 (11:15 -0500)]
warn on anon params in 015

5 years agoAuto merge of #53580 - nikomatsakis:nll-issue-53568, r=pnkfelix
bors [Mon, 27 Aug 2018 14:44:13 +0000 (14:44 +0000)]
Auto merge of #53580 - nikomatsakis:nll-issue-53568, r=pnkfelix

fix NLL ICEs

Custom type-ops reuse some of the query machinery -- but while query results are canonicalized after they are constructed, custom type ops are not, and hence we have to resolve the type variables to avoid an ICE here.

Also, use the type-op machinery for implied outlives bounds.

Fixes #53568
Fixes #52992
Fixes #53680

5 years agoadd test for the suggestion from prelude
Douglas Campos [Mon, 27 Aug 2018 14:12:31 +0000 (14:12 +0000)]
add test for the suggestion from prelude

5 years agono need to special case std
Douglas Campos [Mon, 27 Aug 2018 12:36:30 +0000 (12:36 +0000)]
no need to special case std

5 years agoAuto merge of #53656 - nnethercote:HybridIdxSet-tweaks, r=nikomatsakis
bors [Mon, 27 Aug 2018 11:47:03 +0000 (11:47 +0000)]
Auto merge of #53656 - nnethercote:HybridIdxSet-tweaks, r=nikomatsakis

`HybridIdxSet` tweaks

A couple of tweaks to `HybridIdxSet`.

r? @nikomatsakis

5 years agoAuto merge of #53624 - Zoxc:ice-fix, r=oli-obk
bors [Mon, 27 Aug 2018 09:08:27 +0000 (09:08 +0000)]
Auto merge of #53624 - Zoxc:ice-fix, r=oli-obk

Move with_globals setup from run_compiler to run

An alternative to https://github.com/rust-lang/rust/pull/53526

Note this breaks some miri stuff and clippy since they call `run_compiler` directly, and they now need to also call `with_globals ` cc @rust-lang/dev-tools

r? @oli-obk

5 years agoAuto merge of #53648 - japaric:thumb-lld, r=alexcrichton
bors [Mon, 27 Aug 2018 06:30:10 +0000 (06:30 +0000)]
Auto merge of #53648 - japaric:thumb-lld, r=alexcrichton

change the default linker of the ARM Cortex-M targets

to rust-lld so users won't need an external linker to build programs

This will break nightly builds.

We discussed this within the embedded WG and with the embedded community in
rust-embedded/wg#160 and there was consensus in that this breaking change is
worthwhile and that we should do it now before it becomes impossible to do
without breaking stable builds.

We have already written an announcement (see rust-embedded/wg#196) that explains
the breakage and instructs the users how to fix their builds. The TL;DR is that
they can switch to the old behavior by passing the `-C linker` flag to rustc.
We'll post the announcement as soon as this change makes into nightly.

closes rust-embedded/wg#160

r? @alexcrichton

5 years agoUpdate clippy
John Kåre Alsaker [Mon, 27 Aug 2018 00:26:09 +0000 (02:26 +0200)]
Update clippy

5 years agoAuto merge of #53640 - alexcrichton:more-symbol-tweaks, r=michaelwoerister
bors [Mon, 27 Aug 2018 01:28:52 +0000 (01:28 +0000)]
Auto merge of #53640 - alexcrichton:more-symbol-tweaks, r=michaelwoerister

rustc: Continue to tweak "std internal symbols"

In investigating [an issue][1] with `panic_implementation` defined in an
executable that's optimized I once again got to rethinking a bit about the
`rustc_std_internal_symbol` attribute as well as weak lang items. We've sort of
been non-stop tweaking these items ever since their inception, and this
continues to the trend.

The crux of the bug was that in the reachability we have a [different branch][2]
for non-library builds which meant that weak lang items (and std internal
symbols) weren't considered reachable, causing them to get eliminiated by
ThinLTO passes. The fix was to basically tweak that branch to consider these
symbols to ensure that they're propagated all the way to the linker.

Along the way I've attempted to erode the distinction between std internal
symbols and weak lang items by having weak lang items automatically configure
fields of `CodegenFnAttrs`. That way most code no longer even considers weak
lang items and they're simply considered normal functions with attributes about
the ABI.

In the end this fixes the final comment of #51342

[1]: https://github.com/rust-lang/rust/issues/51342#issuecomment-414368019
[2]: https://github.com/rust-lang/rust/blob/35bf1ae25799a4e62131159f052e0a3cbd27c960/src/librustc/middle/reachable.rs#L225-L238

5 years agoMove with_globals setup from run_compiler to run
John Kåre Alsaker [Thu, 23 Aug 2018 03:05:37 +0000 (05:05 +0200)]
Move with_globals setup from run_compiler to run

5 years agorustc: Continue to tweak "std internal symbols"
Alex Crichton [Thu, 23 Aug 2018 07:33:32 +0000 (00:33 -0700)]
rustc: Continue to tweak "std internal symbols"

In investigating [an issue][1] with `panic_implementation` defined in an
executable that's optimized I once again got to rethinking a bit about the
`rustc_std_internal_symbol` attribute as well as weak lang items. We've sort of
been non-stop tweaking these items ever since their inception, and this
continues to the trend.

The crux of the bug was that in the reachability we have a [different branch][2]
for non-library builds which meant that weak lang items (and std internal
symbols) weren't considered reachable, causing them to get eliminiated by
ThinLTO passes. The fix was to basically tweak that branch to consider these
symbols to ensure that they're propagated all the way to the linker.

Along the way I've attempted to erode the distinction between std internal
symbols and weak lang items by having weak lang items automatically configure
fields of `CodegenFnAttrs`. That way most code no longer even considers weak
lang items and they're simply considered normal functions with attributes about
the ABI.

In the end this fixes the final comment of #51342

[1]: https://github.com/rust-lang/rust/issues/51342#issuecomment-414368019
[2]: https://github.com/rust-lang/rust/blob/35bf1ae25799a4e62131159f052e0a3cbd27c960/src/librustc/middle/reachable.rs#L225-L238

5 years agoAuto merge of #53715 - pietroalbini:missing-components-manifest, r=alexcrichton
bors [Sun, 26 Aug 2018 22:49:47 +0000 (22:49 +0000)]
Auto merge of #53715 - pietroalbini:missing-components-manifest, r=alexcrichton

Include missing tools in the manifest and mark them as unavailable

This PR changes the `build-manifest` tool to always include the missing components in the manifest, marking them as `available = false`. This blocks rustup from updating to a different nightly if the component is installed.

The code builds and _should_ be correct, but I don't know a way to test the changes locally.

r? @alexcrichton
cc @kennytm https://github.com/rust-lang-nursery/rustup.rs/issues/1486

5 years agoAuto merge of #53717 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Sun, 26 Aug 2018 20:10:43 +0000 (20:10 +0000)]
Auto merge of #53717 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 5 pull requests

Successful merges:

 - #53043 (Improve unstable message display)
 - #53428 (libtest terse format: show how far in we are)
 - #53626 (Automatically expand a section even after page load)
 - #53651 (Add struct keyword doc)
 - #53706 (rustdoc: Fix gap on section anchor symbol when hovering.)

Failed merges:

 - #53472 (Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.)

r? @ghost

5 years agoRollup merge of #53706 - ehuss:rustdoc-section-anchor, r=GuillaumeGomez
Guillaume Gomez [Sun, 26 Aug 2018 10:05:27 +0000 (12:05 +0200)]
Rollup merge of #53706 - ehuss:rustdoc-section-anchor, r=GuillaumeGomez

rustdoc: Fix gap on section anchor symbol when hovering.

Fixes #49485 for section headings.

5 years agoRollup merge of #53651 - GuillaumeGomez:struct-keyword, r=QuietMisdreavus
Guillaume Gomez [Sun, 26 Aug 2018 10:05:26 +0000 (12:05 +0200)]
Rollup merge of #53651 - GuillaumeGomez:struct-keyword, r=QuietMisdreavus

Add struct keyword doc

Slowly, one keyword at a time.

r? @QuietMisdreavus

5 years agoRollup merge of #53626 - kzys:hashchange, r=GuillaumeGomez
Guillaume Gomez [Sun, 26 Aug 2018 10:05:25 +0000 (12:05 +0200)]
Rollup merge of #53626 - kzys:hashchange, r=GuillaumeGomez

Automatically expand a section even after page load

Fixes #52774

5 years agoRollup merge of #53428 - RalfJung:libtest-terse, r=KodrAus
Guillaume Gomez [Sun, 26 Aug 2018 10:05:23 +0000 (12:05 +0200)]
Rollup merge of #53428 - RalfJung:libtest-terse, r=KodrAus

libtest terse format: show how far in we are

So for example `./x.py test src/libcore` looks like
```
running 881 tests
.................................................................................................... 100/881
.................................................................................................... 200/881
.................................................................................................... 300/881
.............................................................i.i.................................... 400/881
.................................................................................................... 500/881
.................................................................................................... 600/881
.................................................................................................... 700/881
.................................................................................................... 800/881
.................................................................................
test result: ok. 879 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out
```
When I am waiting for 3500 ui tests to complete, I am often missing some sense of how far in these 3500 it is.

Getting the total count in `write_run_start` is a bit hacky; I did that to not change the "public interface" of the formatters. I can also give them an extra argument in their constructor so that they know from the beginning how many tests there will be. Would you prefer that? (I think I would, but I wanted to get feedback first.)

5 years agoRollup merge of #53043 - GuillaumeGomez:improve-unstable-msg-display, r=QuietMisdreavus
Guillaume Gomez [Sun, 26 Aug 2018 10:05:21 +0000 (12:05 +0200)]
Rollup merge of #53043 - GuillaumeGomez:improve-unstable-msg-display, r=QuietMisdreavus

Improve unstable message display

Fixes #51387.
Reopening of #51563.

New display:

<img width="1440" alt="screen shot 2018-08-04 at 00 01 39" src="https://user-images.githubusercontent.com/3050060/43667793-dc14f708-9779-11e8-9808-f3ff126fc213.png">

r? @QuietMisdreavus

5 years agoAuto merge of #53629 - nnethercote:lazier-SparseBitMatrix, r=nikomatsakis
bors [Sun, 26 Aug 2018 09:41:28 +0000 (09:41 +0000)]
Auto merge of #53629 - nnethercote:lazier-SparseBitMatrix, r=nikomatsakis

Lazier sparse bit matrix

A small NLL win.

r? @nikomatsakis

5 years agoAuto merge of #53623 - cramertj:libc-update, r=alexcrichton
bors [Sun, 26 Aug 2018 07:34:13 +0000 (07:34 +0000)]
Auto merge of #53623 - cramertj:libc-update, r=alexcrichton

Update libc to include Fuchsia fixes

cc https://github.com/rust-lang/libc/pull/1067, @sulanov

r? @alexcrichton

5 years agoAuto merge of #53619 - japaric:panic-handler, r=SimonSapin
bors [Sun, 26 Aug 2018 04:02:19 +0000 (04:02 +0000)]
Auto merge of #53619 - japaric:panic-handler, r=SimonSapin

add #[panic_handler]; deprecate #[panic_implementation]

r? @SimonSapin
cc #44489

5 years agoAuto merge of #53567 - alexcrichton:update-cargo, r=Mark-Simulacrum
bors [Sun, 26 Aug 2018 00:58:07 +0000 (00:58 +0000)]
Auto merge of #53567 - alexcrichton:update-cargo, r=Mark-Simulacrum

Update Cargo submodule

Also update Cargo's dependencies while we're at it

5 years agoUpdate Cargo submodule
Alex Crichton [Tue, 21 Aug 2018 17:23:47 +0000 (10:23 -0700)]
Update Cargo submodule

Also update Cargo's dependencies while we're at it

5 years agoAuto merge of #53612 - mark-i-m:anon_param_disallowed_2018, r=petrochenkov
bors [Sat, 25 Aug 2018 22:50:12 +0000 (22:50 +0000)]
Auto merge of #53612 - mark-i-m:anon_param_disallowed_2018, r=petrochenkov

Remove anonymous trait params from 2018 and beyond

cc @Centril @nikomatsakis
cc #41686 rust-lang/rfcs#2522 #53272

This PR removes support for anonymous trait parameters syntactically in rust 2018 and onward.

TODO:
- [x] Add tests

5 years agoInclude missing tools in the manifest and mark them as unavailable
Pietro Albini [Sat, 25 Aug 2018 21:38:18 +0000 (23:38 +0200)]
Include missing tools in the manifest and mark them as unavailable

5 years agorustdoc: Fix gap on section anchor symbol when hovering.
Eric Huss [Sat, 25 Aug 2018 21:15:49 +0000 (14:15 -0700)]
rustdoc: Fix gap on section anchor symbol when hovering.

Fixes #49485 for section headings.

5 years agoAuto merge of #53701 - Xanewok:update-rls, r=kennytm
bors [Sat, 25 Aug 2018 19:30:10 +0000 (19:30 +0000)]
Auto merge of #53701 - Xanewok:update-rls, r=kennytm

Update RLS

Continuation of https://github.com/rust-lang/rust/pull/53610.
Workspaces are tricky - the `json_internal` problem was only reproducible in Rust CI (not sure why it was only relevant to Windows?) and it seems that this was fixed by updating serde_json workspace-wide.

Tested locally in Rust repo and it seems to be working.

Nightlies are currently shipping without RLS, so it'd be great to include this in the next nightlies if possible.

5 years agoBump serde_json 1.0.24 -> 1.0.25
Igor Matuszewski [Sat, 25 Aug 2018 16:17:55 +0000 (18:17 +0200)]
Bump serde_json 1.0.24 -> 1.0.25

This fixes 'cannot find macro `json_internal!` in this scope' RLS
compilation error in Rust CI, presumably due to a local macro fix in
serde_json 1.0.25
(https://github.com/serde-rs/json/commit/e40cbad70b39a0dd7975be8e5ad9018e2d45f791)

5 years agoUpdate RLS
Igor Matuszewski [Sat, 25 Aug 2018 16:08:00 +0000 (18:08 +0200)]
Update RLS

5 years agoAuto merge of #53584 - mcr431:Fix-#53525, r=varkor
bors [Sat, 25 Aug 2018 13:00:20 +0000 (13:00 +0000)]
Auto merge of #53584 - mcr431:Fix-#53525, r=varkor

Fix #53525  - Unify E0243, E0244, E0087, E0088, E0089, and E0090 into E0107

Fix #53525

This pr merges all errors related to too many or too few generic arguments in types and functions. E0243, E0244, E0087, E0088, E0089, E0090 errors will no longer be emitted and E0107 will be used instead.

5 years agoExpand a collapsed element on onclick
Kazuyoshi Kato [Sat, 25 Aug 2018 10:34:04 +0000 (03:34 -0700)]
Expand a collapsed element on onclick

Doing the expansion on onhashchange seems too late.

Fixes #48726

5 years agoAuto merge of #53385 - matklad:stabilize-find-map, r=KodrAus
bors [Sat, 25 Aug 2018 08:53:04 +0000 (08:53 +0000)]
Auto merge of #53385 - matklad:stabilize-find-map, r=KodrAus

Stablize Iterator::find_map

Stabilization PR for https://github.com/rust-lang/rust/issues/49602

5 years agoAuto merge of #53609 - bemeurer:tidy-ctfe, r=RalfJung
bors [Sat, 25 Aug 2018 06:48:14 +0000 (06:48 +0000)]
Auto merge of #53609 - bemeurer:tidy-ctfe, r=RalfJung

Tidy CFTE/MIRI

Fixes #53596

5 years agoAuto merge of #53577 - GuillaumeGomez:rustdoc-substring-search, r=QuietMisdreavus
bors [Sat, 25 Aug 2018 02:40:14 +0000 (02:40 +0000)]
Auto merge of #53577 - GuillaumeGomez:rustdoc-substring-search, r=QuietMisdreavus

Search a substring instead of start of string in rustdoc search

Fixes #49762.

r? @QuietMisdreavus

5 years agoremove dupe attribute
toidiu [Sat, 25 Aug 2018 01:38:53 +0000 (21:38 -0400)]
remove dupe attribute

5 years agoAuto merge of #53225 - nikomatsakis:nll-type-annot, r=pnkfelix
bors [Fri, 24 Aug 2018 22:42:00 +0000 (22:42 +0000)]
Auto merge of #53225 - nikomatsakis:nll-type-annot, r=pnkfelix

MIR: support user-given type annotations on fns, structs, and enums

This branch adds tooling to track user-given type annotations on functions, structs, and enum variant expressions. The user-given types are passed onto NLL which then enforces them.

cc #47184 — not a complete fix, as there are more cases to cover

r? @eddyb
cc @rust-lang/wg-compiler-nll

5 years agocheck that adding infer-outlives requirement to all crates works
Niko Matsakis [Fri, 24 Aug 2018 21:10:50 +0000 (17:10 -0400)]
check that adding infer-outlives requirement to all crates works

5 years agoremove copyright headers now that they are not madatory
Niv Kaminer [Fri, 24 Aug 2018 21:07:00 +0000 (00:07 +0300)]
remove copyright headers now that they are not madatory

5 years agofix tests
Mark Mansi [Fri, 24 Aug 2018 20:47:25 +0000 (15:47 -0500)]
fix tests

5 years agooops
Mark Mansi [Wed, 22 Aug 2018 21:43:32 +0000 (16:43 -0500)]
oops

5 years agoAdd/update tests for 2015, 2018, rustfix
Mark Mansi [Wed, 22 Aug 2018 20:07:27 +0000 (15:07 -0500)]
Add/update tests for 2015, 2018, rustfix

5 years agoStart working on a test
Mark Mansi [Wed, 22 Aug 2018 19:08:29 +0000 (14:08 -0500)]
Start working on a test

5 years agofix compile error
Mark Mansi [Wed, 22 Aug 2018 18:58:46 +0000 (13:58 -0500)]
fix compile error

5 years agoRemove anon trait params from 2018 and beyond
Mark Mansi [Wed, 22 Aug 2018 18:43:04 +0000 (13:43 -0500)]
Remove anon trait params from 2018 and beyond

5 years agochange the default linker of the ARM Cortex-M targets
Jorge Aparicio [Thu, 23 Aug 2018 20:13:28 +0000 (22:13 +0200)]
change the default linker of the ARM Cortex-M targets

to rust-lld so users won't need an external linker to build programs

5 years agoAuto merge of #53460 - JoshBrudnak:master, r=estebank
bors [Fri, 24 Aug 2018 19:21:27 +0000 (19:21 +0000)]
Auto merge of #53460 - JoshBrudnak:master, r=estebank

Fix compile panic on non existent type return

Reverted the change https://github.com/rust-lang/rust/commit/28a76a90009d605349babcd2755962ab93913327#diff-4ed25c00aceb84666fca639cf8101c7cL1069 which was panicking when returning a type that cannot be found in the current scope and added testing for the compile error.

For example:
```rust
fn addition() -> Wrapper<impl A> {}
```
Where Wrapper is undefined in the scope.

5 years agoUpdate libc to include Fuchsia fixes
Taylor Cramer [Thu, 23 Aug 2018 00:56:21 +0000 (17:56 -0700)]
Update libc to include Fuchsia fixes

5 years agoaddress pnkfelix nits
Niko Matsakis [Thu, 23 Aug 2018 21:37:41 +0000 (17:37 -0400)]
address pnkfelix nits

5 years agopacify the mercilous tidy: adt-nullary-enums test
Niko Matsakis [Thu, 9 Aug 2018 17:08:18 +0000 (13:08 -0400)]
pacify the mercilous tidy: adt-nullary-enums test

5 years agopacify the mercilous tidy: adt user-ty
Niko Matsakis [Thu, 9 Aug 2018 17:07:57 +0000 (13:07 -0400)]
pacify the mercilous tidy: adt user-ty

5 years agopacify the mercilous tidy: user-ty on rvalue assignments
Niko Matsakis [Thu, 9 Aug 2018 17:07:45 +0000 (13:07 -0400)]
pacify the mercilous tidy: user-ty on rvalue assignments

5 years agopacify the mercilous tidy: doc comment for `is_identity`
Niko Matsakis [Thu, 9 Aug 2018 17:07:23 +0000 (13:07 -0400)]
pacify the mercilous tidy: doc comment for `is_identity`

5 years agopacify the mercilous tidy: canonical ignore comments
Niko Matsakis [Thu, 9 Aug 2018 17:07:11 +0000 (13:07 -0400)]
pacify the mercilous tidy: canonical ignore comments

5 years agoufcs with annot in position 1 and 2
Niko Matsakis [Thu, 9 Aug 2018 16:32:00 +0000 (12:32 -0400)]
ufcs with annot in position 1 and 2

5 years agorename test case
Niko Matsakis [Thu, 9 Aug 2018 16:25:01 +0000 (12:25 -0400)]
rename test case

the 3 is because the type arguments are in the 3rd position

5 years agoinclude ADT user-ty in output
Niko Matsakis [Thu, 9 Aug 2018 16:24:52 +0000 (12:24 -0400)]
include ADT user-ty in output

5 years agoadd test for method ufcs notation
Niko Matsakis [Thu, 9 Aug 2018 16:18:29 +0000 (12:18 -0400)]
add test for method ufcs notation

5 years agosupport user-given types in adts
Niko Matsakis [Thu, 9 Aug 2018 15:56:53 +0000 (11:56 -0400)]
support user-given types in adts

5 years agosupport user annotations in fns, methods
Niko Matsakis [Thu, 9 Aug 2018 10:58:28 +0000 (06:58 -0400)]
support user annotations in fns, methods

5 years agoequate the `user_ty` of a constant with its declared `ty`
Niko Matsakis [Thu, 9 Aug 2018 10:23:52 +0000 (06:23 -0400)]
equate the `user_ty` of a constant with its declared `ty`

5 years agoadd a `user_ty` annotation to `Constant`
Niko Matsakis [Thu, 9 Aug 2018 10:18:00 +0000 (06:18 -0400)]
add a `user_ty` annotation to `Constant`

5 years agoadd a `user_substs` table and store the annotations in there
Niko Matsakis [Wed, 8 Aug 2018 22:10:19 +0000 (18:10 -0400)]
add a `user_substs` table and store the annotations in there

5 years agoadd a `user_substs` map into the typeck tables
Niko Matsakis [Wed, 8 Aug 2018 19:59:31 +0000 (15:59 -0400)]
add a `user_substs` map into the typeck tables

5 years agoAuto merge of #53662 - kennytm:rollup, r=kennytm
bors [Fri, 24 Aug 2018 17:02:23 +0000 (17:02 +0000)]
Auto merge of #53662 - kennytm:rollup, r=kennytm

Rollup of 16 pull requests

Successful merges:

 - #53311 (Window Mutex: Document that we properly initialize the SRWLock)
 - #53503 (Discourage overuse of mem::forget)
 - #53545 (Fix #50865: ICE on impl-trait returning functions reaching private items)
 - #53559 (add macro check for lint)
 - #53562 (Lament the invincibility of the Turbofish)
 - #53563 (use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into())
 - #53592 (docs: minor stylistic changes to str/string docs)
 - #53594 (Update RELEASES.md to include clippy-preview)
 - #53600 (Fix a grammatical mistake in "expected generic arguments" errors)
 - #53614 (update nomicon and book)
 - #53617 (tidy: Stop requiring a license header)
 - #53618 (Add missing fmt examples)
 - #53636 (Prefer `.nth(n)` over `.skip(n).next()`.)
 - #53644 (Use SmallVec for SmallCStr)
 - #53664 (Remove unnecessary closure in rustc_mir/build/mod.rs)
 - #53666 (Added rustc_codegen_llvm to compiler documentation.)

5 years agoRollup merge of #53666 - davidtwco:issue-51737, r=Mark-Simulacrum
kennytm [Fri, 24 Aug 2018 15:27:57 +0000 (23:27 +0800)]
Rollup merge of #53666 - davidtwco:issue-51737, r=Mark-Simulacrum

Added rustc_codegen_llvm to compiler documentation.

Fixes #51737.

5 years agoRollup merge of #53545 - FelixMcFelix:fix-50865-beta, r=petrochenkov
kennytm [Fri, 24 Aug 2018 15:27:16 +0000 (23:27 +0800)]
Rollup merge of #53545 - FelixMcFelix:fix-50865-beta, r=petrochenkov

Fix #50865: ICE on impl-trait returning functions reaching private items

Adds a test case as suggested in #50865, and implements @petrochenkov's suggestion. Fixes #50865.

Impl-trait-returning functions are marked under a new (low) access level, which they propagate rather than `AccessLevels::Reachable`. `AccessLevels::is_reachable` returns false for such items (leaving stability analysis unaffected), these items may still be visible to the lints phase however.

5 years agoAuto merge of #53044 - SergioBenitez:stable-attr-literals, r=petrochenkov
bors [Fri, 24 Aug 2018 14:48:29 +0000 (14:48 +0000)]
Auto merge of #53044 - SergioBenitez:stable-attr-literals, r=petrochenkov

Stabilize 'attr_literals' feature.

RFC Issue: rust-lang/rfcs#1559
Tracking Issue: rust-lang/rust#34981

Reference PR: https://github.com/rust-lang-nursery/reference/pull/388.

5 years agoupdates tests to use new error code
Matthew Russo [Wed, 22 Aug 2018 01:12:23 +0000 (21:12 -0400)]
updates tests to use new error code

5 years agoRemoving GenericArgMismatchErrorCode.
Matthew Russo [Wed, 22 Aug 2018 01:09:48 +0000 (21:09 -0400)]
Removing GenericArgMismatchErrorCode.

5 years agoMerging error code descriptions into E0107 and adding "no longer
Matthew Russo [Tue, 21 Aug 2018 01:34:55 +0000 (21:34 -0400)]
Merging error code descriptions into E0107 and adding "no longer
emitted" messages to the others.

5 years agoRollup merge of #53664 - IsaacWoods:fix_53608, r=oli-obk
kennytm [Fri, 24 Aug 2018 11:25:41 +0000 (19:25 +0800)]
Rollup merge of #53664 - IsaacWoods:fix_53608, r=oli-obk

Remove unnecessary closure in rustc_mir/build/mod.rs

Fixes #53608

5 years agoRollup merge of #53644 - llogiq:smallvec-for-small-c-str, r=estebank
kennytm [Fri, 24 Aug 2018 08:44:51 +0000 (16:44 +0800)]
Rollup merge of #53644 - llogiq:smallvec-for-small-c-str, r=estebank

Use SmallVec for SmallCStr

This reuses the awesome optimizations from Servo's `SmallVec` to speed up `SmallCStr`.

5 years agoRollup merge of #53636 - frewsxcv:frewsxcv-nth, r=rkruppe
kennytm [Fri, 24 Aug 2018 08:44:50 +0000 (16:44 +0800)]
Rollup merge of #53636 - frewsxcv:frewsxcv-nth, r=rkruppe

Prefer `.nth(n)` over `.skip(n).next()`.

Found by clippy.

5 years agoRollup merge of #53618 - GuillaumeGomez:fmt-examples, r=QuietMisdreavus
kennytm [Fri, 24 Aug 2018 08:44:47 +0000 (16:44 +0800)]
Rollup merge of #53618 - GuillaumeGomez:fmt-examples, r=QuietMisdreavus

Add missing fmt examples

r? @QuietMisdreavus

5 years agoRollup merge of #53617 - joshtriplett:tidy-no-license-header, r=Mark-Simulacrum
kennytm [Fri, 24 Aug 2018 08:44:44 +0000 (16:44 +0800)]
Rollup merge of #53617 - joshtriplett:tidy-no-license-header, r=Mark-Simulacrum

tidy: Stop requiring a license header

Previously approved in rust-lang/rust#43498 ; update tidy to match.

5 years agoRollup merge of #53614 - RalfJung:nomicon, r=kennytm
kennytm [Fri, 24 Aug 2018 08:44:42 +0000 (16:44 +0800)]
Rollup merge of #53614 - RalfJung:nomicon, r=kennytm

update nomicon and book

5 years agoRollup merge of #53600 - varkor:expected-generic-arg-s, r=eddyb
kennytm [Fri, 24 Aug 2018 08:44:40 +0000 (16:44 +0800)]
Rollup merge of #53600 - varkor:expected-generic-arg-s, r=eddyb

Fix a grammatical mistake in "expected generic arguments" errors

r? @eddyb

5 years agoRollup merge of #53594 - rust-lang:Aaronepower-patch-1, r=Mark-Simulacrum
kennytm [Fri, 24 Aug 2018 08:44:39 +0000 (16:44 +0800)]
Rollup merge of #53594 - rust-lang:Aaronepower-patch-1, r=Mark-Simulacrum

Update RELEASES.md to include clippy-preview

[Rendered](https://github.com/rust-lang/rust/blob/Aaronepower-patch-1/RELEASES.md#misc)

r? @Mark-Simulacrum

5 years agoRollup merge of #53592 - matthiaskrgr:str_doc, r=alexcrichton
kennytm [Fri, 24 Aug 2018 08:44:38 +0000 (16:44 +0800)]
Rollup merge of #53592 - matthiaskrgr:str_doc, r=alexcrichton

docs: minor stylistic changes to str/string docs

std::string::String.repeat(): slightly rephrase to be more in-line with other descriptions.

add ticks around a few keywords in other descriptions.

5 years agoAuto merge of #53653 - petrochenkov:moreregr, r=Mark-Simulacrum
bors [Fri, 24 Aug 2018 11:22:11 +0000 (11:22 +0000)]
Auto merge of #53653 - petrochenkov:moreregr, r=Mark-Simulacrum

Address two regressions

Remove assert checking that expansion data is immutable until I have time to investigate why it's firing, cc https://github.com/rust-lang/rust/issues/52363
Turn the error for module-relative access to macro-expanded `macro_export` macros into a deprecation lint, closes https://github.com/rust-lang/rust/issues/53495

5 years agoAdded rustc_codegen_llvm to compiler documentation.
David Wood [Fri, 24 Aug 2018 11:09:34 +0000 (13:09 +0200)]
Added rustc_codegen_llvm to compiler documentation.

5 years agoRemove unnecessary closure in rustc_mir/build/mod.rs
Isaac Woods [Fri, 24 Aug 2018 10:20:30 +0000 (11:20 +0100)]
Remove unnecessary closure in rustc_mir/build/mod.rs

5 years agoIntroduce `UnionIntoIdxSet` and `SubtractFromIdxSet` traits.
Nicholas Nethercote [Mon, 20 Aug 2018 05:34:08 +0000 (15:34 +1000)]
Introduce `UnionIntoIdxSet` and `SubtractFromIdxSet` traits.

They let `union()`, `union_sparse()` and `union_hybrid()` be merged.
Likewise for subtract()`, `subtract_sparse()` and `subtract_hybrid()`.

5 years agoRename `universe_size` as `domain_size`.
Nicholas Nethercote [Mon, 20 Aug 2018 05:23:47 +0000 (15:23 +1000)]
Rename `universe_size` as `domain_size`.

Because `domain` is a more obvious term than `universe` for this
concept.

5 years agoRollup merge of #53563 - matthiaskrgr:String, r=varkor
kennytm [Fri, 24 Aug 2018 08:44:35 +0000 (16:44 +0800)]
Rollup merge of #53563 - matthiaskrgr:String, r=varkor

use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into()

5 years agoRollup merge of #53562 - varkor:bastion-of-the-turbofish, r=nagisa
kennytm [Fri, 24 Aug 2018 08:44:34 +0000 (16:44 +0800)]
Rollup merge of #53562 - varkor:bastion-of-the-turbofish, r=nagisa

Lament the invincibility of the Turbofish

Here a test case is added to ensure that any others attempting to drive the Turbofish to extinction have second thoughts. Previously the [entire test suite would succeed](https://github.com/rust-lang/rust/pull/53511) if generic arguments were accepted without disambiguation, making for [confusing and heartbreaking circumstances](https://github.com/rust-lang/rfcs/pull/2527).

5 years agoRollup merge of #53559 - Dylan-DPC:fix/missing-doc-lint, r=kennytm
kennytm [Fri, 24 Aug 2018 08:44:32 +0000 (16:44 +0800)]
Rollup merge of #53559 - Dylan-DPC:fix/missing-doc-lint, r=kennytm

add macro check for lint

Fixes #53537

5 years agoRollup merge of #53503 - kornelski:master, r=dtolnay
kennytm [Fri, 24 Aug 2018 08:44:31 +0000 (16:44 +0800)]
Rollup merge of #53503 - kornelski:master, r=dtolnay

Discourage overuse of mem::forget

Some uses of `mem::forget` have been replaced by better methods of `Box`, so I've removed obsoleted use-cases from these docs.

I've removed emphasis on leaking, because it's not obvious `mem::forget` does not guarantee leaking of memory: memory of stack-allocated objects and values partially moved out of `Box` will still be freed. That's a potential error when used to pass objects to FFI, so it's better to direct users to `Box::into_raw` instead.

5 years agoRollup merge of #53311 - RalfJung:windows-mutex, r=retep998
kennytm [Fri, 24 Aug 2018 08:44:30 +0000 (16:44 +0800)]
Rollup merge of #53311 - RalfJung:windows-mutex, r=retep998

Window Mutex: Document that we properly initialize the SRWLock

See https://github.com/rust-lang/rust/issues/35836

5 years agoStabilize 'attr_literals' feature.
Sergio Benitez [Fri, 3 Aug 2018 22:05:05 +0000 (15:05 -0700)]
Stabilize 'attr_literals' feature.