]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoOrder the Rust and C ABIs first to reduce test churn
Jake Goulding [Tue, 2 Jun 2020 02:20:12 +0000 (22:20 -0400)]
Order the Rust and C ABIs first to reduce test churn

4 years agoAuto merge of #72927 - petrochenkov:rustc, r=Mark-Simulacrum
bors [Sat, 6 Jun 2020 09:00:51 +0000 (09:00 +0000)]
Auto merge of #72927 - petrochenkov:rustc, r=Mark-Simulacrum

Rename all remaining compiler crates to use the `rustc_foo` pattern

libarena -> librustc_arena
libfmt_macros -> librustc_parse_format
libgraphviz -> librustc_graphviz
libserialize -> librustc_serialize

Closes https://github.com/rust-lang/rust/issues/71177 in particular.

4 years agoAuto merge of #72982 - tblah:riscv-ui-tests, r=estebank
bors [Fri, 5 Jun 2020 18:55:52 +0000 (18:55 +0000)]
Auto merge of #72982 - tblah:riscv-ui-tests, r=estebank

resolve: Sort E0408 errors by Symbol str

This is a request for comments implementing my suggested solution to https://github.com/rust-lang/rust/issues/72913

Previously errors were sorted by Symbol index instead of the string. The indexes are not the same between architectures because Symbols for architecture extensions (e.g. x86 AVX or RISC-V d) are interned before the source file is parsed. RISC-V's naming of extensions after single letters led to it having errors sorted differently for test cases using single letter variable names. Instead sort the errors by the Symbol string so that it is stable across architectures.

While I was at it, there's also 8edb05c2  skipping some ui tests which I think are irrelevant for risc-v.

4 years agoAuto merge of #73025 - Dylan-DPC:rollup-a1uzj5u, r=Dylan-DPC
bors [Fri, 5 Jun 2020 15:21:01 +0000 (15:21 +0000)]
Auto merge of #73025 - Dylan-DPC:rollup-a1uzj5u, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #72260 (Spell out `Self` in async function return)
 - #72996 (Remove unsused `NodeId` related APIs in hir map)
 - #73010 (Update RELEASES.md)
 - #73017 (Use assert_eq for liballoc test)
 - #73019 (add test for #72960)

Failed merges:

r? @ghost

4 years agoAuto merge of #72957 - Mark-Simulacrum:bootstrap-bump, r=sfackler
bors [Fri, 5 Jun 2020 11:11:26 +0000 (11:11 +0000)]
Auto merge of #72957 - Mark-Simulacrum:bootstrap-bump, r=sfackler

Bump bootstrap compiler to 1.45

Pretty standard update.

4 years agoRollup merge of #73019 - matthiaskrgr:test_72960, r=Xanewok
Dylan DPC [Fri, 5 Jun 2020 11:07:10 +0000 (13:07 +0200)]
Rollup merge of #73019 - matthiaskrgr:test_72960, r=Xanewok

add test for #72960

Fixes #72960

r? @Xanewok

4 years agoRollup merge of #73017 - pickfire:liballoc-assert, r=Xanewok
Dylan DPC [Fri, 5 Jun 2020 11:07:08 +0000 (13:07 +0200)]
Rollup merge of #73017 - pickfire:liballoc-assert, r=Xanewok

Use assert_eq for liballoc test

4 years agoRollup merge of #73010 - tshepang:patch-2, r=Mark-Simulacrum
Dylan DPC [Fri, 5 Jun 2020 11:07:06 +0000 (13:07 +0200)]
Rollup merge of #73010 - tshepang:patch-2, r=Mark-Simulacrum

Update RELEASES.md

try fix the f64 as u32 line

4 years agoRollup merge of #72996 - marmeladema:remove-hir-map-nodeid-apis, r=ecstatic-morse
Dylan DPC [Fri, 5 Jun 2020 11:07:05 +0000 (13:07 +0200)]
Rollup merge of #72996 - marmeladema:remove-hir-map-nodeid-apis, r=ecstatic-morse

Remove unsused `NodeId` related APIs in hir map

cc #50928

r? @ecstatic-morse

4 years agoRollup merge of #72260 - csmoe:issue-69276, r=estebank
Dylan DPC [Fri, 5 Jun 2020 11:07:03 +0000 (13:07 +0200)]
Rollup merge of #72260 - csmoe:issue-69276, r=estebank

Spell out `Self` in async function return

Closes #69276
r? @tmandry

4 years agoadd test for #72960
Matthias Krüger [Fri, 5 Jun 2020 10:03:43 +0000 (12:03 +0200)]
add test for #72960

Fixes #72960

4 years agoUse assert_eq for liballoc test
Ivan Tham [Fri, 5 Jun 2020 08:56:51 +0000 (16:56 +0800)]
Use assert_eq for liballoc test

4 years agoUpdate RELEASES.md
Tshepang Lekhonkhobe [Fri, 5 Jun 2020 01:30:56 +0000 (03:30 +0200)]
Update RELEASES.md

try fix the f64 as u32 line

4 years agoAuto merge of #72901 - ehuss:update-cargo, r=Mark-Simulacrum
bors [Thu, 4 Jun 2020 23:17:05 +0000 (23:17 +0000)]
Auto merge of #72901 - ehuss:update-cargo, r=Mark-Simulacrum

Update cargo

9 commits in 9fcb8c1d20c17f51054f7aa4e08ff28d381fe096..40ebd52206e25c7a576ee42c137cc06a745a167a
2020-05-25 16:25:36 +0000 to 2020-06-01 22:35:00 +0000
- Warn if using hash in git URL, Fixes rust-lang/cargo#8241 (rust-lang/cargo#8297)
- reset lockfile information between resolutions (rust-lang/cargo#8274)
- Disable strip_works test on macos. (rust-lang/cargo#8301)
- Fix typo in impl Display for Strip (rust-lang/cargo#8299)
- Add support for rustdoc root URL mappings. (rust-lang/cargo#8287)
- Fix tests with enoent error message on non-english systems. (rust-lang/cargo#8295)
- Fix fingerprinting for lld on Windows with dylib. (rust-lang/cargo#8290)
- Fix a typo (rust-lang/cargo#8289)
- Fix several issues with close_output test. (rust-lang/cargo#8286)

4 years agoEnable lld for Cargo tests on Windows.
Eric Huss [Thu, 4 Jun 2020 21:32:23 +0000 (14:32 -0700)]
Enable lld for Cargo tests on Windows.

4 years agoRemove unsused `NodeId` related APIs in hir map
marmeladema [Thu, 4 Jun 2020 19:31:51 +0000 (20:31 +0100)]
Remove unsused `NodeId` related APIs in hir map

4 years agoAuto merge of #72995 - Dylan-DPC:rollup-7gsyb8x, r=Dylan-DPC
bors [Thu, 4 Jun 2020 19:31:59 +0000 (19:31 +0000)]
Auto merge of #72995 - Dylan-DPC:rollup-7gsyb8x, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #72946 (remove outdated fixme)
 - #72971 (Hexagon libstd: fix typo for c_ulonglong)
 - #72986 (Add more assert to Vec with_capacity docs)
 - #72987 (Add myself to mailmap)
 - #72990 (Fix missing word in RELEASES.md)

Failed merges:

r? @ghost

4 years agoRollup merge of #72990 - rust-lang:wesleywiser-patch-1, r=Dylan-DPC
Dylan DPC [Thu, 4 Jun 2020 19:31:22 +0000 (21:31 +0200)]
Rollup merge of #72990 - rust-lang:wesleywiser-patch-1, r=Dylan-DPC

Fix missing word in RELEASES.md

4 years agoRollup merge of #72987 - BatmanAoD:kjs-mailmap, r=Mark-Simulacrum
Dylan DPC [Thu, 4 Jun 2020 19:31:20 +0000 (21:31 +0200)]
Rollup merge of #72987 - BatmanAoD:kjs-mailmap, r=Mark-Simulacrum

Add myself to mailmap

Now that I have (accidentally) made contributions using two separate email addresses, I've added the rest of the addresses I typical use.

4 years agoRollup merge of #72986 - pickfire:vec-assert, r=Mark-Simulacrum
Dylan DPC [Thu, 4 Jun 2020 19:31:19 +0000 (21:31 +0200)]
Rollup merge of #72986 - pickfire:vec-assert, r=Mark-Simulacrum

Add more assert to Vec with_capacity docs

Show assertion on len too to show them how adding new items will affect both the
length and capacity, before and after.

4 years agoRollup merge of #72971 - androm3da:fixes_00, r=Dylan-DPC
Dylan DPC [Thu, 4 Jun 2020 19:31:15 +0000 (21:31 +0200)]
Rollup merge of #72971 - androm3da:fixes_00, r=Dylan-DPC

Hexagon libstd: fix typo for c_ulonglong

4 years agoRollup merge of #72946 - lcnr:remove-fixme, r=Dylan-DPC
Dylan DPC [Thu, 4 Jun 2020 19:31:12 +0000 (21:31 +0200)]
Rollup merge of #72946 - lcnr:remove-fixme, r=Dylan-DPC

remove outdated fixme

This function now accepts `impl Iterator<Item = ty::Predicate<'tcx>>`.

4 years agoFix missing word in RELEASES.md
Wesley Wiser [Thu, 4 Jun 2020 18:36:23 +0000 (14:36 -0400)]
Fix missing word in RELEASES.md

4 years agoAdd Kyle Strand to mailmap
Kyle Strand [Thu, 4 Jun 2020 17:43:29 +0000 (11:43 -0600)]
Add Kyle Strand to mailmap

4 years agoAdd more assert to Vec with_capacity docs
Ivan Tham [Thu, 4 Jun 2020 17:11:01 +0000 (01:11 +0800)]
Add more assert to Vec with_capacity docs

Show assertion on len too to show them how adding new items will affect both the
length and capacity, before and after.

4 years agoresolve: Sort E0408 errors by Symbol str
Tom Eccles [Tue, 2 Jun 2020 11:07:43 +0000 (12:07 +0100)]
resolve: Sort E0408 errors by Symbol str

Previously errors were sorted by Symbol index instead of the string. The
indexes are not the same between architectures because Symbols for
architecture extensions (e.g. x86 AVX or RISC-V d) are interned before
the source file is parsed. RISC-V's naming of extensions after single
letters led to it having errors sorted differently for test cases using
single letter variable names. Instead sort the errors by the Symbol
string so that it is stable across architectures.

4 years agotest: ui: skip tests which aren't appropriate for RISC-V
Tom Eccles [Wed, 20 May 2020 16:35:47 +0000 (17:35 +0100)]
test: ui: skip tests which aren't appropriate for RISC-V

4 years agoAuto merge of #72882 - marmeladema:save-analysis-hir-tree, r=Xanewok
bors [Thu, 4 Jun 2020 14:16:13 +0000 (14:16 +0000)]
Auto merge of #72882 - marmeladema:save-analysis-hir-tree, r=Xanewok

save_analysis: work on HIR tree instead of AST

In order to reduce the uses of `NodeId`s in the compiler, `save_analysis` crate has been reworked to operate on the HIR tree instead of the AST.

cc #50928

4 years agoAuto merge of #72975 - Dylan-DPC:rollup-6zvco5x, r=Dylan-DPC
bors [Thu, 4 Jun 2020 10:17:38 +0000 (10:17 +0000)]
Auto merge of #72975 - Dylan-DPC:rollup-6zvco5x, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #72718 (Add regression test for #72554)
 - #72782 (rustc_target: Remove `pre_link_args_crt`)
 - #72923 (Improve E0433, so that it suggests missing imports)
 - #72950 (fix `AdtDef` docs)
 - #72951 (Add Camelid per request)
 - #72964 (Bump libc dependency to latest version (0.2.71))

Failed merges:

r? @ghost

4 years agoRollup merge of #72964 - sajattack:libc-0.2.71-bump, r=Mark-Simulacrum
Dylan DPC [Thu, 4 Jun 2020 10:12:52 +0000 (12:12 +0200)]
Rollup merge of #72964 - sajattack:libc-0.2.71-bump, r=Mark-Simulacrum

Bump libc dependency to latest version (0.2.71)

Hello,

Just a quick version bump PR. The rust-psp group had some changes merged to libc recently but they haven't made it into the compiler. We're looking to remove our forked version from our Xargo.toml. Thanks.

4 years agoRollup merge of #72951 - rust-lang:Camelid-RustThanks, r=Mark-Simulacrum
Dylan DPC [Thu, 4 Jun 2020 10:12:51 +0000 (12:12 +0200)]
Rollup merge of #72951 - rust-lang:Camelid-RustThanks, r=Mark-Simulacrum

Add Camelid per request

Email from @camelid:

> HI there,
>
> I’m a new contributor and I just looked at Rust Thanks and noticed that my contributions are listed under two different capitalizations of my name: “Camelid" and “camelid". Could you make them both “Camelid"?
>
> Thanks!
>
> Camelid

4 years agoRollup merge of #72950 - lcnr:fix_doc, r=davidtwco
Dylan DPC [Thu, 4 Jun 2020 10:12:49 +0000 (12:12 +0200)]
Rollup merge of #72950 - lcnr:fix_doc, r=davidtwco

fix `AdtDef` docs

4 years agoRollup merge of #72923 - Patryk27:fix/52468, r=estebank
Dylan DPC [Thu, 4 Jun 2020 10:12:47 +0000 (12:12 +0200)]
Rollup merge of #72923 - Patryk27:fix/52468, r=estebank

Improve E0433, so that it suggests missing imports

Closes #52468

4 years agoRollup merge of #72782 - petrochenkov:crtargs, r=varkor
Dylan DPC [Thu, 4 Jun 2020 10:12:45 +0000 (12:12 +0200)]
Rollup merge of #72782 - petrochenkov:crtargs, r=varkor

rustc_target: Remove `pre_link_args_crt`

To regain some more control over the definition of `+crt-static` (https://github.com/rust-lang/rust/pull/71586).

After https://github.com/rust-lang/rust/pull/71769 this target option wasn't used anywhere except for VxWorks, and I suspect that for VxWorks its use may be redundant as well.

4 years agoRollup merge of #72718 - estebank:impl-trait-obligation-failure, r=matthewjasper
Dylan DPC [Thu, 4 Jun 2020 10:12:40 +0000 (12:12 +0200)]
Rollup merge of #72718 - estebank:impl-trait-obligation-failure, r=matthewjasper

Add regression test for #72554

Fix #72554.

4 years agoUpdate `rls` submodule
marmeladema [Wed, 3 Jun 2020 14:03:37 +0000 (15:03 +0100)]
Update `rls` submodule

4 years agosave_analysis: work on HIR tree instead of AST
marmeladema [Sat, 30 May 2020 17:30:34 +0000 (18:30 +0100)]
save_analysis: work on HIR tree instead of AST

4 years agoAuto merge of #72618 - Aaron1011:feature/early-sourcemap, r=petrochenkov
bors [Thu, 4 Jun 2020 04:38:48 +0000 (04:38 +0000)]
Auto merge of #72618 - Aaron1011:feature/early-sourcemap, r=petrochenkov

Make `SourceMap` available for early debug-printing of `Span`s

Normally, we debug-print `Spans` using the `SourceMap` retrieved from
the global `TyCtxt`. However, we fall back to printing out the `Span`'s
raw fields (instead of a file and line number) when we try to print a
`Span` before a `TyCtxt` is available. This makes debugging early phases
of the compile, such as parsing, much more difficult.

This commit stores a `SourceMap` in `rustc_span::GlOBALS` as a fallback.
When a `TyCtxt` is not available, we try to retrieve one from `GLOBALS`
- only if this is not available do we fall back to the raw field output.

I'm not sure how to write a test for this - however, this can be
verified locally by setting `RUSTC_LOG="rustc_parse=debug"`, and
verifying that the output contains filenames and line numbers.

4 years agoHexagon libstd: fix typo for c_ulonglong
Brian Cain [Thu, 4 Jun 2020 03:36:28 +0000 (22:36 -0500)]
Hexagon libstd: fix typo for c_ulonglong

4 years agoresolve error code e0760
csmoe [Fri, 22 May 2020 04:14:53 +0000 (12:14 +0800)]
resolve error code e0760

4 years agoBump libc dependency to latest version (0.2.71)
Paul Sajna [Wed, 3 Jun 2020 23:21:16 +0000 (16:21 -0700)]
Bump libc dependency to latest version (0.2.71)

4 years agoAuto merge of #72754 - lcnr:predicate-fold, r=nikomatsakis
bors [Wed, 3 Jun 2020 20:12:40 +0000 (20:12 +0000)]
Auto merge of #72754 - lcnr:predicate-fold, r=nikomatsakis

remove trivial `mk_predicate`s

r? @nikomatsakis

4 years agoBump to 1.46
Mark Rousskov [Wed, 3 Jun 2020 19:15:53 +0000 (15:15 -0400)]
Bump to 1.46

4 years agoAdd Camelid
Kyle J Strand [Wed, 3 Jun 2020 17:44:41 +0000 (11:44 -0600)]
Add Camelid

Email from @camelid:

> HI there,
>
> I’m a new contributor and I just looked at Rust Thanks and noticed that my contributions are listed under two different capitalizations of my name: “Camelid" and “camelid". Could you make them both “Camelid"?
>
> Thanks!
>
> Camelid

4 years agofix `AdtDef` docs
Bastian Kauschke [Wed, 3 Jun 2020 17:24:58 +0000 (19:24 +0200)]
fix `AdtDef` docs

4 years agorustc_target: Remove `pre_link_args_crt`
Vadim Petrochenkov [Sat, 30 May 2020 14:03:50 +0000 (17:03 +0300)]
rustc_target: Remove `pre_link_args_crt`

4 years agoAuto merge of #72948 - Dylan-DPC:rollup-fazhw00, r=Dylan-DPC
bors [Wed, 3 Jun 2020 16:06:30 +0000 (16:06 +0000)]
Auto merge of #72948 - Dylan-DPC:rollup-fazhw00, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #72586 (split select into submodules)
 - #72900 (Don't count pathless --extern for unused-crate-dependencies warnings)
 - #72924 (Stabilize `std::io::Buf{Reader, Writer}::capacity`)
 - #72942 (clean up E0641 explanation)
 - #72945 (Updated documentation for Control Flow Guard)

Failed merges:

r? @ghost

4 years agoRollup merge of #72945 - ajpaverd:cfguard-docs, r=Mark-Simulacrum
Dylan DPC [Wed, 3 Jun 2020 16:05:44 +0000 (18:05 +0200)]
Rollup merge of #72945 - ajpaverd:cfguard-docs, r=Mark-Simulacrum

Updated documentation for Control Flow Guard

Update user-facing documentation for the Control Flow Guard (CFG) exploit mitigation in the unstable book, as requested in #68793.

4 years agoRollup merge of #72942 - GuillaumeGomez:cleanup-e0641, r=Dylan-DPC
Dylan DPC [Wed, 3 Jun 2020 16:05:42 +0000 (18:05 +0200)]
Rollup merge of #72942 - GuillaumeGomez:cleanup-e0641, r=Dylan-DPC

clean up E0641 explanation

r? @Dylan-DPC

4 years agoRollup merge of #72924 - JohnTitor:stabilize-buf-capacity, r=shepmaster
Dylan DPC [Wed, 3 Jun 2020 16:05:41 +0000 (18:05 +0200)]
Rollup merge of #72924 - JohnTitor:stabilize-buf-capacity, r=shepmaster

Stabilize `std::io::Buf{Reader, Writer}::capacity`

Closes #68833
FCP is done here: https://github.com/rust-lang/rust/issues/68833#issuecomment-637596083

4 years agoRollup merge of #72900 - jsgf:no-unused-pathless, r=petrochenkov
Dylan DPC [Wed, 3 Jun 2020 16:05:39 +0000 (18:05 +0200)]
Rollup merge of #72900 - jsgf:no-unused-pathless, r=petrochenkov

Don't count pathless --extern for unused-crate-dependencies warnings

`--extern proc_macro` is used to add the proc_macro crate to the extern
prelude for all procmacros. In general pathless `--extern` only references
sysroot/standard libraries and so should be exempt from
unused-crate-dependencies warnings.

r? @petrochenkov

4 years agoRollup merge of #72586 - lcnr:winner-winnowing, r=nikomatsakis
Dylan DPC [Wed, 3 Jun 2020 16:05:37 +0000 (18:05 +0200)]
Rollup merge of #72586 - lcnr:winner-winnowing, r=nikomatsakis

split select into submodules

https://github.com/rust-lang/rust/blob/a0f06d11ae7fe29c8e263e2a5d8cd41b372f0283/src/librustc_trait_selection/traits/select.rs#L1

I extracted two submodules:

- confirmation: apart from `pub(super) fn confirm_candidate`, everything else is private
- candidate_assembly: exports `pub(super) fn candidate_from_obligation` and `pub(super) fn assemble_candidates`

I tried to change as little as possible while doing this and hopefully split this into well reviewable commits.

4 years agoremove outdated fixme
Bastian Kauschke [Wed, 3 Jun 2020 13:59:10 +0000 (15:59 +0200)]
remove outdated fixme

4 years agoUpdated documentation for Control Flow Guard
Andrew Paverd [Wed, 3 Jun 2020 13:25:58 +0000 (14:25 +0100)]
Updated documentation for Control Flow Guard

4 years agoremove ignore-tidy-filelength
Bastian Kauschke [Mon, 25 May 2020 20:28:11 +0000 (22:28 +0200)]
remove ignore-tidy-filelength

4 years agomove confirmation into submodule
Bastian Kauschke [Mon, 25 May 2020 20:33:21 +0000 (22:33 +0200)]
move confirmation into submodule

4 years agomove candidate assembly into a submodule
Bastian Kauschke [Mon, 25 May 2020 20:08:30 +0000 (22:08 +0200)]
move candidate assembly into a submodule

4 years agomove select into subfolder
Bastian Kauschke [Mon, 25 May 2020 18:38:19 +0000 (20:38 +0200)]
move select into subfolder

4 years agoAuto merge of #72746 - petrhosek:libunwind-hermetic, r=tmandry
bors [Wed, 3 Jun 2020 12:20:45 +0000 (12:20 +0000)]
Auto merge of #72746 - petrhosek:libunwind-hermetic, r=tmandry

Make libunwind build hermetic

We want to avoid exporting any symbols from Rust's version of libunwind,
and to do so we need to disable visibility annotations to make sure that
the -fvisibility=hidden has effect, and also hide global new/delete.

This matches the CMake build of libunwind.

4 years agoclean up E0641 explanation
Guillaume Gomez [Wed, 3 Jun 2020 11:52:09 +0000 (13:52 +0200)]
clean up E0641 explanation

4 years agoAuto merge of #70107 - lcnr:issue68977, r=eddyb
bors [Wed, 3 Jun 2020 08:43:11 +0000 (08:43 +0000)]
Auto merge of #70107 - lcnr:issue68977, r=eddyb

WF-check all ty::Const's, not just array lengths.

fixes #68977

This PR removes the special case for array length in `wf::compute` and
checks the well formedness of all consts.

Changes `PredicateKind::WellFormed` to take a `GenericArg` and updates `wf::obligations`.

4 years agoFix a typo in `late.rs`
Patryk Wychowaniec [Wed, 3 Jun 2020 06:38:10 +0000 (08:38 +0200)]
Fix a typo in `late.rs`

Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
4 years agoAuto merge of #72935 - Dylan-DPC:rollup-60g3ab6, r=Dylan-DPC
bors [Wed, 3 Jun 2020 01:00:39 +0000 (01:00 +0000)]
Auto merge of #72935 - Dylan-DPC:rollup-60g3ab6, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #72704 (Remote testing fixes)
 - #72820 (InstCombine: Don't optimize `&mut *x` into `x`)
 - #72848 (Correct generic parameter ordering in error note for E0747)
 - #72902 (Add a test to ensure Fuse stays covariant)
 - #72921 (Add assert to Vec with_capacity docs)

Failed merges:

r? @ghost

4 years agoRollup merge of #72921 - pickfire:vec-assert, r=Mark-Simulacrum
Dylan DPC [Wed, 3 Jun 2020 00:39:09 +0000 (02:39 +0200)]
Rollup merge of #72921 - pickfire:vec-assert, r=Mark-Simulacrum

Add assert to Vec with_capacity docs

4 years agoRollup merge of #72902 - cuviper:fuse-covariant, r=nikomatsakis
Dylan DPC [Wed, 3 Jun 2020 00:39:07 +0000 (02:39 +0200)]
Rollup merge of #72902 - cuviper:fuse-covariant, r=nikomatsakis

Add a test to ensure Fuse stays covariant

When #70502 attempted to specialize the data types in `Fuse`, one of the problems we found was that it broke variance. This was also realized when `Fuse` was first added, https://github.com/rust-lang/rust/pull/35656#discussion-diff-74995079, but now this PR adds a test so we don't forget again.

4 years agoRollup merge of #72848 - camelid:fix-72815, r=varkor
Dylan DPC [Wed, 3 Jun 2020 00:39:05 +0000 (02:39 +0200)]
Rollup merge of #72848 - camelid:fix-72815, r=varkor

Correct generic parameter ordering in error note for E0747

Fixes #72815.

r? @varkor

4 years agoRollup merge of #72820 - jonas-schievink:instcombine-uninit, r=oli-obk
Dylan DPC [Wed, 3 Jun 2020 00:39:03 +0000 (02:39 +0200)]
Rollup merge of #72820 - jonas-schievink:instcombine-uninit, r=oli-obk

InstCombine: Don't optimize `&mut *x` into `x`

Fixes https://github.com/rust-lang/rust/issues/72797

4 years agoRollup merge of #72704 - tblah:remote-testing-fixes, r=Mark-Simulacrum
Dylan DPC [Wed, 3 Jun 2020 00:38:59 +0000 (02:38 +0200)]
Rollup merge of #72704 - tblah:remote-testing-fixes, r=Mark-Simulacrum

Remote testing fixes

Improvements for remote testing

- Create a `RUST_TEST_TMPDIR` directory on the remote testing host
- Verbose mode for remote-test-server
- Skip tests which don't support remote testing using `// ignore-remote`

To test:
- Build `remote-test-server` for the target machine and copy it over
- On the target:
``` sh
remote-test-server remote
```
- On the build machine
``` sh
export TEST_DEVICE_ADDR="1.2.3.4:12345"
./x.py test
```

4 years agoUpdate fulldeps tests and clippy
Vadim Petrochenkov [Tue, 2 Jun 2020 19:46:42 +0000 (22:46 +0300)]
Update fulldeps tests and clippy

4 years agoStabilize `std::io::Buf{Reader, Writer}::capacity`
Yuki Okushi [Tue, 2 Jun 2020 19:23:01 +0000 (04:23 +0900)]
Stabilize `std::io::Buf{Reader, Writer}::capacity`

4 years agoImprove E0433, so that it suggests missing imports
Patryk Wychowaniec [Tue, 2 Jun 2020 18:16:23 +0000 (20:16 +0200)]
Improve E0433, so that it suggests missing imports

4 years agoRename the crates in source code
Vadim Petrochenkov [Tue, 2 Jun 2020 17:19:49 +0000 (20:19 +0300)]
Rename the crates in source code

4 years agoMake things build again
Vadim Petrochenkov [Tue, 2 Jun 2020 17:03:40 +0000 (20:03 +0300)]
Make things build again

4 years agoAdd assert to Vec with_capacity docs
Ivan Tham [Tue, 2 Jun 2020 17:29:02 +0000 (01:29 +0800)]
Add assert to Vec with_capacity docs

4 years agoRename directories for some compiler crates from `libx` to `librustc_x`
Vadim Petrochenkov [Tue, 2 Jun 2020 16:53:33 +0000 (19:53 +0300)]
Rename directories for some compiler crates from `libx` to `librustc_x`

libarena -> librustc_arena
libfmt_macros -> librustc_parse_format
libgraphviz -> librustc_graphviz
libserialize -> librustc_serialize

4 years agoAuto merge of #72918 - Dylan-DPC:rollup-pnvj62b, r=Dylan-DPC
bors [Tue, 2 Jun 2020 16:30:44 +0000 (16:30 +0000)]
Auto merge of #72918 - Dylan-DPC:rollup-pnvj62b, r=Dylan-DPC

Rollup of 4 pull requests

Successful merges:

 - #72884 (RawString error reporting cleanup )
 - #72888 (Add a warning about infinite reading in read_(until|line))
 - #72914 (Minor: off-by-one error in RELEASES.md)
 - #72916 (Update README.md)

Failed merges:

r? @ghost

4 years agoRollup merge of #72916 - DutchGhost:patch-1, r=jonas-schievink
Dylan DPC [Tue, 2 Jun 2020 16:30:05 +0000 (18:30 +0200)]
Rollup merge of #72916 - DutchGhost:patch-1, r=jonas-schievink

Update README.md

https://github.com/rust-lang/rust/pull/72827 changed it from `*.nix` to `Unix-like system`, but actually it should be `a Unix-like system`

4 years agoRollup merge of #72914 - petertodd:2020-minor-at-most-32, r=jonas-schievink
Dylan DPC [Tue, 2 Jun 2020 16:30:03 +0000 (18:30 +0200)]
Rollup merge of #72914 - petertodd:2020-minor-at-most-32, r=jonas-schievink

Minor: off-by-one error in RELEASES.md

4 years agoRollup merge of #72888 - poliorcetics:improve-read_line-read_until-doc, r=Dylan-DPC
Dylan DPC [Tue, 2 Jun 2020 16:29:59 +0000 (18:29 +0200)]
Rollup merge of #72888 - poliorcetics:improve-read_line-read_until-doc, r=Dylan-DPC

Add a warning about infinite reading in read_(until|line)

Fix for #48788.

This PR adds a warning to [`BufRead::read_line`](https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#method.read_line) and [`BufRead::read_until`](https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#method.read_until) about the possibility of an attack using the behaviour of these functions.

I did not mention a possible fix (using [`Read::take`](https://doc.rust-lang.org/stable/std/io/trait.Read.html#method.take), should I ?

4 years agoRollup merge of #72884 - Julian-Wollersberger:raw_str_error_cleanup, r=petrochenkov
Dylan DPC [Tue, 2 Jun 2020 16:29:57 +0000 (18:29 +0200)]
Rollup merge of #72884 - Julian-Wollersberger:raw_str_error_cleanup, r=petrochenkov

RawString error reporting cleanup

I simplified how errors with raw string are represented in the lexer and reportet in the parser, by using one enum instead of two structs with impls. This makes 70 code lines obsolete.

I also noticed some other things (2nd commit) and added a missing test for the `too many '#' symbols' error.

My original intent was to improve performance, but the only thing I found was to inline some functions in `cursor.rs`. It's effect is barely measurable, though.

There is one open question. Before, the compiler aborts when encountering the `too many '#' symbols` error. Now the lexer says in this case that there are 0 hashes, and then later the parser aborts on the error.
I'm worrying that the parser may be changed to recover and continue, and then later stages will see the wrong numer of hashes and act strange. (eg. the `format!` macro expansion).
Is that possibility important enough today to worry about it?

4 years agoUpdate README.md
DutchGhost [Tue, 2 Jun 2020 14:12:36 +0000 (16:12 +0200)]
Update README.md

https://github.com/rust-lang/rust/pull/72827 changed it from `*.nix` to `Unix-like system`, but actually it should be `a Unix-like system`

4 years agoMinor: off-by-one error in RELEASES.md
Peter Todd [Tue, 2 Jun 2020 13:47:33 +0000 (09:47 -0400)]
Minor: off-by-one error in RELEASES.md

4 years agoupdate tests
Bastian Kauschke [Tue, 26 May 2020 21:13:18 +0000 (23:13 +0200)]
update tests

4 years agochange WellFormed predicate to GenericArg
Bastian Kauschke [Tue, 26 May 2020 21:12:01 +0000 (23:12 +0200)]
change WellFormed predicate to GenericArg

4 years agoadd WellFormedConst predicate
Bastian Kauschke [Sat, 23 May 2020 16:28:50 +0000 (18:28 +0200)]
add WellFormedConst predicate

4 years agoimplement wf checking for constants
Bastian Kauschke [Sat, 23 May 2020 13:29:51 +0000 (15:29 +0200)]
implement wf checking for constants

4 years agocompiletest: Add name directive for remote runners
Tom Eccles [Thu, 28 May 2020 16:32:12 +0000 (17:32 +0100)]
compiletest: Add name directive for remote runners

Allow tests to use
// ignore-remote
to ignore the test when using remote-test-{client,server}. In most
situations this would be covered by
// ignore-cross-compile
but I see no reason that a non-cross compiled remote test runner
shouldn't work.

4 years agotools/remote-test-server: make use of verbose option
Tom Eccles [Thu, 28 May 2020 16:53:29 +0000 (17:53 +0100)]
tools/remote-test-server: make use of verbose option

There was an unused verbose command line argument. Add some prints if
verbose is set.

4 years agotools/remote-test-{server,client}: support RUST_TEST_TMPDIR
Tom Eccles [Thu, 28 May 2020 15:27:56 +0000 (16:27 +0100)]
tools/remote-test-{server,client}: support RUST_TEST_TMPDIR

Some tests (e.g. ui-fulldeps/create-dir-all-bare.rs) assume that
RUST_TEST_TMPDIR exists on the system running the test. Expand
remote-test-{server,client} such that a tmp directory is created on the
remote runner and this environment variable will point at it.

4 years agoAuto merge of #72672 - seritools:remote-test-windows, r=Mark-Simulacrum
bors [Tue, 2 Jun 2020 07:54:38 +0000 (07:54 +0000)]
Auto merge of #72672 - seritools:remote-test-windows, r=Mark-Simulacrum

Make remote-test-client and remote-test-server compatible with windows

`compiletest` and `remote-test-client`:

The command line for `remote-test-client` was changed slightly to allow cross-platform compatible paths. The old way of supplying the support libs was by joining their paths with the executable path
with `:`. This caused Windows-style paths to be split after the directory letter. Now, the number of support libs is provided as a parameter as well, and the support lib paths are split off from the regular args in the client.

`remote-test-server`:

- Marked Unix-only parts as such and implemented Windows alternatives
- On Windows `LD_LIBRARY_PATH` doesn't exist. Libraries are loaded from `PATH` though, so that's the way around it.
- Tiny cleanup: `Command::args`/`envs` instead of manually looping over them
- The temp path for Windows has to be set via environment variable, since there isn't a global temp directory that would work on every machine (as a static string)

4 years agoAuto merge of #72905 - JohnTitor:rollup-phtyo5i, r=JohnTitor
bors [Tue, 2 Jun 2020 04:10:49 +0000 (04:10 +0000)]
Auto merge of #72905 - JohnTitor:rollup-phtyo5i, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #72775 (Return early to avoid ICE)
 - #72795 (Add a test for `$:ident` in proc macro input)
 - #72822 (remove trivial calls to mk_const)
 - #72825 (Clarify errors and warnings about the transition to the new asm!)
 - #72827 (changed *nix to Unix-like)
 - #72880 (Clean up E0637 explanation)
 - #72886 (Remove allow missing_debug_implementations for MaybeUninit)
 - #72889 (rustc: Remove the `--passive-segments` LLD flag on wasm)
 - #72891 (Add associated consts MIN/MAX for Wrapping<Int>)
 - #72893 (test miri-unleash TLS accesses)

Failed merges:

r? @ghost

4 years agoRollup merge of #72893 - RalfJung:unleash-tls, r=ecstatic-morse
Yuki Okushi [Tue, 2 Jun 2020 04:07:27 +0000 (13:07 +0900)]
Rollup merge of #72893 - RalfJung:unleash-tls, r=ecstatic-morse

test miri-unleash TLS accesses

Finally gets rid of `IS_SUPPORTED_IN_MIRI`. :-)

I also added a test for the new `asm!` while I am at it.

r? @ecstatic-morse Cc @rust-lang/wg-const-eval

4 years agoRollup merge of #72891 - lzutao:wrapping_int-max, r=sfackler
Yuki Okushi [Tue, 2 Jun 2020 04:07:25 +0000 (13:07 +0900)]
Rollup merge of #72891 - lzutao:wrapping_int-max, r=sfackler

Add associated consts MIN/MAX for Wrapping<Int>

4 years agoRollup merge of #72889 - alexcrichton:update-wasm-threads, r=nikomatsakis
Yuki Okushi [Tue, 2 Jun 2020 04:07:24 +0000 (13:07 +0900)]
Rollup merge of #72889 - alexcrichton:update-wasm-threads, r=nikomatsakis

rustc: Remove the `--passive-segments` LLD flag on wasm

This flag looks like it's been removed in LLVM 10, so this removes rustc
unconditionally passing the flag.

4 years agoRollup merge of #72886 - xfix:patch-21, r=jonas-schievink
Yuki Okushi [Tue, 2 Jun 2020 04:07:22 +0000 (13:07 +0900)]
Rollup merge of #72886 - xfix:patch-21, r=jonas-schievink

Remove allow missing_debug_implementations for MaybeUninit

It already has a Debug implementation.

4 years agoRollup merge of #72880 - GuillaumeGomez:cleanup-e0637, r=Dylan-DPC
Yuki Okushi [Tue, 2 Jun 2020 04:07:20 +0000 (13:07 +0900)]
Rollup merge of #72880 - GuillaumeGomez:cleanup-e0637, r=Dylan-DPC

Clean up E0637 explanation

r? @Dylan-DPC

4 years agoRollup merge of #72827 - milrope:patch-1, r=nikomatsakis
Yuki Okushi [Tue, 2 Jun 2020 04:07:18 +0000 (13:07 +0900)]
Rollup merge of #72827 - milrope:patch-1, r=nikomatsakis

changed *nix to Unix-like

4 years agoRollup merge of #72825 - Amanieu:asm-warning, r=davidtwco
Yuki Okushi [Tue, 2 Jun 2020 04:07:17 +0000 (13:07 +0900)]
Rollup merge of #72825 - Amanieu:asm-warning, r=davidtwco

Clarify errors and warnings about the transition to the new asm!

Hopefully addresses the concerns from https://github.com/rust-lang/rust/pull/71007#issuecomment-636412905.

4 years agoRollup merge of #72822 - lcnr:intern-me, r=estebank
Yuki Okushi [Tue, 2 Jun 2020 04:07:15 +0000 (13:07 +0900)]
Rollup merge of #72822 - lcnr:intern-me, r=estebank

remove trivial calls to mk_const

similar to #72754

4 years agoRollup merge of #72795 - petrochenkov:identgroup, r=nikomatsakis
Yuki Okushi [Tue, 2 Jun 2020 04:07:13 +0000 (13:07 +0900)]
Rollup merge of #72795 - petrochenkov:identgroup, r=nikomatsakis

Add a test for `$:ident` in proc macro input

cc https://github.com/rust-lang/rust/issues/72545#issuecomment-636388019