]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agosubmodules: update clippy from 6651c1b9 to 891e1a85
Matthias Krüger [Sat, 18 Apr 2020 10:44:30 +0000 (12:44 +0200)]
submodules: update clippy from 6651c1b9 to 891e1a85

Changes:
````
Polished lint and tests
Added final lint and tests
Added basic lint and tests
fix redundant_pattern_matching lint
add lint futures_not_send
Integrate more idiomatic rust changes.
Fix issue #4892.
cargo dev fmt
Cleanup: Rename 'db' variable to 'diag'
question_mark: don't add `as_ref()` for a call expression
unit_arg suggestion may be incorrect
readme: update to cargo clippy --fix command
CI: performing system upgrade fixes broken apt deps on ubuntu 32bit
Do not lint in macros for match lints
[fix] Minor typo in GH Actions 'clippy_dev'
Reenable rustfmt integration test
Add test to map_flatten with an Option
Lint map_flatten if caller is an Option
Apply suggestions from code review
manually fixing formatting at this point lol
fmt
rename field
revert the damn fmt changes
add some tests
split it up for testing but the merge broke tests
dogfood tasted bad
fix rustfmt issue
boycott manish
check for unstable options
Start work on clippy-fix as subcommand
````

4 years agomiri-unleashed: test that we detect heap allocations
Ralf Jung [Sat, 18 Apr 2020 09:16:07 +0000 (11:16 +0200)]
miri-unleashed: test that we detect heap allocations

4 years agocheck_consts: make ops module private
Ralf Jung [Sat, 18 Apr 2020 09:15:23 +0000 (11:15 +0200)]
check_consts: make ops module private

4 years agoAuto merge of #71204 - JohnTitor:into-vec, r=wesleywiser
bors [Sat, 18 Apr 2020 08:03:38 +0000 (08:03 +0000)]
Auto merge of #71204 - JohnTitor:into-vec, r=wesleywiser

perf: Remove inline attribute from `into_vec()`

It was introduced in #70565 and is likely related to this perf results: https://perf.rust-lang.org/compare.html?start=1edcfc83c6a08ddc5e63fc652b149baea0236e7c&end=d249d756374737eb014079901ac132f1e1ed905e&stat=instructions:u
Let's check if it's related to that.
r? @wesleywiser could you kick off perf check? I don't think I can do it.

4 years agoAdd example in the alternative in std::mem::transmute docs
huangjiahua [Sat, 18 Apr 2020 06:58:38 +0000 (14:58 +0800)]
Add example in the alternative in std::mem::transmute docs

It is safer to use `from_ne_bytes` to convert raw bytes to type like u32.

4 years agoMove `MapInPlace` to rustc_data_structures
Yuki Okushi [Sat, 18 Apr 2020 04:01:54 +0000 (13:01 +0900)]
Move `MapInPlace` to rustc_data_structures

4 years agofix -Zast-json to properly output the 'id' field
JOE1994 [Sat, 18 Apr 2020 02:47:26 +0000 (22:47 -0400)]
fix -Zast-json to properly output the 'id' field

4 years agoAuto merge of #71147 - cuviper:min-llvm8, r=Mark-Simulacrum
bors [Sat, 18 Apr 2020 01:37:27 +0000 (01:37 +0000)]
Auto merge of #71147 - cuviper:min-llvm8, r=Mark-Simulacrum

Update the minimum external LLVM to 8

LLVM 8 was released on March 20, 2019, over a year ago.

4 years agoClarify layout information in Layout::extend
CAD97 [Fri, 17 Apr 2020 22:59:36 +0000 (18:59 -0400)]
Clarify layout information in Layout::extend

4 years agoAuto merge of #71264 - Dylan-DPC:rollup-njgbey7, r=Dylan-DPC
bors [Fri, 17 Apr 2020 21:57:06 +0000 (21:57 +0000)]
Auto merge of #71264 - Dylan-DPC:rollup-njgbey7, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #70467 (Use `call` instead of `invoke` for functions that cannot unwind )
 - #71070 (rustbuild: Remove stage 0 LLD flavor workaround for MSVC)
 - #71167 (big-O notation: parenthesis for function calls, explicit multiplication)
 - #71238 (Miri: fix typo)
 - #71242 (Format Mailmap To Work With GitHub)
 - #71243 (Account for use of `try!()` in 2018 edition and guide users in the right direction)

Failed merges:

r? @ghost

4 years agoRollup merge of #71243 - Duddino:Fix2, r=estebank
Dylan DPC [Fri, 17 Apr 2020 21:56:04 +0000 (23:56 +0200)]
Rollup merge of #71243 - Duddino:Fix2, r=estebank

Account for use of `try!()` in 2018 edition and guide users in the right direction

fixes #71155

4 years agoRollup merge of #71242 - XAMPPRocky:mailmap, r=Dylan-DPC
Dylan DPC [Fri, 17 Apr 2020 21:56:03 +0000 (23:56 +0200)]
Rollup merge of #71242 - XAMPPRocky:mailmap, r=Dylan-DPC

Format Mailmap To Work With GitHub

r? @Mark-Simulacrum

4 years agoRollup merge of #71238 - RalfJung:miri-typo, r=oli-obk
Dylan DPC [Fri, 17 Apr 2020 21:56:01 +0000 (23:56 +0200)]
Rollup merge of #71238 - RalfJung:miri-typo, r=oli-obk

Miri: fix typo

r? @oli-obk at least I think this should be "without", right?

4 years agoRollup merge of #71167 - RalfJung:big-o, r=shepmaster
Dylan DPC [Fri, 17 Apr 2020 21:56:00 +0000 (23:56 +0200)]
Rollup merge of #71167 - RalfJung:big-o, r=shepmaster

big-O notation: parenthesis for function calls, explicit multiplication

I saw `O(n m log n)` in the docs and found that really hard to parse. In particular, I don't think we should use blank space as syntax for *both* multiplication and function calls, that is just confusing.

This PR makes both multiplication and function calls explicit using Rust-like syntax. If you prefer, I can also leave one of them implicit, but I believe explicit is better here.

While I was at it I also added backticks consistently.

4 years agoRollup merge of #71070 - petrochenkov:nolldaround, r=Mark-Simulacrum
Dylan DPC [Fri, 17 Apr 2020 21:55:58 +0000 (23:55 +0200)]
Rollup merge of #71070 - petrochenkov:nolldaround, r=Mark-Simulacrum

rustbuild: Remove stage 0 LLD flavor workaround for MSVC

4 years agoRollup merge of #70467 - wesleywiser:invoke-vs-call, r=nagisa
Dylan DPC [Fri, 17 Apr 2020 21:55:56 +0000 (23:55 +0200)]
Rollup merge of #70467 - wesleywiser:invoke-vs-call, r=nagisa

Use `call` instead of `invoke` for functions that cannot unwind

The `FnAbi` now knows if the function is allowed to unwind. If a
function isn't allowed to unwind, we can use a `call` instead of an
`invoke`.

This resolves an issue when calling LLVM intrinsics which cannot unwind
LLVM will generate an error if you attempt to invoke them so we need to
ignore cleanup blocks in codegen and generate a call instead.

Fixes #69911

r? @eddyb
cc @rust-lang/wg-ffi-unwind

4 years agoIssue #71248: attempt to recover perf by removing `exports_all_green` flag.
Felix S. Klock II [Fri, 17 Apr 2020 20:04:59 +0000 (16:04 -0400)]
Issue #71248: attempt to recover perf by removing `exports_all_green` flag.

(My hypothesis is that my use of this flag was an overly conservative
generalization of PR 67020.)

4 years agoMake -Zprofile set codegen-units to 1
Amanieu d'Antras [Fri, 17 Apr 2020 18:53:31 +0000 (19:53 +0100)]
Make -Zprofile set codegen-units to 1

4 years agoIgnore generator-drop-cleanup on wasm32-bare
Jonas Schievink [Wed, 25 Mar 2020 21:07:41 +0000 (22:07 +0100)]
Ignore generator-drop-cleanup on wasm32-bare

4 years agoAuto merge of #71255 - Dylan-DPC:rollup-u5yl04z, r=Dylan-DPC
bors [Fri, 17 Apr 2020 18:36:53 +0000 (18:36 +0000)]
Auto merge of #71255 - Dylan-DPC:rollup-u5yl04z, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #69642 (Use query to determine whether function needs const checking)
 - #71239 (Rename `asm` test directory in favor of `llvm_asm`)
 - #71246 (Implement `Clone` for `liballoc::collections::linked_list::Cursor`.)
 - #71247 (Remove unnecessary variable intialization)
 - #71254 (Minor fix and addition to doc comments)

Failed merges:

r? @ghost

4 years agoAdjust mir-opt test and make it drop something
Jonas Schievink [Sun, 15 Mar 2020 01:28:48 +0000 (02:28 +0100)]
Adjust mir-opt test and make it drop something

4 years agoRollup merge of #71254 - JOE1994:add_comment, r=jonas-schievink
Dylan DPC [Fri, 17 Apr 2020 18:35:25 +0000 (20:35 +0200)]
Rollup merge of #71254 - JOE1994:add_comment, r=jonas-schievink

Minor fix and addition to doc comments

1. Fixed doc comment of struct 'rustc_middle::mir::Location'
Currently, the general explanation of the struct appears at the field
explanation section. I moved and changed the doc comments slightly, so
that the general explanation would appear in the proper location in
docs.
2. Added doc comment explaining 'rustc_mir::util::pretty::write_mir_fn'
Unlike other counterparts, brief explanation for this function was missing,
so I added one.

Thank you for reviewing this PR :)

4 years agoRollup merge of #71247 - ldm0:minor, r=estebank
Dylan DPC [Fri, 17 Apr 2020 18:35:24 +0000 (20:35 +0200)]
Rollup merge of #71247 - ldm0:minor, r=estebank

Remove unnecessary variable intialization

Minor fix.

4 years agoRollup merge of #71246 - crlf0710:linked_list_cursor, r=Amanieu
Dylan DPC [Fri, 17 Apr 2020 18:35:22 +0000 (20:35 +0200)]
Rollup merge of #71246 - crlf0710:linked_list_cursor, r=Amanieu

Implement `Clone` for `liballoc::collections::linked_list::Cursor`.

This implements `Clone` for linked list `Cursor`. Implementing `Copy` is also possible here, but i'm not sure whether i should also do it.

r? @Amanieu

4 years agoRollup merge of #71239 - JohnTitor:llvm-asm, r=Amanieu
Dylan DPC [Fri, 17 Apr 2020 18:35:21 +0000 (20:35 +0200)]
Rollup merge of #71239 - JohnTitor:llvm-asm, r=Amanieu

Rename `asm` test directory in favor of `llvm_asm`

r? @Amanieu

4 years agoRollup merge of #69642 - ecstatic-morse:issue-69615, r=oli-obk
Dylan DPC [Fri, 17 Apr 2020 18:35:19 +0000 (20:35 +0200)]
Rollup merge of #69642 - ecstatic-morse:issue-69615, r=oli-obk

Use query to determine whether function needs const checking

Resolves #69615.

The HIR const-checker was checking the `constness` of a function's `fn_sig` to determine whether a function needed const-checking. Now that const trait impls are a thing, this is no longer enough. All code should use the `is_const_fn_raw` query instead, which takes the constness of the impl block into account.

r? @oli-obk

4 years agoMake `needs_drop` less pessimistic on generators
Jonas Schievink [Sat, 14 Mar 2020 23:24:47 +0000 (00:24 +0100)]
Make `needs_drop` less pessimistic on generators

4 years agoImproved try_macro_suggestion function
Duddino [Fri, 17 Apr 2020 17:29:36 +0000 (19:29 +0200)]
Improved try_macro_suggestion function

4 years agoMinor fix and addition to doc comments
JOE1994 [Fri, 17 Apr 2020 17:24:33 +0000 (13:24 -0400)]
Minor fix and addition to doc comments
1. Fixed doc comment of struct 'rustc_middle::mir::Location'
Currently, the general explanation of the struct appears at the field
explanation section. I moved and changed the doc comments slightly, so
that the general explanation would appear in the proper location in
docs.
2. Added doc comment explaining 'rustc_mir::util::pretty::write_mir_fn'
Unlike other counterparts, brief explanation for this function was missing,
so I added one.

Thank you for reviewing this PR :)

4 years agoImproved try_macro_suggestion
Duddino [Fri, 17 Apr 2020 17:10:29 +0000 (19:10 +0200)]
Improved try_macro_suggestion

4 years agoMoved is_try check into try_macro_suggestion
Duddino [Fri, 17 Apr 2020 16:26:39 +0000 (18:26 +0200)]
Moved is_try check into try_macro_suggestion

4 years agoReplace big JS dict with JSON parsing
Guillaume Gomez [Fri, 17 Apr 2020 15:44:16 +0000 (17:44 +0200)]
Replace big JS dict with JSON parsing

4 years agoImplement `Clone` for `liballoc::collections::linked_list::Cursor`.
Charles Lew [Fri, 17 Apr 2020 13:10:48 +0000 (21:10 +0800)]
Implement `Clone` for `liballoc::collections::linked_list::Cursor`.

4 years agoRemove unnecessary variable intialization
Donough Liu [Sat, 11 Apr 2020 07:53:10 +0000 (15:53 +0800)]
Remove unnecessary variable intialization

4 years agoAccount for use of `try!()` in 2018 edition and guide users in the right direction
Duddino [Fri, 17 Apr 2020 12:07:44 +0000 (14:07 +0200)]
Account for use of `try!()` in 2018 edition and guide users in the right direction

4 years agoAuto merge of #71049 - eddyb:const-err, r=oli-obk
bors [Fri, 17 Apr 2020 11:52:01 +0000 (11:52 +0000)]
Auto merge of #71049 - eddyb:const-err, r=oli-obk

Add `ConstKind::Error` and convert `ErrorHandled::Reported` to it.

By replicating the `ty::Error` approach to encoding "an error has occurred", all of the mechanisms that skip redundant/downstream errors are engaged and help out (see the reduction in test output).

This PR also adds `ErrorHandled::Linted` for the lint case because using `ErrorHandled::Reported` *without* having emitted an error that is *guaranteed* to stop compilation, is incorrect now.

r? @oli-obk cc @rust-lang/wg-const-eval @varkor @yodaldevoid

4 years agoFormat Mailmap To Work With GitHub
XAMPPRocky [Fri, 17 Apr 2020 11:33:33 +0000 (13:33 +0200)]
Format Mailmap To Work With GitHub

4 years agoRename `asm` test directory in favor of `llvm_asm`
Yuki Okushi [Fri, 17 Apr 2020 09:36:16 +0000 (18:36 +0900)]
Rename `asm` test directory in favor of `llvm_asm`

4 years agoMiri: fix typo
Ralf Jung [Fri, 17 Apr 2020 09:23:20 +0000 (11:23 +0200)]
Miri: fix typo

4 years agoAuto merge of #70629 - anyska:fields-variant, r=oli-obk
bors [Fri, 17 Apr 2020 08:42:51 +0000 (08:42 +0000)]
Auto merge of #70629 - anyska:fields-variant, r=oli-obk

rustc_target::abi: add Primitive variant to FieldsShape.

Originally suggested by @eddyb.

4 years agoAuto merge of #71230 - Dylan-DPC:rollup-rofigbv, r=Dylan-DPC
bors [Fri, 17 Apr 2020 04:15:18 +0000 (04:15 +0000)]
Auto merge of #71230 - Dylan-DPC:rollup-rofigbv, r=Dylan-DPC

Rollup of 7 pull requests

Successful merges:

 - #70578 (Add long error explanation for E0657)
 - #70910 (Hides default fns inside Fuse impl to avoid exposing it to any crate)
 - #71164 (reword Miri validity errors: undefined -> uninitialized)
 - #71182 (Add some regression tests)
 - #71206 (Miri error messages: avoid try terminology)
 - #71220 (Dogfood or_patterns in the standard library)
 - #71225 (Fix typo in Default trait docs: Provides -> Provide)

Failed merges:

r? @ghost

4 years agoty/print: pretty-print constant aggregates (arrays, tuples and ADTs).
Eduard-Mihai Burtescu [Fri, 17 Apr 2020 00:55:39 +0000 (03:55 +0300)]
ty/print: pretty-print constant aggregates (arrays, tuples and ADTs).

4 years agomir: pretty-print `Rvalue::Aggregate` correctly.
Eduard-Mihai Burtescu [Fri, 17 Apr 2020 00:54:58 +0000 (03:54 +0300)]
mir: pretty-print `Rvalue::Aggregate` correctly.

4 years agoRollup merge of #71225 - leocassarani:patch-1, r=jonas-schievink
Dylan DPC [Fri, 17 Apr 2020 01:05:21 +0000 (03:05 +0200)]
Rollup merge of #71225 - leocassarani:patch-1, r=jonas-schievink

Fix typo in Default trait docs: Provides -> Provide

An earlier commit (99ed06e) accidentally changed this paragraph from the original, imperative `Provide` to the present tense `Provides`. The latter is indeed the standard for Rustdoc comments relating to a function or method, but this snippet is introducing the `Default` trait in general terms and not talking about any particular function. I believe this change was likely made in error and should be reverted.

4 years agoRollup merge of #71220 - cuviper:std_or_patterns, r=Mark-Simulacrum
Dylan DPC [Fri, 17 Apr 2020 01:05:19 +0000 (03:05 +0200)]
Rollup merge of #71220 - cuviper:std_or_patterns, r=Mark-Simulacrum

Dogfood or_patterns in the standard library

We can start using `or_patterns` in the standard library as a step toward stabilization.

cc #54883 @Centril

4 years agoRollup merge of #71206 - RalfJung:dont-try, r=oli-obk
Dylan DPC [Fri, 17 Apr 2020 01:05:18 +0000 (03:05 +0200)]
Rollup merge of #71206 - RalfJung:dont-try, r=oli-obk

Miri error messages: avoid try terminology

r? @oli-obk

4 years agoRollup merge of #71182 - JohnTitor:regression-tests, r=Mark-Simulacrum
Dylan DPC [Fri, 17 Apr 2020 01:05:16 +0000 (03:05 +0200)]
Rollup merge of #71182 - JohnTitor:regression-tests, r=Mark-Simulacrum

Add some regression tests

Closes #24843
Closes #28575
Closes #54067
Closes #66868
Closes #67893
Closes #68813

4 years agoRollup merge of #71164 - RalfJung:uninit-not-undef, r=oli-obk
Dylan DPC [Fri, 17 Apr 2020 01:05:15 +0000 (03:05 +0200)]
Rollup merge of #71164 - RalfJung:uninit-not-undef, r=oli-obk

reword Miri validity errors: undefined -> uninitialized

I don't think we say "undefined value" or anything like that anywhere in the docs or so, but we do use the term "uninitialized memory", so I think we should do the same here.

Longer-term, I think we should also internally rename "undef" to "uninit".

r? @oli-obk

4 years agoRollup merge of #70910 - rakshith-ravi:master, r=cuviper
Dylan DPC [Fri, 17 Apr 2020 01:05:13 +0000 (03:05 +0200)]
Rollup merge of #70910 - rakshith-ravi:master, r=cuviper

Hides default fns inside Fuse impl to avoid exposing it to any crate

Fixes #70796

@cuviper I've added some default, private traits to do the job for us. If required, I can expose them to a specific visibility if you want to call these functions for #70332

r? @cuviper

4 years agoRollup merge of #70578 - PankajChaudhary5:master, r=GuillaumeGomez
Dylan DPC [Fri, 17 Apr 2020 01:05:11 +0000 (03:05 +0200)]
Rollup merge of #70578 - PankajChaudhary5:master, r=GuillaumeGomez

Add long error explanation for E0657

Added proper error explanation for issue E0657 in the Rust compiler.

Part of #61137

r? @GuillaumeGomez

4 years agoty/print/pretty: use `comma_sep` instead of replicating it.
Eduard-Mihai Burtescu [Fri, 17 Apr 2020 00:54:13 +0000 (03:54 +0300)]
ty/print/pretty: use `comma_sep` instead of replicating it.

4 years agoAuto merge of #71131 - pnkfelix:issue-69798-dont-reuse-post-lto-products-when-exports...
bors [Fri, 17 Apr 2020 00:44:24 +0000 (00:44 +0000)]
Auto merge of #71131 - pnkfelix:issue-69798-dont-reuse-post-lto-products-when-exports-change, r=nagisa

Do not reuse post LTO products when exports change

Do not reuse post lto products when exports change

Generalizes code from PR #67020, which handled case when imports change.

Fix #69798

4 years agoFix typo in Default trait docs: Provides -> Provide
Leo Cassarani [Thu, 16 Apr 2020 21:30:53 +0000 (22:30 +0100)]
Fix typo in Default trait docs: Provides -> Provide

An earlier commit (99ed06e) accidentally changed this paragraph from the
original, imperative "Provide" to the present tense "Provides". The
latter is indeed the standard for Rustdoc comments relating to a
function or method, but this snippet is introducing the Default trait in
general terms and not talking about any particular function. I believe
this change was likely made in error and should be reverted.

4 years agoAuto merge of #71223 - Dylan-DPC:rollup-z5itu39, r=Dylan-DPC
bors [Thu, 16 Apr 2020 21:36:23 +0000 (21:36 +0000)]
Auto merge of #71223 - Dylan-DPC:rollup-z5itu39, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #70611 (Add long error explanation for E0708 #61137)
 - #71197 (Don't use the HirId to NodeId map in MIR)
 - #71211 (Update cargo)
 - #71219 (Minor fixes to doc comments of 'VecDeque')
 - #71221 (Dogfood or_patterns in rustdoc)

Failed merges:

r? @ghost

4 years agoRollup merge of #71221 - cuviper:rustdoc_or_patterns, r=Mark-Simulacrum
Dylan DPC [Thu, 16 Apr 2020 21:34:46 +0000 (23:34 +0200)]
Rollup merge of #71221 - cuviper:rustdoc_or_patterns, r=Mark-Simulacrum

Dogfood or_patterns in rustdoc

We can start using `or_patterns` in `rustdoc` as a step toward stabilization.

cc #54883 @Centril

4 years agoRollup merge of #71219 - JOE1994:patch-4, r=Mark-Simulacrum
Dylan DPC [Thu, 16 Apr 2020 21:34:45 +0000 (23:34 +0200)]
Rollup merge of #71219 - JOE1994:patch-4, r=Mark-Simulacrum

Minor fixes to doc comments of 'VecDeque'

1. Changed descriptions of `fn get` & `fn get_mut`.
  Since both of these functions are returning references, and not the owned value, I thought the doc comments could be fixed to be consistent with doc comments of `fn front` & `fn front_mut`.

2. Other changes are minor fixes or additions for clarification.

Thank you for taking a look :)

4 years agoRollup merge of #71211 - ehuss:update-cargo, r=ehuss
Dylan DPC [Thu, 16 Apr 2020 21:34:43 +0000 (23:34 +0200)]
Rollup merge of #71211 - ehuss:update-cargo, r=ehuss

Update cargo

3 commits in 74e3a7d5b756d7c0e94399fc29fcd154e792c22a..ebda5065ee8a1e46801380abcbac21a25bc7e755
2020-04-13 20:41:52 +0000 to 2020-04-16 14:28:43 +0000
- Don't use debug display for error object. (rust-lang/cargo#8119)
- Add backwards-compatibility for old cargo-tree flags. (rust-lang/cargo#8115)
- Try to avoid panics on buggy (?) clocks (rust-lang/cargo#8114)

4 years agoRollup merge of #71197 - ljedrz:unsafe_unused, r=ecstatic-morse
Dylan DPC [Thu, 16 Apr 2020 21:34:42 +0000 (23:34 +0200)]
Rollup merge of #71197 - ljedrz:unsafe_unused, r=ecstatic-morse

Don't use the HirId to NodeId map in MIR

Another step towards not having to build a `HirId` to `NodeId` map other than for doc and RLS purposes.

We are currently sorting `unsafe` blocks by `NodeId` in `check_unsafety`; change it to sorting by `Span` instead; this passes the tests, but better ideas are welcome.

In addition, simplify the split between the used and unused `unsafe` blocks for readability and less sorting.

cc https://github.com/rust-lang/rust/issues/50928

4 years agoRollup merge of #70611 - pawanbisht62:doc/61137-add-long-error-code-e0708, r=Guillaum...
Dylan DPC [Thu, 16 Apr 2020 21:34:41 +0000 (23:34 +0200)]
Rollup merge of #70611 - pawanbisht62:doc/61137-add-long-error-code-e0708, r=GuillaumeGomez

Add long error explanation for E0708 #61137

Add long explanation for the E0708 error code
Part of #61137

r? @GuillaumeGomez

4 years agoAvoid emitting stderr for now
Yuki Okushi [Thu, 16 Apr 2020 15:14:52 +0000 (00:14 +0900)]
Avoid emitting stderr for now

4 years agoAdd test for issue-67893
Yuki Okushi [Thu, 16 Apr 2020 01:09:59 +0000 (10:09 +0900)]
Add test for issue-67893

4 years agoAdd test for issue-54067
Yuki Okushi [Thu, 16 Apr 2020 01:09:47 +0000 (10:09 +0900)]
Add test for issue-54067

4 years agoAdd test for issue-28575
Yuki Okushi [Thu, 16 Apr 2020 01:09:34 +0000 (10:09 +0900)]
Add test for issue-28575

4 years agoAdd test for issue-24843
Yuki Okushi [Thu, 16 Apr 2020 01:09:16 +0000 (10:09 +0900)]
Add test for issue-24843

4 years agoDogfood or_patterns in rustdoc
Josh Stone [Thu, 16 Apr 2020 20:58:47 +0000 (13:58 -0700)]
Dogfood or_patterns in rustdoc

4 years agoApply suggestions from code review
Christopher Durham [Thu, 16 Apr 2020 20:44:30 +0000 (16:44 -0400)]
Apply suggestions from code review

Co-Authored-By: Ralf Jung <post@ralfj.de>
4 years agoMinor fixes to doc comments of 'VecDequeue'
Youngsuk Kim [Thu, 16 Apr 2020 20:26:14 +0000 (16:26 -0400)]
Minor fixes to doc comments of 'VecDequeue'

1. Changed descriptions of `fn get` & `fn get_mut`.
  Since both of these functions are returning references, and not the owned value, I thought the doc comments could be fixed to be consistent with doc comments of `fn front` & `fn front_mut`.

2. Other changes are minor fixes or additions for clarification.

Thank you for taking a look :)

4 years agooutlives: ignore lifetimes shallowly found in `ty::FnDef`s.
Eduard-Mihai Burtescu [Thu, 16 Apr 2020 20:18:44 +0000 (23:18 +0300)]
outlives: ignore lifetimes shallowly found in `ty::FnDef`s.

4 years agoDogfood or_patterns in the standard library
Josh Stone [Thu, 16 Apr 2020 19:44:57 +0000 (12:44 -0700)]
Dogfood or_patterns in the standard library

4 years agoAuto merge of #71201 - Dylan-DPC:rollup-23202uf, r=Dylan-DPC
bors [Thu, 16 Apr 2020 18:02:11 +0000 (18:02 +0000)]
Auto merge of #71201 - Dylan-DPC:rollup-23202uf, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #70566 (Don't bail out before linting in generic contexts.)
 - #71141 (Provide better compiler output when using `?` on `Option` in fn returning `Result` and vice-versa)
 - #71149 (remove an impossible branch from check_consts)
 - #71179 (fix more clippy warnings)
 - #71191 (Clean up E0520 explanation)

Failed merges:

r? @ghost

4 years agocomment on the sorting of unused unsafe blocks
ljedrz [Thu, 16 Apr 2020 18:00:54 +0000 (20:00 +0200)]
comment on the sorting of unused unsafe blocks

4 years agoUpdate cargo
Eric Huss [Thu, 16 Apr 2020 17:16:11 +0000 (10:16 -0700)]
Update cargo

4 years agoMove stack access methods in the Machine implementations out of the enforce_ method...
Vytautas Astrauskas [Thu, 16 Apr 2020 16:57:12 +0000 (09:57 -0700)]
Move stack access methods in the Machine implementations out of the enforce_ method group.

4 years agobikeshed
Ralf Jung [Thu, 16 Apr 2020 16:47:05 +0000 (18:47 +0200)]
bikeshed

4 years agoty: convert `ErrorHandled::Reported` to `ConstKind::Error`.
Eduard-Mihai Burtescu [Sun, 12 Apr 2020 04:16:38 +0000 (07:16 +0300)]
ty: convert `ErrorHandled::Reported` to `ConstKind::Error`.

4 years agomir/interpret: only use `ErrorHandled::Reported` for `ErrorReported`.
Eduard-Mihai Burtescu [Sun, 12 Apr 2020 01:24:25 +0000 (04:24 +0300)]
mir/interpret: only use `ErrorHandled::Reported` for `ErrorReported`.

4 years agoPartially revert "Do not ICE in the face of invalid enum discriminant"
Eduard-Mihai Burtescu [Thu, 16 Apr 2020 10:48:17 +0000 (13:48 +0300)]
Partially revert "Do not ICE in the face of invalid enum discriminant"

This (partially) reverts commit f47c4ffdfacc783b3fe4bad395a6e16ae296b3d1.

4 years agoty: add `ty::ConstKind::Error` to replace `tcx.consts.err`.
Eduard-Mihai Burtescu [Thu, 16 Apr 2020 10:47:47 +0000 (13:47 +0300)]
ty: add `ty::ConstKind::Error` to replace `tcx.consts.err`.

4 years agoMiri error messages: avoid try terminology
Ralf Jung [Thu, 16 Apr 2020 15:41:28 +0000 (17:41 +0200)]
Miri error messages: avoid try terminology

4 years agoRemove inline attribute from `into_vec()`
Yuki Okushi [Thu, 16 Apr 2020 15:23:44 +0000 (00:23 +0900)]
Remove inline attribute from `into_vec()`

4 years agorustc_target::abi: add Primitive variant to FieldsShape.
Ana-Maria Mihalache [Thu, 16 Apr 2020 15:15:46 +0000 (15:15 +0000)]
rustc_target::abi: add Primitive variant to FieldsShape.

4 years agoMove the explanation why adjust_global_const is called for all constants.
Vytautas Astrauskas [Thu, 16 Apr 2020 15:09:42 +0000 (08:09 -0700)]
Move the explanation why adjust_global_const is called for all constants.

4 years agoRename Machine::eval_maybe_thread_local_static_const to adjust_global_const and add...
Vytautas Astrauskas [Thu, 16 Apr 2020 14:47:10 +0000 (07:47 -0700)]
Rename Machine::eval_maybe_thread_local_static_const to adjust_global_const and add an additional comment.

4 years agoRollup merge of #71191 - GuillaumeGomez:cleanup-e0520, r=Dylan-DPC
Dylan DPC [Thu, 16 Apr 2020 14:34:32 +0000 (16:34 +0200)]
Rollup merge of #71191 - GuillaumeGomez:cleanup-e0520, r=Dylan-DPC

Clean up E0520 explanation

r? @Dylan-DPC

4 years agoRollup merge of #71179 - matthiaskrgr:cl6ppy, r=Dylan-DPC
Dylan DPC [Thu, 16 Apr 2020 14:34:30 +0000 (16:34 +0200)]
Rollup merge of #71179 - matthiaskrgr:cl6ppy, r=Dylan-DPC

fix more clippy warnings

4 years agoRollup merge of #71149 - RalfJung:check-const-call, r=eddyb
Dylan DPC [Thu, 16 Apr 2020 14:34:29 +0000 (16:34 +0200)]
Rollup merge of #71149 - RalfJung:check-const-call, r=eddyb

remove an impossible branch from check_consts

All function calleess are either `FnPtr` or `FnDef`, so we can remove the alternative from check_consts and just make it ICE instead.

4 years agoRollup merge of #71141 - Duddino:master, r=estebank
Dylan DPC [Thu, 16 Apr 2020 14:34:27 +0000 (16:34 +0200)]
Rollup merge of #71141 - Duddino:master, r=estebank

Provide better compiler output when using `?` on `Option` in fn returning `Result` and vice-versa

Fixes #71089

4 years agoRollup merge of #70566 - jumbatm:exceeding-bitshifts-constprop, r=RalfJung
Dylan DPC [Thu, 16 Apr 2020 14:34:23 +0000 (16:34 +0200)]
Rollup merge of #70566 - jumbatm:exceeding-bitshifts-constprop, r=RalfJung

Don't bail out before linting in generic contexts.

Fixes #69021.

cc #70017

r? @RalfJung

4 years agoAuto merge of #70755 - wesleywiser:simplify_locals_2_electric_boogaloo, r=oli-obk
bors [Thu, 16 Apr 2020 14:26:43 +0000 (14:26 +0000)]
Auto merge of #70755 - wesleywiser:simplify_locals_2_electric_boogaloo, r=oli-obk

[mir-opt] Run SimplifyLocals to a fixedpoint and handle most rvalues

Follow up to review feedback left on #70595.

4 years agosort unused unsafe blocks by Span instead of NodeId
ljedrz [Thu, 16 Apr 2020 12:53:09 +0000 (14:53 +0200)]
sort unused unsafe blocks by Span instead of NodeId

4 years agoRespond to code review feedback
Wesley Wiser [Thu, 16 Apr 2020 12:34:37 +0000 (08:34 -0400)]
Respond to code review feedback

- Remove reads of indirect `Place`s
- Add comments explaining what the algorithm does

4 years agosimplify unused unsafe block handling
ljedrz [Thu, 16 Apr 2020 12:24:52 +0000 (14:24 +0200)]
simplify unused unsafe block handling

4 years agoFixed issue with self: &Box<Self>
Duddino [Thu, 16 Apr 2020 12:04:12 +0000 (14:04 +0200)]
Fixed issue with self: &Box<Self>

4 years agoClean up E0520 explanation
Guillaume Gomez [Thu, 16 Apr 2020 11:51:02 +0000 (13:51 +0200)]
Clean up E0520 explanation

4 years ago./x.py fmt
Duddino [Thu, 16 Apr 2020 09:34:26 +0000 (11:34 +0200)]
./x.py fmt

4 years agofixed missing trait method suggests incorrect code (self parameter not named self)
Duddino [Thu, 16 Apr 2020 09:28:49 +0000 (11:28 +0200)]
fixed missing trait method suggests incorrect code (self parameter not named self)

4 years agotest fast path offset reporting
Ralf Jung [Thu, 16 Apr 2020 11:21:23 +0000 (13:21 +0200)]
test fast path offset reporting

4 years agoswitch back to 'bytes'
Ralf Jung [Thu, 16 Apr 2020 11:19:51 +0000 (13:19 +0200)]
switch back to 'bytes'

4 years agoAuto merge of #70831 - sfackler:shrink-future-stack, r=matthewjasper
bors [Thu, 16 Apr 2020 09:13:07 +0000 (09:13 +0000)]
Auto merge of #70831 - sfackler:shrink-future-stack, r=matthewjasper

Remove a stack frame from .await calls

The stack frames when `.await`ing one async fn from another currently look like this:

```
  12: foo::b::{{closure}}
             at src/main.rs:2
  13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/sfackler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:66
  14: core::future::poll_with_context
             at /home/sfackler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:84
  15: foo::a::{{closure}}
             at src/main.rs:6
```

Since the move away from using TLS to pass the Context around, it's now easy to remove frame 14 by removing poll_with_context in favor of calling Future::poll directly. This still leaves the `GenFuture` frame, but that seems significantly harder to deal with.

It also improves diagnostics a bit since they no longer talk about the private poll_with_context function.

4 years agoAuto merge of #71173 - RalfJung:miri, r=RalfJung
bors [Thu, 16 Apr 2020 05:47:24 +0000 (05:47 +0000)]
Auto merge of #71173 - RalfJung:miri, r=RalfJung

bump Miri

Fixes https://github.com/rust-lang/rust/issues/71110
r? @ghost Cc @rust-lang/miri