Commit graph

161268 commits

Author SHA1 Message Date
hafeoz 7cc6a73936 Remove asm feature from lints example 2022-01-13 15:59:24 +00:00
Loïc BRANSTETT b8ef148eff Regenerate the PNGs favicon with the updated Rust logo 2022-01-13 14:45:10 +01:00
Loïc BRANSTETT bc6b199588 Use the updated Rust logo and change it's format to SVG 2022-01-13 14:44:30 +01:00
flip1995 b83c77cb7c
Fix Clippy sync fallout 2022-01-13 13:37:29 +01:00
flip1995 159d6c356e
Update Cargo.lock 2022-01-13 13:18:51 +01:00
flip1995 ba66384447
Merge commit '97a5daa65908e59744e2bc625b14849352231c75' into clippyup 2022-01-13 13:18:19 +01:00
bors 97a5daa659 Auto merge of #8272 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2022-01-13 11:55:36 +00:00
flip1995 6ad05bcbbe
Bump nightly version -> 2022-01-13 2022-01-13 12:48:17 +01:00
flip1995 8a2141bae4
Bump Clippy Version -> 0.1.60 2022-01-13 12:48:08 +01:00
flip1995 11be495bde
Merge remote-tracking branch 'upstream/master' into rustup 2022-01-13 12:47:48 +01:00
Matthias Krüger 1a95aa9a8b
Rollup merge of #92832 - ehuss:1.58-releases, r=Mark-Simulacrum
Update RELEASES for 1.58.

From what I can tell:

* `NonZero{unsigned}::is_power_of_two` was stabilized in 1.59: https://github.com/rust-lang/rust/pull/91301
* `MaybeUninit` const was added in 1.59: https://github.com/rust-lang/rust/pull/90896
2022-01-13 08:11:23 +01:00
Matthias Krüger a9fe2b95da
Rollup merge of #92807 - ehuss:update-cargo, r=ehuss
Update cargo

6 commits in 358e79fe56fe374649275ca7aebaafd57ade0e8d..06b9d31743210b788b130c8a484c2838afa6fc27
2022-01-04 18:39:45 +0000 to 2022-01-11 23:47:29 +0000
- Port cargo to clap3 (rust-lang/cargo#10265)
- feat: support rustflags per profile (rust-lang/cargo#10217)
- Make bors ignore the PR template so it doesn't end up in merge messages (rust-lang/cargo#10267)
- Be resilient to most IO error and filesystem loop while walking dirs (rust-lang/cargo#10214)
- Remove the option to disable pipelining (rust-lang/cargo#10258)
- Always ask rustc for messages about artifacts, and always process them (rust-lang/cargo#10255)
2022-01-13 08:11:22 +01:00
Matthias Krüger ac81a13640
Rollup merge of #92334 - dtolnay:rustdocmatcher, r=camelid,GuillaumeGomez
rustdoc: Preserve rendering of macro_rules matchers when possible

Fixes #92331. This approach restores the behavior prior to #86282 **if** the matcher token held by the compiler **and** the matcher token found in the source code are identical TokenTrees. Thus #86208 remains fixed, but without regressing formatting for the vast majority of macros which are not macro-generated.
2022-01-13 08:11:22 +01:00
Matthias Krüger f84d35f0b8
Rollup merge of #92277 - petrochenkov:cmrval2, r=jackh726
rustc_metadata: Stop passing `CrateMetadataRef` by reference (step 1)

It's already a (fat) reference.
Double referencing it creates lifetime issues for its methods that want to return iterators.

---
Extracted from https://github.com/rust-lang/rust/pull/92245 for a perf run.
The PR changes a lot of symbol names due to function signature changes, so it's hard to do differential profiling, let's spend some machine time instead.
2022-01-13 08:11:21 +01:00
Matthias Krüger 5e04f513cd
Rollup merge of #92142 - wesleywiser:fix_codecoverage_partitioning, r=tmandry
[code coverage] Fix missing dead code in modules that are never called

The issue here is that the logic used to determine which CGU to put the dead function stubs in doesn't handle cases where a module is never assigned to a CGU (which is what happens when all of the code in the module is dead).

The partitioning logic also caused issues in #85461 where inline functions were duplicated into multiple CGUs resulting in duplicate symbols.

This commit fixes the issue by removing the complex logic used to assign dead code stubs to CGUs and replaces it with a much simpler model: we pick one CGU to hold all the dead code stubs. We pick a CGU which has exported items which increases the likelihood the linker won't throw away our dead functions and we pick the smallest to minimize the impact on compilation times for crates with very large CGUs.

Fixes #91661
Fixes #86177
Fixes #85718
Fixes #79622

r? ```@tmandry```
cc ```@richkadel```

This PR is not urgent so please don't let it interrupt your holidays! 🎄 🎁
2022-01-13 08:11:20 +01:00
Matthias Krüger b45a819bef
Rollup merge of #92006 - oli-obk:welcome_opaque_types_into_the_fold, r=nikomatsakis
Welcome opaque types into the fold

r? ```@nikomatsakis``` because idk who else to bug on the type_op changes

The commits have explanations in them. The TLDR is that

* 5c46002273 stops the "recurse and replace" scheme that replaces opaque types with their canonical inference var by just doing that ahead of time
* bdeeb07bf6 does not affect anything on master afaict, but since opaque types generate obligations when instantiated, and lazy TAIT instantiates opaque types *everywhere*, we need to properly handle obligations here instead of just hoping no problematic obligations ever come up.
2022-01-13 08:11:19 +01:00
Matthias Krüger e045c79c2d
Rollup merge of #91938 - yaahc:error-reporter, r=m-ou-se
Add `std::error::Report` type

This is a continuation of https://github.com/rust-lang/rust/pull/90174, split into a separate PR since I cannot push to ```````@seanchen1991``````` 's fork
2022-01-13 08:11:18 +01:00
Matthias Krüger 3e7bc08b6c
Rollup merge of #91687 - euclio:tuple-variant-field-section, r=GuillaumeGomez
rustdoc: do not emit tuple variant fields if none are documented

Fixes #90824.

Before:

![2021-12-15T22:26:41](https://user-images.githubusercontent.com/1372438/146302871-4d265433-b9aa-4e53-adfb-e7cb92107180.png)

After:

![2021-12-15T22:27:01](https://user-images.githubusercontent.com/1372438/146302872-e39eda3d-2fb2-4fb9-aae7-2008e4e1b4dd.png)
2022-01-13 08:11:17 +01:00
Matthias Krüger c7ada001ec
Rollup merge of #90001 - Fearyncess:master, r=alexcrichton
Make rlib metadata strip works with MIPSr6 architecture

Because MIPSr6 has many differences with previous MIPSr2 arch, the previous rlib metadata stripping code in `rustc_codegen_ssa` is only for MIPSr2/r3/r5 (which share the same elf e_flags).

This commit fixed this problem. It makes `rustc_codegen_ssa` happy when compiling rustc for MIPSr6 target or hosts.

e_flags REF: e356027016/llvm/include/llvm/BinaryFormat/ELF.h (L562)
2022-01-13 08:11:16 +01:00
hafeoz 7b74ded9a0 Fix lints documents 2022-01-13 03:57:44 +00:00
bors 256721ee51 Auto merge of #92553 - m-ou-se:thread-join-simplify, r=Mark-Simulacrum
Simpilfy thread::JoinInner.

`JoinInner`'s `native` field was an `Option`, but that's unnecessary.

Also, thanks to `Arc::get_mut`, there's no unsafety needed in `JoinInner::join()`.
2022-01-13 03:46:19 +00:00
bors e916815d21 Auto merge of #92526 - djc:rustdoc-askama, r=jsha
Migrate rustdoc from Tera to Askama

See #84419.

Should probably get a benchmarking run to verify if it has the intended effect on rustdoc performance.

cc `@jsha` `@jyn514.`
2022-01-13 00:29:34 +00:00
Eric Huss 5b2d5da0d3 Update RELEASES for 1.58. 2022-01-12 16:05:30 -08:00
Camille GILLOT 441c1a6c50 Bless tests. 2022-01-12 23:41:28 +01:00
Camille GILLOT 2e0a80c8c0 Err about fn traits in a single place. 2022-01-12 23:13:52 +01:00
pierwill 68515cb668 Rename environment variable for overriding rustc version 2022-01-12 15:31:26 -06:00
bors 124555a69e Auto merge of #92169 - In-line:no-cache-selector-lrc, r=Mark-Simulacrum
Remove ArenaCacheSelector for visible_parent_map query ( + LRC)
2022-01-12 21:04:40 +00:00
Tomasz Miąsko b085eb0b10 Error codes specific to LLVM-style inline asssembly are no longer emitted 2022-01-12 21:43:36 +01:00
Tomasz Miąsko d4fb6ec683 Remove LLVM-style inline assembly from rustfmt 2022-01-12 21:43:35 +01:00
Michael Goulet 8568f44fe1 suggest deref/unboxing before wrapping variant 2022-01-12 12:01:01 -08:00
Camille GILLOT 7b285925c8 Ensure res and module are consistent with each other.
The `record_used` parameter changes the result, so we must pass the same
value for initial and module resolution.
2022-01-12 20:04:06 +01:00
bors 60e68d68c6 Auto merge of #8226 - Jarcho:manual_memcpy_8160, r=flip1995
`manual_memcpy` fix

fixes #8160

Ideally this would work with `VecDeque`, but the current interface is unsuitable for it. At a minimum something like `range_as_slices` would be needed.

changelog: Don't lint `manual_memcpy` on `VecDeque`
changelog: Suggest `copy_from_slice` for `manual_memcpy` when applicable
2022-01-12 18:44:34 +00:00
bors 1bd4fdc943 Auto merge of #92811 - matthiaskrgr:rollup-wrctcef, r=matthiaskrgr
Rollup of 14 pull requests

Successful merges:

 - #92328 (Tweak sentence in `transmute` docs)
 - #92432 (Error when selected impl is not const in constck)
 - #92506 (Document Box<T> FFI guarantee in 1.41.0 release notes)
 - #92699 (rustdoc: Display "private fields" instead of "fields omitted")
 - #92703 (RELEASES.md: Add 1.58 release note for `File::options` stabilization)
 - #92707 (Extended the note on the use of `no_run` attribute)
 - #92709 (Improve documentation for File::options to give a more likely example)
 - #92720 (Fix doc formatting for time.rs)
 - #92732 (Add note about upstream commit musl-patch-configure.diff is derived from)
 - #92742 (Add missing suffix for sidebar-items script path)
 - #92748 (Eliminate "boxed" wording in `std::error::Error` documentation)
 - #92754 (Update AsmArgs field visibility for rustfmt)
 - #92756 (⬆️ rust-analyzer)
 - #92764 (Fix rust logo style)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-01-12 17:57:50 +00:00
Tomasz Miąsko d60edea2bd Remove LLVM-style inline assembly from clippy 2022-01-12 18:51:32 +01:00
Tomasz Miąsko 064eda47f1 Migrate intrinsic-unreachable test to asm! 2022-01-12 18:51:32 +01:00
Tomasz Miąsko 02e6c64a04 Migrate inline assembly incremental tests to asm! 2022-01-12 18:51:32 +01:00
Tomasz Miąsko cc20dd49de Migrate abi-sysv64 abi-sysv64-register-usage test to asm! 2022-01-12 18:51:32 +01:00
Tomasz Miąsko 0b315250b8 Use black_box intrinsic in out-of-stack test 2022-01-12 18:51:31 +01:00
Tomasz Miąsko c7d591dc28 Remove pretty tests for LLVM-style inline assembly 2022-01-12 18:51:31 +01:00
Tomasz Miąsko 11d014d05a Remove codegen tests for LLLVM-style inline assembly 2022-01-12 18:51:31 +01:00
Tomasz Miąsko 47b1c16fcd Remove mir-opt tests for LLVM-style inline assembly 2022-01-12 18:51:31 +01:00
Tomasz Miąsko 61c233bac3 Remove ui tests for LLVM-style inline assembly 2022-01-12 18:51:31 +01:00
Tomasz Miąsko a76577cb8a Remove LLVM-style inline assembly from unstable book 2022-01-12 18:51:31 +01:00
Tomasz Miąsko 279c9d3d9f Remove no longer used MutateMode enum 2022-01-12 18:51:31 +01:00
Tomasz Miąsko 000b36c505 Remove deprecated LLVM-style inline assembly 2022-01-12 18:51:31 +01:00
Jason Newcomb 062db10c12 Add manual_memcpy_test for VecDeque 2022-01-12 12:33:47 -05:00
bors 5479024250 Auto merge of #8266 - camsteffen:test-tweaks, r=flip1995
Some test code cleanup

changelog: none

Mainly moves /clippy_workspace_tests into /tests and combines the two dogfood tests which can't run concurrently.
2022-01-12 17:19:58 +00:00
bors 133b3668bb Auto merge of #8265 - camsteffen:which-rustfmt, r=xFrednet
Cache rustfmt path

changelog: none

Call `rustup which rustfmt` and use the output. This shaves off  ~0.7 seconds for `cargo dev fmt` for me.
2022-01-12 17:03:52 +00:00
Cameron Steffen 90bf72c2cd Only run dogfood on linux in CI 2022-01-12 11:00:26 -06:00
bors 6f33f690ea Auto merge of #8112 - Alexendoo:disallowed_methods_primitives, r=flip1995
Allow primitive types in disallowed_methods

Fixes #8079

changelog: `disallowed_methods`: Now can disallow methods of primitive types
2022-01-12 16:47:45 +00:00