]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRollup merge of #67008 - ollie27:rustdoc_issue_61732, r=Centril
Yuki Okushi [Fri, 6 Dec 2019 15:09:59 +0000 (00:09 +0900)]
Rollup merge of #67008 - ollie27:rustdoc_issue_61732, r=Centril

rustdoc: Add test for fixed issue

#61732 was almost certainly fixed by #63400.

Closes #61732

4 years agoRollup merge of #66998 - Wind-River:master_up, r=alexcrichton
Yuki Okushi [Fri, 6 Dec 2019 15:09:57 +0000 (00:09 +0900)]
Rollup merge of #66998 - Wind-River:master_up, r=alexcrichton

Modified the testcases for VxWorks

4 years agoRollup merge of #66988 - osa1:issue66985, r=matthewjasper
Yuki Okushi [Fri, 6 Dec 2019 15:09:55 +0000 (00:09 +0900)]
Rollup merge of #66988 - osa1:issue66985, r=matthewjasper

Fix angle bracket formatting when dumping MIR debug vars

Fixes #66985

4 years agoRollup merge of #66959 - GuillaumeGomez:cfg-duplicates, r=eddyb
Yuki Okushi [Fri, 6 Dec 2019 15:09:54 +0000 (00:09 +0900)]
Rollup merge of #66959 - GuillaumeGomez:cfg-duplicates, r=eddyb

Remove potential cfgs duplicates

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

Before going any further (the issue seems to be linked to metadata as far as I can tell). Do you think this is the good place to do it or should it be done before?

r? @eddyb

4 years agoRollup merge of #66846 - gizmondo:master, r=michaelwoerister
Yuki Okushi [Fri, 6 Dec 2019 15:09:52 +0000 (00:09 +0900)]
Rollup merge of #66846 - gizmondo:master, r=michaelwoerister

Make try_mark_previous_green aware of cycles.

Fixes #61323

r? @michaelwoerister

4 years agoMake try_mark_previous_green aware of cycles.
Alex Aktsipetrov [Fri, 6 Dec 2019 09:48:53 +0000 (12:48 +0300)]
Make try_mark_previous_green aware of cycles.

4 years agoAuto merge of #67080 - JohnTitor:rollup-2t6fm3u, r=JohnTitor
bors [Fri, 6 Dec 2019 07:43:56 +0000 (07:43 +0000)]
Auto merge of #67080 - JohnTitor:rollup-2t6fm3u, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #66649 (VxWorks: fix issues in accessing environment variables)
 - #66764 (Tweak wording of `collect()` on bad target type)
 - #66900 (Clean up error codes)
 - #66974 ([CI] fix the `! isCI` check in src/ci/run.sh)
 - #66979 (Add long error for E0631 and update ui tests.)
 - #67017 (cleanup long error explanations)
 - #67021 (Fix docs for formatting delegations)
 - #67041 (add ExitStatusExt into prelude)
 - #67065 (Fix fetching arguments on the wasm32-wasi target)
 - #67066 (Update the revision of wasi-libc used in wasm32-wasi)

Failed merges:

r? @ghost

4 years agoRollup merge of #67066 - alexcrichton:update-wasi-libc, r=Mark-Simulacrum
Yuki Okushi [Fri, 6 Dec 2019 06:37:14 +0000 (15:37 +0900)]
Rollup merge of #67066 - alexcrichton:update-wasi-libc, r=Mark-Simulacrum

Update the revision of wasi-libc used in wasm32-wasi

This commit updates the `wasi-libc` repository used to build the
wasm32-wasi target's libstd to ensure that both libstd and libc are
using the same wasi snapshot version.

4 years agoRollup merge of #67065 - alexcrichton:update-wasi, r=sfackler
Yuki Okushi [Fri, 6 Dec 2019 06:37:13 +0000 (15:37 +0900)]
Rollup merge of #67065 - alexcrichton:update-wasi, r=sfackler

Fix fetching arguments on the wasm32-wasi target

Fixes an error introduced in #66750 where wasi executables always think
they have zero arguments because one of the vectors returned here
accidentally thought it was length 0.

4 years agoRollup merge of #67041 - Wind-River:master_base, r=alexcrichton
Yuki Okushi [Fri, 6 Dec 2019 06:37:11 +0000 (15:37 +0900)]
Rollup merge of #67041 - Wind-River:master_base, r=alexcrichton

add ExitStatusExt into prelude

r? @alexcrichton

4 years agoRollup merge of #67021 - elichai:2019-12-fmt, r=QuietMisdreavus
Yuki Okushi [Fri, 6 Dec 2019 06:37:10 +0000 (15:37 +0900)]
Rollup merge of #67021 - elichai:2019-12-fmt, r=QuietMisdreavus

Fix docs for formatting delegations

If you use the example in the docs right now it breaks all the options Formatters have to offer.
i.e. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=214392ecc6eff73b4789c32568395f72 this should've padded the output with 4 zeros but didn't.

with the new example it does work: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3bdfb29f395230c5129c5f56dcfcb2a9

The only thing i'm not quite sure about is what's the right way to do it in a loop (altough non of the docs talk about it people are doing it in the wild and there were a couple of attempts to include in libcore)
i.e. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4c4dca3c90ba36779ecd014f3899ab9c

4 years agoRollup merge of #67017 - GuillaumeGomez:long-err-explanations-2, r=Dylan-DPC
Yuki Okushi [Fri, 6 Dec 2019 06:37:08 +0000 (15:37 +0900)]
Rollup merge of #67017 - GuillaumeGomez:long-err-explanations-2, r=Dylan-DPC

cleanup long error explanations

r? @Dylan-DPC

4 years agoRollup merge of #66979 - reese:E0631-long-error, r=GuillaumeGomez
Yuki Okushi [Fri, 6 Dec 2019 06:37:06 +0000 (15:37 +0900)]
Rollup merge of #66979 - reese:E0631-long-error, r=GuillaumeGomez

Add long error for E0631 and update ui tests.

This PR adds a long error for `E0631`, which covers errors where closure argument types are mismatched. It also updates UI tests where this error is applicable.

Part of #61137

4 years agoRollup merge of #66974 - cuviper:not-isCI, r=alexcrichton
Yuki Okushi [Fri, 6 Dec 2019 06:37:04 +0000 (15:37 +0900)]
Rollup merge of #66974 - cuviper:not-isCI, r=alexcrichton

[CI] fix the `! isCI` check in src/ci/run.sh

Using `if [ ! isCI ] || ...` doesn't run any command, just tests `isCI`
as a string, whereas `if ! isCI || ...` will actually run the `isCI`
command and negate its exit status.

4 years agoRollup merge of #66900 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC
Yuki Okushi [Fri, 6 Dec 2019 06:37:03 +0000 (15:37 +0900)]
Rollup merge of #66900 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC

Clean up error codes

r? @Dylan-DPC

4 years agoRollup merge of #66764 - estebank:reword-bad-collect, r=alexcrichton
Yuki Okushi [Fri, 6 Dec 2019 06:37:01 +0000 (15:37 +0900)]
Rollup merge of #66764 - estebank:reword-bad-collect, r=alexcrichton

Tweak wording of `collect()` on bad target type

Fix #60440.

4 years agoRollup merge of #66649 - Wind-River:master_xyz, r=alexcrichton
Yuki Okushi [Fri, 6 Dec 2019 06:36:56 +0000 (15:36 +0900)]
Rollup merge of #66649 - Wind-River:master_xyz, r=alexcrichton

VxWorks: fix issues in accessing environment variables

4 years agoAuto merge of #66835 - AviKozokin:master, r=alexcrichton
bors [Fri, 6 Dec 2019 04:30:51 +0000 (04:30 +0000)]
Auto merge of #66835 - AviKozokin:master, r=alexcrichton

std:win: avoid WSA_FLAG_NO_INHERIT flag and don't use SetHandleInformation on UWP

This flag is not supported on Windows 7 before SP1, and on windows server 2008 SP2. This breaks Socket creation & duplication.
This was fixed in a previous PR. cc #26658

This PR: cc #60260 reuses this flag to support UWP, and makes an attempt to handle the potential error.
This version still fails to create a socket, as the error returned by WSA on this case is WSAEINVAL (invalid argument). and not WSAEPROTOTYPE.

MSDN page for WSASocketW (that states the platform support for WSA_FLAG_NO_HANDLE_INHERIT): https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsasocketw

CC #26543
CC #26518

4 years agoAuto merge of #66911 - eddyb:nicer-rustc_regions, r=matthewjasper
bors [Fri, 6 Dec 2019 00:22:54 +0000 (00:22 +0000)]
Auto merge of #66911 - eddyb:nicer-rustc_regions, r=matthewjasper

rustc_mir: use nicer path printing for #[rustc_regions] NLL tests.

Similar to #66850, spotted while working on #66907.

r? @matthewjasper

4 years agoAuto merge of #67060 - Centril:rollup-hwhdx4h, r=Centril
bors [Thu, 5 Dec 2019 20:56:09 +0000 (20:56 +0000)]
Auto merge of #67060 - Centril:rollup-hwhdx4h, r=Centril

Rollup of 9 pull requests

Successful merges:

 - #66710 (weak-into-raw: Clarify some details in Safety)
 - #66863 (Check break target availability when checking breaks with values)
 - #67002 (Fix documentation of pattern for str::matches())
 - #67005 (capitalize Rust)
 - #67010 (Accurately portray raw identifiers in error messages)
 - #67011 (Include a span in more `expected...found` notes)
 - #67044 (E0023: handle expected != tuple pattern type)
 - #67045 (rustc_parser: cleanup imports)
 - #67055 (Make const-qualification look at more `const fn`s)

Failed merges:

r? @ghost

4 years agoUpdate the revision of wasi-libc used in wasm32-wasi
Alex Crichton [Thu, 5 Dec 2019 19:36:35 +0000 (11:36 -0800)]
Update the revision of wasi-libc used in wasm32-wasi

This commit updates the `wasi-libc` repository used to build the
wasm32-wasi target's libstd to ensure that both libstd and libc are
using the same wasi snapshot version.

4 years agoFix fetching arguments on the wasm32-wasi target
Alex Crichton [Thu, 5 Dec 2019 19:01:26 +0000 (11:01 -0800)]
Fix fetching arguments on the wasm32-wasi target

Fixes an error introduced in #66750 where wasi executables always think
they have zero arguments because one of the vectors returned here
accidentally thought it was length 0.

4 years agoRollup merge of #67055 - lqd:const_qualif, r=oli-obk
Mazdak Farrokhzad [Thu, 5 Dec 2019 18:03:21 +0000 (19:03 +0100)]
Rollup merge of #67055 - lqd:const_qualif, r=oli-obk

Make const-qualification look at more `const fn`s

As explained in a lot more detail in #67053 this makes const-qualification not ignore the unstable const fns in libcore.

r? @oli-obk cc @ecstatic-morse

(Still a bit unsure about the `cfg`s here, for bootstrapping, does that seem correct ?)

Fixes #67053.

4 years agoRollup merge of #67045 - Centril:parser-import-clean, r=Mark-Simulacrum
Mazdak Farrokhzad [Thu, 5 Dec 2019 18:03:20 +0000 (19:03 +0100)]
Rollup merge of #67045 - Centril:parser-import-clean, r=Mark-Simulacrum

rustc_parser: cleanup imports

Reorganize & canonicalize some imports + Drop `rustc_target` as a dependency.

r? @Mark-Simulacrum

4 years agoRollup merge of #67044 - Centril:67037, r=estebank
Mazdak Farrokhzad [Thu, 5 Dec 2019 18:03:18 +0000 (19:03 +0100)]
Rollup merge of #67044 - Centril:67037, r=estebank

E0023: handle expected != tuple pattern type

Fixes #67037.

r? @estebank

4 years agoRollup merge of #67011 - Aaron1011:fix/expected-found-span, r=Dylan-DPC
Mazdak Farrokhzad [Thu, 5 Dec 2019 18:03:17 +0000 (19:03 +0100)]
Rollup merge of #67011 - Aaron1011:fix/expected-found-span, r=Dylan-DPC

Include a span in more `expected...found` notes

In most places, we use a span when emitting `expected...found` errors.
However, there were a couple of places where we didn't use any span,
resulting in hard-to-interpret error messages.

This commit attaches the relevant span to these notes, and additionally
switches over to using `note_expected_found` instead of manually
formatting the message

4 years agoRollup merge of #67010 - estebank:raw-idents, r=Centril
Mazdak Farrokhzad [Thu, 5 Dec 2019 18:03:15 +0000 (19:03 +0100)]
Rollup merge of #67010 - estebank:raw-idents, r=Centril

Accurately portray raw identifiers in error messages

When refering to or suggesting raw identifiers, refer to them with `r#`.

Fix #65634.

4 years agoRollup merge of #67005 - andrewbanchich:master, r=joshtriplett
Mazdak Farrokhzad [Thu, 5 Dec 2019 18:03:13 +0000 (19:03 +0100)]
Rollup merge of #67005 - andrewbanchich:master, r=joshtriplett

capitalize Rust

Capitalize "Rust" in docs.

4 years agoRollup merge of #67002 - JayXon:patch-1, r=Dylan-DPC
Mazdak Farrokhzad [Thu, 5 Dec 2019 18:03:11 +0000 (19:03 +0100)]
Rollup merge of #67002 - JayXon:patch-1, r=Dylan-DPC

Fix documentation of pattern for str::matches()

Made it the same as rmatches()

4 years agoRollup merge of #66863 - osa1:fix_66702, r=cramertj
Mazdak Farrokhzad [Thu, 5 Dec 2019 18:03:09 +0000 (19:03 +0100)]
Rollup merge of #66863 - osa1:fix_66702, r=cramertj

Check break target availability when checking breaks with values

Fixes #66702

I'll be adding a regression test.

4 years agoRollup merge of #66710 - vorner:weak-into-raw-null-docs, r=dtolnay
Mazdak Farrokhzad [Thu, 5 Dec 2019 18:03:08 +0000 (19:03 +0100)]
Rollup merge of #66710 - vorner:weak-into-raw-null-docs, r=dtolnay

weak-into-raw: Clarify some details in Safety

Clarify it is OK to pass a pointer that never owned a weak count (one
from Weak::new) back into it as it was created from it. Relates to
discussion in #60728.

@CAD97 Do you want to have a look at the new docs?

4 years agoAuto merge of #66828 - GuillaumeGomez:less-minification, r=kinnison
bors [Thu, 5 Dec 2019 17:45:31 +0000 (17:45 +0000)]
Auto merge of #66828 - GuillaumeGomez:less-minification, r=kinnison

Less minification

The goal of this PR is to remove the minification process on the `search-index.js` file. It provides great result in term of space reduction but the computation time is far too long. I'll work on this issue and will put it back once it's fast enough.

cc @nox @lqd
r? @kinnison

4 years agoupdate comment to explain the importance of this check more clearly
Remy Rakic [Thu, 5 Dec 2019 16:41:25 +0000 (17:41 +0100)]
update comment to explain the importance of this check more clearly

4 years agoAuto merge of #66815 - mark-i-m:simplify-borrow_check-errors, r=Dylan-DPC
bors [Thu, 5 Dec 2019 14:39:11 +0000 (14:39 +0000)]
Auto merge of #66815 - mark-i-m:simplify-borrow_check-errors, r=Dylan-DPC

Reorganize borrow check diagnostic code

Currently borrow checker diagnostics are split across many different modules in different places in the `librustc_mir` crate. This moves them all to a `diagnostics` module. This also reduces the nesting of the modules a bit (sooo much nesting).

I am also thinking of moving stuff out of the `nll` module since we only have one borrow checker now (:tada:), and maybe it even makes sense to split out all of this stuff to a `librustc_borrow_check`, but those are for the future. Feel free to ping me here or on zulip and let me know what you think...

cc @nikomatsakis @matthewjasper @eddyb

4 years agoweak-into-raw: Clarify some details in Safety
Michal 'vorner' Vaner [Sun, 24 Nov 2019 18:00:25 +0000 (19:00 +0100)]
weak-into-raw: Clarify some details in Safety

Clarify it is OK to pass a pointer that never owned a weak count (one
from Weak::new) back into it as it was created from it. Relates to
discussion in #60728.

4 years agoadd regression test for issue 67053
Remy Rakic [Thu, 5 Dec 2019 14:02:41 +0000 (15:02 +0100)]
add regression test for issue 67053

4 years agolibcore: rnable 2 unstable const fn features
Remy Rakic [Thu, 5 Dec 2019 14:01:30 +0000 (15:01 +0100)]
libcore: rnable 2 unstable const fn features

So that we can bootstrap successfully

4 years agomake const-qualif look at more `const fn`s
Remy Rakic [Thu, 5 Dec 2019 13:59:56 +0000 (14:59 +0100)]
make const-qualif look at more `const fn`s

the unstables ones in libcore, with the unstable feature disabled, were not checked

4 years agoAuto merge of #66952 - 0dvictor:print, r=rkruppe
bors [Thu, 5 Dec 2019 11:23:26 +0000 (11:23 +0000)]
Auto merge of #66952 - 0dvictor:print, r=rkruppe

Use Module::print() instead of a PrintModulePass

llvm::Module has a print() method. It is unnecessary to create a pass just for the purpose of printing LLVM IR.

4 years agorustc_parser: cleanup imports
Mazdak Farrokhzad [Thu, 5 Dec 2019 05:38:06 +0000 (06:38 +0100)]
rustc_parser: cleanup imports

4 years agoAuto merge of #66520 - alexcrichton:disable-gdb-wasm, r=eddyb
bors [Thu, 5 Dec 2019 05:28:48 +0000 (05:28 +0000)]
Auto merge of #66520 - alexcrichton:disable-gdb-wasm, r=eddyb

Disable gdb pretty printer global section on wasm targets

The wasm targets don't support gdb anyway so there's no need for this
section there.

4 years agoE0023: handle expected != pat-tup-type
Mazdak Farrokhzad [Thu, 5 Dec 2019 03:36:53 +0000 (04:36 +0100)]
E0023: handle expected != pat-tup-type

4 years agoDisable gdb pretty printer global section on wasm targets
Alex Crichton [Mon, 18 Nov 2019 15:41:10 +0000 (07:41 -0800)]
Disable gdb pretty printer global section on wasm targets

The wasm targets don't support gdb anyway so there's no need for this
section there.

4 years agoMerge pull request #46 from Wind-River/master_base_V7LIBC-1069
n-salim [Thu, 5 Dec 2019 00:16:49 +0000 (16:16 -0800)]
Merge pull request #46 from Wind-River/master_base_V7LIBC-1069

add ExitStatusExt into prelude

4 years agoAuto merge of #67038 - RalfJung:miri, r=RalfJung
bors [Wed, 4 Dec 2019 23:07:13 +0000 (23:07 +0000)]
Auto merge of #67038 - RalfJung:miri, r=RalfJung

update miri

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

r? @ghost

4 years agoupdate miri
Ralf Jung [Wed, 4 Dec 2019 23:00:44 +0000 (00:00 +0100)]
update miri

4 years agoAuto merge of #66866 - oli-obk:const_fn_memoization, r=RalfJung
bors [Wed, 4 Dec 2019 17:48:19 +0000 (17:48 +0000)]
Auto merge of #66866 - oli-obk:const_fn_memoization, r=RalfJung

Only memoize const fn calls during const eval

Miri and other engines may want to execute the function in order to detect UB inside of them.

r? @RalfJung

4 years agoUpdate src/librustc_mir/interpret/terminator.rs
Oliver Scherer [Wed, 4 Dec 2019 15:38:58 +0000 (16:38 +0100)]
Update src/librustc_mir/interpret/terminator.rs

Co-Authored-By: Ralf Jung <post@ralfj.de>
4 years agomore private
Mark Mansi [Mon, 2 Dec 2019 23:05:25 +0000 (17:05 -0600)]
more private

4 years agominor fix
Mark Mansi [Fri, 29 Nov 2019 22:37:52 +0000 (16:37 -0600)]
minor fix

4 years agofix some imports
Mark Mansi [Wed, 27 Nov 2019 18:22:17 +0000 (12:22 -0600)]
fix some imports

4 years agomove region errors to diagnostics module
Mark Mansi [Wed, 27 Nov 2019 18:07:47 +0000 (12:07 -0600)]
move region errors to diagnostics module

4 years agofix imports
Mark Mansi [Wed, 27 Nov 2019 17:45:05 +0000 (11:45 -0600)]
fix imports

4 years agomove explain_borrow to diagnostics
Mark Mansi [Wed, 27 Nov 2019 17:44:58 +0000 (11:44 -0600)]
move explain_borrow to diagnostics

4 years agofix imports
Mark Mansi [Wed, 27 Nov 2019 17:39:25 +0000 (11:39 -0600)]
fix imports

4 years agocreate new borrow_check::diagnostics module and move stuff there
Mark Mansi [Wed, 27 Nov 2019 17:39:21 +0000 (11:39 -0600)]
create new borrow_check::diagnostics module and move stuff there

4 years agoAuto merge of #66408 - nnethercote:greedy-process_obligations, r=nmatsakis
bors [Wed, 4 Dec 2019 14:33:38 +0000 (14:33 +0000)]
Auto merge of #66408 - nnethercote:greedy-process_obligations, r=nmatsakis

Make `process_obligations()` greedier.

`process_obligations()` adds new nodes, but it does not process these
new nodes until the next time it is called.

This commit changes it so that it does process these new nodes within
the same call. This change reduces the number of calls to
`process_obligations()` required to complete processing, sometimes
giving significant speed-ups.

The change required some changes to tests.
- The output of `cycle-cache-err-60010.rs` is slightly different.
- The unit tests required extra cases to handle the earlier processing
  of the added nodes. I mostly did these in the simplest possible way,
  by making the added nodes be ignored, thus giving outcomes the same as
  with the old behaviour. But I changed `success_in_grandchildren()`
  more extensively so that some obligations are completed earlier than
  they used to be.

r? @nikomatsakis

4 years agoFix docs for formatting delegations
Elichai Turkel [Wed, 4 Dec 2019 13:13:43 +0000 (15:13 +0200)]
Fix docs for formatting delegations

4 years agosome error codes long explanation
Guillaume Gomez [Wed, 4 Dec 2019 12:36:50 +0000 (13:36 +0100)]
some error codes long explanation

4 years agoClean up E0118 error code long explanation
Guillaume Gomez [Wed, 4 Dec 2019 12:35:26 +0000 (13:35 +0100)]
Clean up E0118 error code long explanation

4 years agoClean up E0117 error code long explanation
Guillaume Gomez [Wed, 4 Dec 2019 12:31:40 +0000 (13:31 +0100)]
Clean up E0117 error code long explanation

4 years agoClean up E0116 error code long explanation
Guillaume Gomez [Wed, 4 Dec 2019 12:27:17 +0000 (13:27 +0100)]
Clean up E0116 error code long explanation

4 years agoAuto merge of #66275 - oli-obk:organize-intrinsics-promotion-checks, r=RalfJung
bors [Wed, 4 Dec 2019 11:22:26 +0000 (11:22 +0000)]
Auto merge of #66275 - oli-obk:organize-intrinsics-promotion-checks, r=RalfJung

Organize intrinsics promotion checks

cc @vertexclique

supersedes #61835

r? @RalfJung

4 years agoRemove potential cfgs duplicates
Guillaume Gomez [Tue, 3 Dec 2019 17:07:00 +0000 (18:07 +0100)]
Remove potential cfgs duplicates

4 years agoAuto merge of #65947 - eddyb:fn-abi, r=oli-obk,nagisa
bors [Wed, 4 Dec 2019 08:22:05 +0000 (08:22 +0000)]
Auto merge of #65947 - eddyb:fn-abi, r=oli-obk,nagisa

rustc: split FnAbi's into definitions/direct calls ("of_instance") and indirect calls ("of_fn_ptr").

After this PR:
* `InstanceDef::Virtual` is only used for "direct" virtual calls, and shims around those calls use `InstanceDef::ReifyShim` (i.e. for `<dyn Trait as Trait>::f as fn(_)`)
  * this could easily be done for intrinsics as well, to allow their reification, but I didn't do it
* `FnAbi::of_instance` is **always** used for declaring/defining an `fn`, and for direct calls to an `fn`
  * this is great for e.g. https://github.com/rust-lang/rust/pull/65881 (`#[track_caller]`), which can introduce the "caller location" argument into "codegen signatures" by only changing `FnAbi::of_instance`, after this PR
* `FnAbi::of_fn_ptr` is used primarily for indirect calls, i.e. to `fn` pointers
  * *not* virtual calls (which use `FnAbi::of_instance` with `InstanceDef::Virtual`)
  * there's also a couple uses where the `rustc_codegen_llvm` needs to declare (i.e. FFI-import) an LLVM function that has no Rust declaration available at all
    * at least one of them could probably be a "weak lang item" instead

As there are many steps, this PR is best reviewed commit by commit - some of which arguably should be in their own PRs, I may have gotten carried away a bit.

cc @nagisa @rkruppe @oli-obk @anp

4 years agoAccount for raw idents in module file finding
Esteban Küber [Wed, 4 Dec 2019 06:25:44 +0000 (22:25 -0800)]
Account for raw idents in module file finding

4 years agoreview comments: move test
Esteban Küber [Wed, 4 Dec 2019 06:25:15 +0000 (22:25 -0800)]
review comments: move test

4 years agoAuto merge of #66996 - ehuss:update-cargo, r=alexcrichton
bors [Wed, 4 Dec 2019 05:07:34 +0000 (05:07 +0000)]
Auto merge of #66996 - ehuss:update-cargo, r=alexcrichton

Update cargo

11 commits in 750cb1482e4d0e74822cded7ab8b3c677ed8b041..626f0f40efd32e6b3dbade50cd53fdfaa08446ba
2019-11-23 23:06:36 +0000 to 2019-12-03 16:53:04 +0000
- Change some texts to links in README (rust-lang/cargo#7652)
- Update config and environment variable docs. (rust-lang/cargo#7650)
- Stop ignoring .rs.bk files; rustfmt hasn't generated them in years (rust-lang/cargo#7647)
- Various contributing docs updates. (rust-lang/cargo#7642)
- Stabilize profile-overrides. (rust-lang/cargo#7591)
- Update comment about ResolveVersion default version. (rust-lang/cargo#7637)
- Update tests for slight wording change in rustdoc error message. (rust-lang/cargo#7641)
- Remove dep_targets. (rust-lang/cargo#7626)
- vendor: don't use canonical path in .cargo/config (rust-lang/cargo#7629)
- Minor testsuite organization. (rust-lang/cargo#7628)
- Remove failing plugin tests. (rust-lang/cargo#7630)

4 years agoInclude a span in more `expected...found` notes
Aaron Hill [Wed, 4 Dec 2019 03:20:05 +0000 (22:20 -0500)]
Include a span in more `expected...found` notes

In most places, we use a span when emitting `expected...found` errors.
However, there were a couple of places where we didn't use any span,
resulting in hard-to-interpret error messages.

This commit attaches the relevant span to these notes, and additionally
switches over to using `note_expected_found` instead of manually
formatting the message

4 years agoAccurately portray raw identifiers in error messages
Esteban Küber [Wed, 4 Dec 2019 03:01:42 +0000 (19:01 -0800)]
Accurately portray raw identifiers in error messages

When refering to or suggesting raw identifiers, refer to them with `r#`.

Fix #65634.

4 years agoAuto merge of #66995 - flip1995:clippyup, r=Manishearth
bors [Wed, 4 Dec 2019 01:52:49 +0000 (01:52 +0000)]
Auto merge of #66995 - flip1995:clippyup, r=Manishearth

Update Clippy

Fixes #66989

r? @Manishearth @Centril

4 years agorustdoc: Add test for fixed issue
Oliver Middleton [Wed, 4 Dec 2019 01:31:35 +0000 (01:31 +0000)]
rustdoc: Add test for fixed issue

4 years agoLeave fixme
Oliver Scherer [Wed, 4 Dec 2019 00:51:26 +0000 (01:51 +0100)]
Leave fixme

4 years agoUpdate Clippy
flip1995 [Tue, 3 Dec 2019 17:58:33 +0000 (18:58 +0100)]
Update Clippy

4 years agocapitalize Rust
Andrew Banchich [Wed, 4 Dec 2019 00:11:53 +0000 (19:11 -0500)]
capitalize Rust

4 years agoAuto merge of #66925 - RalfJung:miri, r=RalfJung
bors [Tue, 3 Dec 2019 22:40:44 +0000 (22:40 +0000)]
Auto merge of #66925 - RalfJung:miri, r=RalfJung

update Miri

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

r? @ghost

4 years agoFix documentation of pattern for str::matches()
Sen Jiang [Tue, 3 Dec 2019 22:31:41 +0000 (14:31 -0800)]
Fix documentation of pattern for str::matches()

Made it the same as rmatches()

4 years agoclean up E0107 error explanation
Guillaume Gomez [Sat, 30 Nov 2019 12:42:50 +0000 (13:42 +0100)]
clean up E0107 error explanation

4 years agoUpdate missed test.
Reese Williams [Tue, 3 Dec 2019 19:58:41 +0000 (14:58 -0500)]
Update missed test.

4 years agoModified the testcases for VxWorks
Umesh Kalappa [Tue, 26 Nov 2019 12:51:19 +0000 (04:51 -0800)]
Modified the testcases for VxWorks

4 years agoAuto merge of #66997 - Centril:rollup-uraqpgu, r=Centril
bors [Tue, 3 Dec 2019 18:42:43 +0000 (18:42 +0000)]
Auto merge of #66997 - Centril:rollup-uraqpgu, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #66750 (Update the `wasi` crate for `wasm32-wasi`)
 - #66878 (Move Sessions into (new) librustc_session)
 - #66903 (parse_enum_item -> parse_enum_variant)
 - #66951 (miri: add throw_machine_stop macro)
 - #66957 (Change Linker for x86_64-fortanix-unknown-sgx target to rust-lld)
 - #66960 ([const-prop] Fix ICE calculating enum discriminant)
 - #66973 (Update the minimum external LLVM to 7)

Failed merges:

r? @ghost

4 years agoRollup merge of #66973 - cuviper:min-llvm7, r=alexcrichton
Mazdak Farrokhzad [Tue, 3 Dec 2019 18:41:57 +0000 (19:41 +0100)]
Rollup merge of #66973 - cuviper:min-llvm7, r=alexcrichton

Update the minimum external LLVM to 7

LLVM 7 is over a year old, which should be plenty for compatibility. The
last LLVM 6 holdout was llvm-emscripten, which went away in #65501.

I've also included a fix for LLVM 8 lacking `MemorySanitizerOptions`,
which was broken by #66522.

4 years agoRollup merge of #66960 - wesleywiser:fix_66787_take2, r=oli-obk,RalfJung
Mazdak Farrokhzad [Tue, 3 Dec 2019 18:41:55 +0000 (19:41 +0100)]
Rollup merge of #66960 - wesleywiser:fix_66787_take2, r=oli-obk,RalfJung

[const-prop] Fix ICE calculating enum discriminant

Fixes #66787

Different approach than #66857

r? @oli-obk
cc @RalfJung @eddyb

4 years agoRollup merge of #66957 - parthsane:pvs/ftx_lld_linker, r=alexcrichton
Mazdak Farrokhzad [Tue, 3 Dec 2019 18:41:54 +0000 (19:41 +0100)]
Rollup merge of #66957 - parthsane:pvs/ftx_lld_linker, r=alexcrichton

Change Linker for x86_64-fortanix-unknown-sgx target to rust-lld

Changed linker for `x86_64-fortanix-unknown-sgx` target to `rust-lld`
This change needed the RelaxELFRelocations flag to be set for it to work correctly

r? @jethrogb

4 years agoRollup merge of #66951 - RalfJung:miri-machine-stop, r=oli-obk
Mazdak Farrokhzad [Tue, 3 Dec 2019 18:41:52 +0000 (19:41 +0100)]
Rollup merge of #66951 - RalfJung:miri-machine-stop, r=oli-obk

miri: add throw_machine_stop macro

r? @oli-obk
This helps Miri: https://github.com/rust-lang/miri/pull/1093

4 years agoRollup merge of #66903 - Centril:parse-enum-variant, r=estebank
Mazdak Farrokhzad [Tue, 3 Dec 2019 18:41:51 +0000 (19:41 +0100)]
Rollup merge of #66903 - Centril:parse-enum-variant, r=estebank

parse_enum_item -> parse_enum_variant

r? @estebank

4 years agoRollup merge of #66878 - Mark-Simulacrum:sess-decouple, r=Centril
Mazdak Farrokhzad [Tue, 3 Dec 2019 18:41:48 +0000 (19:41 +0100)]
Rollup merge of #66878 - Mark-Simulacrum:sess-decouple, r=Centril

Move Sessions into (new) librustc_session

This PR moves `ParseSess` and `Session` from their current locations into a new crate, `librustc_session`.

There are several intents behind this change. librustc is a very large crate, and we want to split it up over time -- this movement removes the sizeable session module from it. It also helps allow for future movement of things not coupled to TyCtxt but coupled to Session out of the crate.

This movement allows allows for a future follow-up PR which unifies Session and ParseSess, allowing for a single source of truth for APIs interested in global options throughout the compiler; the ParseSess is already created directly as a member of Session in the current compiler (i.e., we do not first construct a ParseSess and then move it into Session later in the compilation).

This PR intentionally avoids changing numerous imports throughout the tree to new locations of the moved types; this is needless noise and can be done as needed.

In the process of moving the sessions back, the lint system received an update as well -- notably, early buffered lints are no longer ad-hoc declared as enum pairs and later associated with proper lint declarations. They are still separately handled (buffered), it is a little unclear whether this is truly necessary, but regardless is left for future PRs.

Many of the types moved back are sort of ad-hoc placed into the same crate (librustc_session) instead of creating other crates; it's unclear whether this is actually a good thing, but it seemed better than creating numerous tiny crates which served no purpose on their own.

4 years agoRollup merge of #66750 - alexcrichton:update-wasi, r=sfackler
Mazdak Farrokhzad [Tue, 3 Dec 2019 18:41:46 +0000 (19:41 +0100)]
Rollup merge of #66750 - alexcrichton:update-wasi, r=sfackler

Update the `wasi` crate for `wasm32-wasi`

This commit updates the `wasi` crate used by the standard library which
is used to implement most of the functionality of libstd on the
`wasm32-wasi` target. This update comes with a brand new crate structure
in the `wasi` crate which caused quite a few changes for the wasi target
here, but it also comes with a significant change to where the
functionality is coming from.

The WASI specification is organized into "snapshots" and a new snapshot
happened recently, so the WASI APIs themselves have changed since the
previous revision. This had only minor impact on the public facing
surface area of libstd, only changing on `u32` to a `u64` in an unstable
API. The actual source for all of these types and such, however, is now
coming from the `wasi_preview_snapshot1` module instead of the
`wasi_unstable` module like before. This means that any implementors
generating binaries will need to ensure that their embedding environment
handles the `wasi_preview_snapshot1` module.

4 years agoUpdate cargo
Eric Huss [Tue, 3 Dec 2019 18:22:00 +0000 (10:22 -0800)]
Update cargo

4 years agoadd ExitStatusExt into prelude
BaoshanPang [Tue, 3 Dec 2019 18:16:45 +0000 (10:16 -0800)]
add ExitStatusExt into prelude

4 years agoFix UI tests for new locations
Mark Rousskov [Sun, 1 Dec 2019 18:11:31 +0000 (13:11 -0500)]
Fix UI tests for new locations

4 years agoDeduplicate CrateConfig
Mark Rousskov [Fri, 29 Nov 2019 21:09:00 +0000 (16:09 -0500)]
Deduplicate CrateConfig

4 years agoMove Session to librustc_session
Mark Rousskov [Fri, 29 Nov 2019 21:05:28 +0000 (16:05 -0500)]
Move Session to librustc_session

4 years agoMove ParseSess to librustc_session
Mark Rousskov [Fri, 29 Nov 2019 20:45:26 +0000 (15:45 -0500)]
Move ParseSess to librustc_session

4 years agoMove BufferedEarlyLint to librustc_session
Mark Rousskov [Fri, 29 Nov 2019 20:41:22 +0000 (15:41 -0500)]
Move BufferedEarlyLint to librustc_session

4 years agoDuplicate CrateConfig into Session
Mark Rousskov [Fri, 29 Nov 2019 14:33:51 +0000 (09:33 -0500)]
Duplicate CrateConfig into Session

Since it's just a type alias this isn't too difficult and once Session
is moved back we can make this be the canonical location.

4 years agoRemove dead cfg method
Mark Rousskov [Fri, 29 Nov 2019 14:18:56 +0000 (09:18 -0500)]
Remove dead cfg method

4 years agoDirectly use types from libsyntax::ast
Mark Rousskov [Wed, 20 Nov 2019 01:02:16 +0000 (20:02 -0500)]
Directly use types from libsyntax::ast

4 years agoRe-export Client from rustc_data_structures::jobserver
Mark Rousskov [Wed, 20 Nov 2019 00:21:47 +0000 (19:21 -0500)]
Re-export Client from rustc_data_structures::jobserver

4 years agoMove NativeLibraryKind to rustc_session
Mark Rousskov [Thu, 14 Nov 2019 17:16:24 +0000 (12:16 -0500)]
Move NativeLibraryKind to rustc_session