]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoUse `to_option` in various places
varkor [Tue, 8 Oct 2019 00:14:42 +0000 (01:14 +0100)]
Use `to_option` in various places

4 years agoRename `bool`'s `then` to `to_option`
varkor [Mon, 7 Oct 2019 23:05:13 +0000 (00:05 +0100)]
Rename `bool`'s `then` to `to_option`

4 years agoadd subset relations test using polonius
Remy Rakic [Tue, 3 Dec 2019 13:07:41 +0000 (14:07 +0100)]
add subset relations test using polonius

It's a relatively simple smoke-test for subset errors, executed outside
of the polonius compare-mode.

4 years agoappease the vociferous tidy
Remy Rakic [Mon, 2 Dec 2019 18:37:24 +0000 (19:37 +0100)]
appease the vociferous tidy

4 years agobless polonius output due to lacking the 'static special-casing
Remy Rakic [Mon, 2 Dec 2019 17:54:42 +0000 (18:54 +0100)]
bless polonius output due to lacking the 'static special-casing

4 years agobless polonius output of test ui/nll/outlives-suggestion-simple.rs
Remy Rakic [Mon, 2 Dec 2019 17:44:23 +0000 (18:44 +0100)]
bless polonius output of test ui/nll/outlives-suggestion-simple.rs

The polonius output has one more error which should be displayed
in the regular case, but error reporting in the regular case stopped
at the first error.

Admittedly it would be nice to combine suggestions for the same source
lifetime so that `'a: 'b` and `'a: 'c` are not bothsuggested, but instead
a single `'a: 'b + 'c` is.

4 years agobless polonius output of test hrtb-perfect-forwarding.rs
Remy Rakic [Mon, 2 Dec 2019 17:38:05 +0000 (18:38 +0100)]
bless polonius output of test hrtb-perfect-forwarding.rs

The plan is to use chalk and not have polonius deal with this.

4 years agoImplement subset errors using Polonius
Remy Rakic [Wed, 20 Nov 2019 10:13:03 +0000 (11:13 +0100)]
Implement subset errors using Polonius

- switches to using the Naive variant by default
- emits subset errors or propagates unsatisfied obligations
  to the caller

4 years agoPolonius: emit `placeholder` and `known_subset` facts, as inputs to the subset error...
Remy Rakic [Tue, 19 Nov 2019 15:58:09 +0000 (16:58 +0100)]
Polonius: emit `placeholder` and `known_subset` facts, as inputs to the subset error computation

4 years agoUniversalRegionRelations: add a way to list the base non-transitive `outlives` constr...
Remy Rakic [Tue, 19 Nov 2019 15:55:58 +0000 (16:55 +0100)]
UniversalRegionRelations: add a way to list the base non-transitive `outlives` constraints

4 years agoAdd a way to list the base non-transitive edges in `TransitiveRelation`
Remy Rakic [Tue, 19 Nov 2019 15:53:52 +0000 (16:53 +0100)]
Add a way to list the base non-transitive edges in `TransitiveRelation`

4 years agoupdate to polonius 0.11 to compute subset errors
lqd [Mon, 18 Nov 2019 12:45:41 +0000 (13:45 +0100)]
update to polonius 0.11 to compute subset errors

- adapt to the new polonius `FactTypes` API
- reorganize the type aliases referring to polonius to avoid referencing the inner atom or fact types multiple times: only one input and output types should be enough for everyone. They could equally be in `borrow_check` as `nll` though.

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 agoFix Query type docs
Ömer Sinan Ağacan [Fri, 6 Dec 2019 07:41:48 +0000 (10:41 +0300)]
Fix Query type docs

`give` no longer exists, `compute` is used to generate query results
now.

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 agoaccept union inside enum if not followed by identifier
Kamlesh Kumar [Fri, 6 Dec 2019 05:22:28 +0000 (10:52 +0530)]
accept union inside enum if not followed by identifier

4 years ago`#[track_caller]` suppresses MIR inlining.
Adam Perry [Sun, 27 Oct 2019 22:16:46 +0000 (15:16 -0700)]
`#[track_caller]` suppresses MIR inlining.

4 years agoError message no longer implies #[track_caller] is a requirement for Rust ABI.
Adam Perry [Sun, 27 Oct 2019 20:32:18 +0000 (13:32 -0700)]
Error message no longer implies #[track_caller] is a requirement for Rust ABI.

4 years agoAdd test for Location::caller in a macro.
Adam Perry [Thu, 14 Nov 2019 15:47:35 +0000 (07:47 -0800)]
Add test for Location::caller in a macro.

4 years agoImplement core::panic::Location::caller using #[track_caller].
Adam Perry [Sun, 10 Nov 2019 21:11:25 +0000 (13:11 -0800)]
Implement core::panic::Location::caller using #[track_caller].

4 years agoRemove #[track_caller] from incomplete features list.
Adam Perry [Fri, 8 Nov 2019 00:13:44 +0000 (16:13 -0800)]
Remove #[track_caller] from incomplete features list.

4 years agoPass a location to #[track_caller] functions in codegen_call_terminator.
Adam Perry [Thu, 7 Nov 2019 14:04:14 +0000 (06:04 -0800)]
Pass a location to #[track_caller] functions in codegen_call_terminator.

4 years agoAdd caller_location paramter to FnAbi::new_internal.
Adam Perry [Wed, 6 Nov 2019 05:13:17 +0000 (21:13 -0800)]
Add caller_location paramter to FnAbi::new_internal.

We pass it in `of_instance` when the instance requires caller location.

4 years agoGenerate &core::panic::Location type in a single place.
Adam Perry [Tue, 29 Oct 2019 03:02:41 +0000 (20:02 -0700)]
Generate &core::panic::Location type in a single place.

4 years agoAdd field to FunctionCx for passing caller location.
Adam Perry [Mon, 28 Oct 2019 00:31:12 +0000 (17:31 -0700)]
Add field to FunctionCx for passing caller location.

4 years agoAdd failing test for codegen'd track_caller attribute.
Adam Perry [Sun, 27 Oct 2019 23:27:32 +0000 (16:27 -0700)]
Add failing test for codegen'd track_caller attribute.

4 years agoRename test filename to match others.
Adam Perry [Sun, 27 Oct 2019 23:22:20 +0000 (16:22 -0700)]
Rename test filename to match others.

4 years agoImplement #[track_caller] in const.
Adam Perry [Mon, 11 Nov 2019 16:45:52 +0000 (08:45 -0800)]
Implement #[track_caller] in const.

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 agorustc_codegen_ssa: Fix line accidentally reverted during rebase
Paul Daniel Faria [Thu, 5 Dec 2019 03:16:40 +0000 (22:16 -0500)]
rustc_codegen_ssa: Fix line accidentally reverted during rebase

4 years agorustc_mir: Fix tidy line lengths
Paul Daniel Faria [Tue, 3 Dec 2019 18:30:58 +0000 (13:30 -0500)]
rustc_mir: Fix tidy line lengths

4 years agorustc: Apply clearer naming to BodyAndCache, fix Deref impl, remove unneeded Index...
Paul Daniel Faria [Tue, 3 Dec 2019 16:51:58 +0000 (11:51 -0500)]
rustc: Apply clearer naming to BodyAndCache, fix Deref impl, remove unneeded Index impl, remove body fn
rustc_codegen_ssa: Fix BodyAndCache reborrow to Body and change instances of body() call to derefence
rustc_mir: Fix BodyAndCache reborrow to Body and change intances of body() call to derefence

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 agouse abort instead of unreachable
Ralf Jung [Thu, 5 Dec 2019 22:59:30 +0000 (23:59 +0100)]
use abort instead of unreachable

4 years agoDo not ICE on closure typeck
Esteban Küber [Thu, 5 Dec 2019 17:21:52 +0000 (09:21 -0800)]
Do not ICE on closure typeck

Tackle #66868.

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 agocomments
Ralf Jung [Thu, 5 Dec 2019 13:38:24 +0000 (14:38 +0100)]
comments

4 years agoadd a test
Ralf Jung [Thu, 5 Dec 2019 13:33:37 +0000 (14:33 +0100)]
add a test

4 years agocodegen: mark invalid SetDiscriminant unreachable
Ralf Jung [Thu, 5 Dec 2019 13:20:53 +0000 (14:20 +0100)]
codegen: mark invalid SetDiscriminant unreachable

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 agoSimplify {IoSlice, IoSliceMut}::advance examples and tests
Tomasz Miąsko [Thu, 5 Dec 2019 00:00:00 +0000 (00:00 +0000)]
Simplify {IoSlice, IoSliceMut}::advance examples and tests

Remove unnecessary calls to `std::mem::replace` and make variables immutable.

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 agoMigrate to LLVM{Get,Set}ValueName2
Josh Stone [Wed, 4 Dec 2019 20:00:28 +0000 (12:00 -0800)]
Migrate to LLVM{Get,Set}ValueName2

The deprecated `LLVM{Get,Set}ValueName` only work with NUL-terminated
strings, but the `2` variants use explicit lengths, which fits better
with Rust strings and slices. We now use these in new helper functions
`llvm::{get,set}_value_name` that convert to/from `&[u8]`.

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 agoSGX: Fix target linker used by bootstrap
Jethro Beekman [Wed, 4 Dec 2019 15:02:28 +0000 (16:02 +0100)]
SGX: Fix target linker used by bootstrap

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 agoRemove unused constant
Guillaume Gomez [Tue, 3 Dec 2019 21:23:55 +0000 (22:23 +0100)]
Remove unused constant

4 years agoMake Lifetime struct field public
Guillaume Gomez [Tue, 3 Dec 2019 21:22:26 +0000 (22:22 +0100)]
Make Lifetime struct field public

4 years agoMake some formatting improvements
Guillaume Gomez [Tue, 3 Dec 2019 21:20:53 +0000 (22:20 +0100)]
Make some formatting improvements

4 years agoMake some private methods public
Guillaume Gomez [Tue, 3 Dec 2019 21:17:43 +0000 (22:17 +0100)]
Make some private methods public

4 years agofixup clean/types.rs imports
Guillaume Gomez [Tue, 3 Dec 2019 21:15:54 +0000 (22:15 +0100)]
fixup clean/types.rs imports

4 years agoremove code that doesn't belong in clean/types.rs
Guillaume Gomez [Tue, 3 Dec 2019 21:14:48 +0000 (22:14 +0100)]
remove code that doesn't belong in clean/types.rs