Commit Graph

140522 Commits

Author SHA1 Message Date
Nikita Popov
ef269ac4fc Add tests for issues #82833 and #82859 2021-03-11 22:58:14 +01:00
bors
03e864fd86 Auto merge of #82417 - the8472:fix-copy_file_range-append, r=m-ou-se
Fix io::copy specialization using copy_file_range when writer was opened with O_APPEND

fixes #82410

While `sendfile()` returns `EINVAL` when the output was opened with O_APPEND,  `copy_file_range()` does not and returns `EBADF` instead, which – unlike other `EBADF` causes – is not fatal for this operation since a regular `write()` will likely succeed.

We now treat `EBADF` as a non-fatal error for `copy_file_range` and fall back to a read-write copy as we already did for several other errors.
2021-03-11 21:41:01 +00:00
Guillaume Gomez
1d26e6b632 Improve code by removing similar function calls and using loops instead for collecting iterators 2021-03-11 22:33:40 +01:00
Guillaume Gomez
2069d3e13b Update doc alias ui tests 2021-03-11 22:33:40 +01:00
Nikita Popov
d9be71a5b8 Update llvm-project submodule 2021-03-11 22:04:10 +01:00
Guillaume Gomez
56898ec6a7 Prevent JS error when there is no dependency or other crate documented 2021-03-11 21:13:42 +01:00
bors
6ed6f1e6a1 Auto merge of #6826 - TaKO8Ki:refactor-methods-mod, r=phansch
Refactor: arrange lints in `methods` module

This PR arranges methods lints so that they can be accessed more easily.
Basically, I refactored them following the instruction described in #6680.

changelog: Move lints in methods module into their own modules.
2021-03-11 19:54:48 +00:00
LeSeulArtichaut
6bf4147646 Add -Z unpretty flag for the THIR 2021-03-11 19:42:40 +01:00
LeSeulArtichaut
2a34428253 Make THIR data structures public 2021-03-11 19:42:39 +01:00
bors
4a8b6f708c Auto merge of #82806 - nikic:memcpyopt-mssa, r=nagisa
Enable MemorySSA in MemCpyOpt

LLVM 12 ships with an implementation of MemCpyOpt which is based on MSSA instead of MDA. This implementation can eliminate memcpys across blocks, and as such fixes many (but not all) failures to eliminate redundant memcpys for Rust code. Unfortunately this was only enabled by default shortly after LLVM 12 was cut. This backports the enablement to our LLVM fork.

Perf results: https://perf.rust-lang.org/compare.html?start=8fd946c63a6c3aae9788bd459d278cb2efa77099&end=0628b91ce17035fb5b6a1a99a4f2ab9ab69be7a8

There are improvements on check and debug builds, which indicate that rustc itself has become faster. For opt builds this is, on average, a very minor improvement as well, although there is one significant outlier with deep-vector-opt. This benchmark creates ~140000 zero stores, which are now coalesced into a memset slightly later, resulting in longer compile-time for intermediate passes.
2021-03-11 18:14:59 +00:00
Mara Bos
bf27819f37 Don't implement mem::replace with mem::swap. 2021-03-11 19:04:47 +01:00
Igor Matuszewski
ae5cc8a75b Update RLS 2021-03-11 19:02:00 +01:00
csmoe
77fb6a0f32 fix: check before index into generated patterns 2021-03-12 01:54:08 +08:00
csmoe
2fd2796aae add ui testcase for issue 82772 2021-03-12 01:53:55 +08:00
bors
534a13db96 Auto merge of #6884 - matthiaskrgr:lintcheck_crate, r=Manishearth
move lintcheck into its own crate

This pr:
* moves lintcheck out of `clippy dev` and into its own crate (`lintcheck`)  (I should have done this earlier :D)
* makes lintcheck terminate if it is not launched from the repo root (to prevent problems with wrong paths when using `cargo run` in the crate root)
* fixes json lint messages leaking the runners `$HOME` when a lint messages comes from a proc macro that originates from a crate inside the `$CARGO_CACHE`
* adds more documentation to lintchecks `README.md` and mentions lintcheck in `docs/basics.md`

changelog: none
2021-03-11 16:10:33 +00:00
bors
61365c0625 Auto merge of #82495 - LeSeulArtichaut:eager-thir, r=oli-obk
Eagerly construct bodies of THIR

With this PR:
 - the THIR is no longer constructed lazily, but is entirely built before being passed to the MIR Builder
 - the THIR is now allocated in arenas instead of `Box`es

However, this PR doesn't make any changes to the way patterns are constructed: they are still boxed, and exhaustiveness checking is unchanged.

Implements MCP rust-lang/compiler-team#409.
Closes rust-lang/project-thir-unsafeck#1.
r? `@ghost` cc `@nikomatsakis` `@oli-obk`
2021-03-11 15:34:01 +00:00
Ryan Levick
302867cf48 Clean up handling of child process 2021-03-11 16:23:25 +01:00
Oli Scherer
c69b108d2a Reintroduce accidentally deleted assertions.
These were removed in https://github.com/rust-lang/rust/pull/50198
2021-03-11 14:56:03 +00:00
Matthias Krüger
0af90fd15a doc line length fixes 2021-03-11 15:47:51 +01:00
Matthias Krüger
ac935781f5 docs: basics.md: mention lintcheck 2021-03-11 15:37:10 +01:00
Matthias Krüger
528e464b4f lintcheck: fix clippy warnings 2021-03-11 15:28:27 +01:00
Matthias Krüger
b068b742ee lintcheck: fix --fix and document it in the readme.
also hook lintcheck into clippy-dev so that `clippy dev fmt` formats it.
2021-03-11 15:27:30 +01:00
Matthias Krüger
b29ef183fb lintcheck: update logs 2021-03-11 15:27:30 +01:00
Matthias Krüger
3e60ba073b lintcheck: fix bug where lint messages about macros coming from crate deps would sneak in absolute paths to registry sources.
make the path a relative path that starts at the CARGO_HOME to not print the users home location in the log
2021-03-11 15:27:30 +01:00
Matthias Krüger
d859a17cdd lintcheck: update readme and remove the now redundant readme from clippy-dev 2021-03-11 15:27:30 +01:00
Matthias Krüger
fac6da1cfb move testfiles to "lintcheck" and fix more paths 2021-03-11 15:27:26 +01:00
Nikita Popov
623ca84ab7 Enable MemorySSA-based MemCpyOpt
This updates the LLVM submodule to pick up a backported patch
to enable MemorySSA-based MemCpyOpt, which is capable of optimizing
away memcpy's across basic blocks.
2021-03-11 14:28:47 +01:00
Matthias Krüger
c760150989 gitignore: add lintchecks target dir 2021-03-11 13:26:27 +01:00
Matthias Krüger
a846945b82 lintcheck: make sure we lauch from the repo root
This will terminate the program if run via "cargo run".
"cargo run" does currently not work because at least a bunch of paths do not take that into account.
2021-03-11 13:26:26 +01:00
Matthias Krüger
2546e6f006 lintcheck: move out of clippy-dev into own crate 2021-03-11 13:26:26 +01:00
bors
5c6d3bf389 Auto merge of #83009 - RalfJung:miri, r=RalfJung
bump Miri

Fixes https://github.com/rust-lang/rust/issues/82961
Cc `@rust-lang/miri` r? `@ghost`
2021-03-11 11:37:36 +00:00
Camille GILLOT
34e92bbf65 Hash SyntaxContext first. 2021-03-11 12:31:31 +01:00
Camille GILLOT
fe2d728e62 Remove useless method. 2021-03-11 12:24:58 +01:00
Camille GILLOT
84bf599bac Add inlining. 2021-03-11 12:24:43 +01:00
Takayuki Maeda
83a955335f fix interning-defined-symbol error 2021-03-11 20:18:33 +09:00
Takayuki Maeda
99f860768c remove unused imports 2021-03-11 20:02:29 +09:00
Takayuki Maeda
c711de28ee move expect_fun_call to its own module 2021-03-11 19:40:50 +09:00
Takayuki Maeda
f49349bf33 move or_fun_call to its own module 2021-03-11 19:40:24 +09:00
Takayuki Maeda
b0824bf75f move map_unwrap_or to its own module 2021-03-11 19:40:24 +09:00
Takayuki Maeda
5557596926 move option_map_or_none to its own module 2021-03-11 19:40:24 +09:00
Takayuki Maeda
bbed852f6f unnecessary_fold to its own module 2021-03-11 19:40:24 +09:00
Takayuki Maeda
78e572c627 move useless_asref to its own module 2021-03-11 19:40:24 +09:00
Takayuki Maeda
caaba8270c move clone_on_copy to its own module 2021-03-11 19:40:24 +09:00
Takayuki Maeda
171c4c1485 move iter_skip_next to its own module 2021-03-11 19:40:24 +09:00
Takayuki Maeda
24909fabd2 move map_flatten and search_is_some to their own modules 2021-03-11 19:40:24 +09:00
Takayuki Maeda
37ba779a53 move flat_map_identity to its own module 2021-03-11 19:40:24 +09:00
Takayuki Maeda
f430384f04 move filter_map_flat_map to its own module 2021-03-11 19:40:24 +09:00
Takayuki Maeda
6d941616f9 move filter_flat_map to its own module 2021-03-11 19:40:24 +09:00
Takayuki Maeda
2baf043c37 move filter_map_next to its own module 2021-03-11 19:40:24 +09:00
Takayuki Maeda
805dcd12d4 move filter_map_map to its own module 2021-03-11 19:40:24 +09:00