about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2022-02-18At opt-level=0, apply only ABI-affecting attributes to functionsErik Desjardins-0/+63
This should provide a small perf improvement for debug builds, and should more than cancel out the regression from adding noundef, which was only significant in debug builds.
2022-02-17Rollup merge of #94085 - flip1995:clippy_needless_borrow_temp_fix, r=ManishearthMatthias Krüger-26/+8
Clippy: Don't lint `needless_borrow` in method receiver positions r? `@Manishearth` cc `@camsteffen` `@Jarcho` cc rust-lang/rust-clippy#8441 Let's get this fix in before the beta branching tomorrow.
2022-02-17Rollup merge of #94082 - bjorn3:remove_cfg_platform, r=Mark-SimulacrumMatthias Krüger-6/+0
Remove CFG_PLATFORM It seems to be unused and it is incorrect for arm/aarch64 anyway.
2022-02-17Rollup merge of #94043 - DrMeepster:box_alloc_ice, r=oli-obkMatthias Krüger-0/+6
Fix ICE when using Box<T, A> with pointer sized A Fixes #78459 Note that using `Box<T, A>` with a more than pointer sized `A` or using a pointer sized `A` with a Box of a DST will produce a different ICE (#92054) which is not fixed by this PR.
2022-02-17Rollup merge of #94011 - est31:let_else, r=lcnrMatthias Krüger-21/+7
Even more let_else adoptions Continuation of #89933, #91018, #91481, #93046, #93590.
2022-02-17Rollup merge of #93780 - GuillaumeGomez:links-in-sidebar, r=jshaMatthias Krüger-186/+168
Generate list instead of div items in sidebar Fixes #92986. Surprisingly, we didn't have much CSS for this... [Demo](https://rustdoc.crud.net/imperio/links-in-sidebar/std/index.html). r? `@jsha`
2022-02-17Rollup merge of #93337 - Amanieu:asm_tracking, r=tmiaskoMatthias Krüger-12/+12
Update tracking issue numbers for inline assembly sub-features The main tracking issue for inline assembly is [closed](https://github.com/rust-lang/rust/issues/72016#issuecomment-1022332954), further tracking of the remaining sub-features has been moved to separate tracking issues.
2022-02-17Don't lint `needless_borrow` in method receiver positionsJason Newcomb-26/+8
2022-02-17Remove CFG_PLATFORMbjorn3-6/+0
It seems to be unused and it is incorrect for arm/aarch64 anyway.
2022-02-17Auto merge of #93577 - nikic:llvm-14, r=nagisabors-4/+6
Upgrade to LLVM 14 LLVM patch state: * [x] https://github.com/llvm/llvm-project/commit/a55727f334b39600bfc71144b11b42aae6b94e0b Backported. * [x] https://github.com/rust-lang/llvm-project/commit/c3c82dc12402dd41441180c0c6cf7aed7e330c53 Backported as https://github.com/llvm/llvm-project/commit/917c47b3bf0dfc45a2a5ba12c1397d647ecf4017. * [x] https://github.com/rust-lang/llvm-project/commit/6e8f9ab632d12271355d10d34c9835a7ba14e4b9 No plan to upstream. * [x] https://github.com/llvm/llvm-project/commit/319f4b2d52e31b000db75a0a2484b5f2ab90534a Backported. * [x] https://github.com/rust-lang/llvm-project/commit/8b2c25d321f877161f85218479e2d1317d770e18 No plan to upstream. * [x] https://github.com/rust-lang/llvm-project/commit/75fef2efd427362c8f16b2d09e6ebf44069e3919 No plan to upstream. * [ ] https://github.com/rust-lang/llvm-project/commit/adef757547de5a570d9f6a00d3e6ac16c666ab79 Upstreamed as https://github.com/llvm/llvm-project/commit/2d2ef384b2f6e723edb793d08f52e7f4dc94ba3a. Needs backport. * [x] https://github.com/rust-lang/llvm-project/commit/4b7c1b4910e9fa9e04f23f06be078e168ef4c0ee No plan to upstream. * [x] https://github.com/rust-lang/llvm-project/commit/3f5ab0c061adb723f25b94243828b6b5407720c8 No plan to upstream. * [x] https://github.com/rust-lang/llvm-project/commit/514d05500e0e15e358f05f5c4cec78a805858f8e No plan to upstream. * [ ] https://github.com/rust-lang/llvm-project/commit/54c586958564582b3341d1838a5de86541e5fecf Under review at https://reviews.llvm.org/D119695 and https://reviews.llvm.org/D119856. Release timeline: * LLVM 14.0.0 final planned for Mar 15. * Rust 1.60.0 planned for Apr 7. Compile-time: * https://perf.rust-lang.org/compare.html?start=250384edc5d78533e993f38c60d64e42b21684b2&end=b87df8d2c7c5d9ac448c585de10927ab2ee1b864 * A slight improvement on average, though no big changes either way. * There are some larger max-rss improvements. r? `@ghost`
2022-02-17Rollup merge of #94064 - nikic:update-musl-image, r=Mark-SimulacrumMatthias Krüger-2/+2
Update dist-x86_64-musl to Ubuntu 20.04 This updates the dist-x86_64-musl image to use Ubuntu 20.04. The current Ubuntu 16.04 based image only works due to the Docker cache, it's not possible anymore to run it locally because of the usual certificate expiration issue. I believe updating the OS here is relatively safe because this targets musl, so there are no concerns about raising the glibc baseline. There is some risk here in that it updates the compiler toolchain used to produce artifacts, though I'm not aware of any specific issues that could cause. r? ``@Mark-Simulacrum``
2022-02-17Rollup merge of #94031 - ↵Matthias Krüger-27/+37
danielhenrymantilla:diagnostics/union-drop-suggest-copy-bound-alternative, r=davidtwco [diagnostics] Add mentions to `Copy` types being valid for `union` fields This came up from some user on Discord which was using a `T : PrimitiveInt` generic type, and they wanted to use in a `union`. Rather than adding a `Copy` bound, they started pondering about the `ManuallyDrop<T>` road, and how to correctly use `unsafe` to perform the drops. <img width="648" alt="Screen Shot 2022-02-15 at 22 28 34" src="https://user-images.githubusercontent.com/9920355/154152496-8f9be74b-ad59-4724-8f9e-48b446774e06.png"> - [Discord link](https://discord.com/channels/442252698964721669/443150878111694848/943092778534072320) So, it seemed like the error message for types with potential drop glue on `union` fields could be improved to also mention the `Copy` alternative, since in many cases where `union`s are concerned, people are dealing with PODs / `Copy` types anyways 🙂 ___ ``@rustbot`` modify labels: +A-diagnostics +D-terse
2022-02-17Rollup merge of #94030 - ChayimFriedman2:issue-94010, r=petrochenkovMatthias Krüger-43/+70
Correctly mark the span of captured arguments in `format_args!()` It should not include the braces, or misspelling suggestions will be wrong. Fixes #94010.
2022-02-17Rollup merge of #93996 - notriddle:notriddle/magically-becomes-a-function, ↵Matthias Krüger-0/+94
r=petrochenkov Do not suggest "is a function" for free variables Part of #82323
2022-02-17Rollup merge of #93981 - ChayimFriedman2:slice-pat-reference-option-result, ↵Matthias Krüger-1/+30
r=davidtwco Fix suggestion to slice if scurtinee is a reference to `Result` or `Option` Fixes https://github.com/rust-lang/rust/pull/91343#issuecomment-1037718339 and https://github.com/rust-lang/rust/pull/91343#discussion_r761466979.
2022-02-17Rollup merge of #93693 - rukai:91550, r=davidtwcoMatthias Krüger-12/+125
Suggest deriving required supertraits closes https://github.com/rust-lang/rust/issues/91550 I chose to just hardcode handling for PartialOrd and PartialEq because that should be robust enough and I dont know how to go about doing it generically r? rust-lang/diagnostics
2022-02-17Rollup merge of #93479 - smoelius:master, r=yaahcMatthias Krüger-6/+3
Use `optflag` for `--report-time` Essentially, what is described here: https://github.com/rust-lang/rust/issues/64888#issuecomment-1008047228 There is one difference. The comment proposes to add a `--report-time-color` option. This change instead uses libtest's existing `--color` option for that purpose.
2022-02-17Auto merge of #94040 - Mark-Simulacrum:destabilize-load-store, r=Amanieubors-0/+71
Destabilize cfg(target_has_atomic_load_store = ...) This was not intended to be stabilized yet. This keeps the cfg_target_has_atomic feature gate name since compiler-builtins otherwise depends on it and I'd rather not try to manage a bump across a crates.io published repository given the time-sensitivity here (we need to land this quickly to avoid a beta backport). Closes https://github.com/rust-lang/rust/issues/32976 r? `@Amanieu`
2022-02-16Adopt let_else in even more placesest31-21/+7
2022-02-16Update dist-x86_64-musl to Ubuntu 20.04Nikita Popov-2/+2
2022-02-16Add cmake directory to llvm source distributionNikita Popov-0/+2
This directory is required for building LLVM now.
2022-02-16Update coverage IR testNikita Popov-2/+2
2022-02-16Update optimization remark test for LLVM 14Nikita Popov-2/+2
The format of the remark changed slightly.
2022-02-16Update LLVM submoduleNikita Popov-0/+0
2022-02-16Update rustdoc tests to adapt to changes to the sidebarGuillaume Gomez-59/+59
2022-02-16Unify sidebar a bit more by generating a list using <ul> instead of <div> ↵Guillaume Gomez-127/+109
elements
2022-02-16Rollup merge of #94054 - lnicola:rust-analyzer-2022-02-16, r=lnicolaMatthias Krüger-22/+16
:arrow_up: rust-analyzer r? ``@ghost``
2022-02-16Rollup merge of #94045 - ehuss:update-books, r=ehussMatthias Krüger-0/+0
Update books ## nomicon 3 commits in 9493715a6280a1f74be759c7e1ef9999b5d13e6f..90993eeac93dbf9388992de92965f99cf6f29a03 2022-01-27 19:00:32 -0800 to 2022-02-13 12:44:12 +0900 - Fix a small typo in exception-safety.md (rust-lang/nomicon#341) - Make `Vec::new` public in vec-alloc.md (rust-lang/nomicon#336) - Fix a syntax error in leaking.md (rust-lang/nomicon#335) ## reference 6 commits in 411c2f0d5cebf48453ae2d136ad0c5e611d39aec..70fc73a6b908e08e66aa0306856c5211312f6c05 2022-01-30 12:46:37 -0800 to 2022-02-14 19:33:01 -0800 - Document pre-Rust-2021 special case for IntoIterator method lookup (rust-lang/reference#1154) - Mention std::is_aarch64_feature_detected (rust-lang/reference#1061) - Fix link to the Bastion of the Turbofish (rust-lang/reference#1161) - Improve associated constant item CTFE timing section (rust-lang/reference#1147) - document `#![feature(const_generics_defaults)]` (rust-lang/reference#1098) - Update patterns allowed in @ patterns (rust-lang/reference#1158) ## book 6 commits in 98904efaa4fc968db8ff59cf2744d9f7ed158166..67b768c0b660a069a45f0e5d8ae2f679df1022ab 2022-01-29 21:22:31 -0500 to 2022-02-09 21:52:41 -0500 - Snapshot of ch18 for nostarch - Remove mention of destructuring references as that's not covered currently - Add note that exhaustiveness checking doesn't extend to match guards - Change match guard example to actually be unexpressable with patterns alone - Corrected listing number from 9-10 to 9-13 - Remove duplicate paragraph after No Starch related changes ## rustc-dev-guide 3 commits in 8763adb62c712df69b1d39ea3e692b6d696cc4d9..62f58394ba7b203f55ac35ddcc4c0b79578f5706 2022-01-26 14:01:40 -0800 to 2022-02-11 08:42:50 -0500 - Correction, building stage3 compiler (rust-lang/rustc-dev-guide#1298) - Triage some date references (rust-lang/rustc-dev-guide#1293) - mention test folders for cfg(bootstrap) (rust-lang/rustc-dev-guide#1294)
2022-02-16Rollup merge of #94037 - tmiasko:verbose, r=Mark-SimulacrumMatthias Krüger-8/+23
Fix inconsistent symbol mangling with -Zverbose Always skip arguments that are the defaults of their respective parameters, to avoid generating inconsistent symbols for builds with `-Zverbose` flag and without it.
2022-02-16Rollup merge of #94027 - GuillaumeGomez:update-browser-ui-test, r=notriddleMatthias Krüger-2/+2
Update browser UI test version Might help a bit with https://github.com/rust-lang/rust/issues/93784 (still need to figure out what's going on with the driver). r? ```@notriddle```
2022-02-16Rollup merge of #94020 - tmiasko:pp, r=oli-obkMatthias Krüger-0/+72
Support pretty printing of invalid constants Make it possible to pretty print invalid constants by introducing a fallible variant of `destructure_const` and falling back to debug formatting when it fails. Closes #93688.
2022-02-16Rollup merge of #94015 - GuillaumeGomez:check-option, r=notriddleMatthias Krüger-1/+14
rustdoc --check option documentation Part of #92763. r? ```@notriddle```
2022-02-16Rollup merge of #93382 - GuillaumeGomez:search-input-padding, r=jshaMatthias Krüger-1/+1
Add a bit more padding in search box As asked in https://github.com/rust-lang/rust/pull/93113#issuecomment-1021565703, here is a bit more padding. You can check it [here](https://rustdoc.crud.net/imperio/search-input-padding/foo/index.html). r? `@camelid`
2022-02-16Do not suggest "is a function" for free variablesMichael Howell-0/+94
Part of #82323
2022-02-16Destabilize cfg(target_has_atomic_load_store = ...)Mark Rousskov-0/+71
This was not intended to be stabilized yet.
2022-02-16:arrow_up: rust-analyzerLaurențiu Nicola-22/+16
2022-02-16Auto merge of #94044 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo 5 commits in c082648646cbb2be266df9ecbcdc253058158d68..ea2a21c994ca1e4d4c49412827b3cf4dcb158b1d 2022-02-08 14:55:05 +0000 to 2022-02-15 04:24:07 +0000 - cargo-new should not add ignore rule on Cargo.lock inside subdirs (rust-lang/cargo#10379) - Add a badge for github actions (rust-lang/cargo#10385) - Remove outdated badges (rust-lang/cargo#10380) - Remove `strip = "off"` (and undocumented `strip = "n"`/`strip = "no"`) (rust-lang/cargo#10376) - Fix unmatched backticks (rust-lang/cargo#10375)
2022-02-16Add mentions to `Copy` for `union` fieldsDaniel Henry-Mantilla-27/+37
2022-02-16Correctly mark the span of captured arguments in `format_args!()`Chayim Refael Friedman-43/+70
It should only include the identifier, or misspelling suggestions will be wrong.
2022-02-15Update cargoEric Huss-0/+0
2022-02-15Update booksEric Huss-0/+0
2022-02-15fix assumption that ScalarPair Box is always a fat pointerDrMeepster-0/+6
2022-02-16Make implementation genericLucas Kent-16/+16
2022-02-16Suggest deriving required supertraitsLucas Kent-0/+113
2022-02-16Auto merge of #93800 - b-naber:static-initializers-mir-val, r=oli-obkbors-43/+6
Treat static refs as `mir::ConstantKind::Val` With the upcoming introduction of Valtrees we want to treat more values as `mir::ConstantKind::Val` directly. r? `@lcnr` cc `@oli-obk`
2022-02-16Fix inconsistent symbol mangling with -ZverboseTomasz Miąsko-8/+23
Always skip arguments that are the defaults of their respective parameters, to avoid generating inconsistent symbols for builds with `-Zverbose` flag and without it.
2022-02-16Support pretty printing of invalid constantsTomasz Miąsko-0/+72
Make it possible to pretty print invalid constants by introducing a fallible variant of `destructure_const` and falling back to debug formatting when it fails.
2022-02-15try to bless 32bit mir tests manuallyb-naber-11/+2
2022-02-15Auto merge of #93439 - abrown:cf-protection, r=nagisabors-0/+78
Add support for control-flow protection This change adds a flag for configuring control-flow protection in the LLVM backend. In Clang, this flag is exposed as `-fcf-protection` with options `none|branch|return|full`. This convention is followed for `rustc`, though as a codegen option: `rustc -Z cf-protection=<none|branch|return|full>`. Tracking issue for future work is #93754.
2022-02-15Add documentation for rustdoc --check optionGuillaume Gomez-0/+11