about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-07-29Adjust some tests for invalid_reference_casting improvementsUrgau-0/+4
2023-07-29Fix test output.Mara Bos-2/+4
2023-07-29Change default panic handler message format.Mara Bos-47/+94
2023-07-29Auto merge of #114141 - Kobzol:llvm-bolt-flags, r=lqdbors-0/+2
Change LLVM BOLT flags I talked to the BOLT maintainers about the binary size effect of BOLT. Currently, BOLTing LLVM increases its binary size from ~120 MiB to ~170 MiB, which is not ideal. Now we can track both runtime performance and (rustc, LLVM, ...) artifact sizes in perf.RLO, so I'd like to try experimenting with changing the flags to reduce `libLLVM.so` size without regressing the performance gains of BOLT too much. r? `@ghost`
2023-07-29Auto merge of #113422 - Urgau:cast_ref_to_mut-pre-beta, r=Nilstriebbors-8/+8
Rename and allow `cast_ref_to_mut` lint This PR is a small subset of https://github.com/rust-lang/rust/pull/112431, that is the renaming of the lint (`cast_ref_to_mut` -> `invalid_reference_casting`). BUT also temporarily change the default level of the lint from deny-by-default to allow-by-default until https://github.com/rust-lang/rust/pull/112431 is merged. r? `@Nilstrieb`
2023-07-29Auto merge of #114197 - matthiaskrgr:rollup-iluf7u4, r=matthiaskrgrbors-0/+5
Rollup of 7 pull requests Successful merges: - #113773 (Don't attempt to compute layout of type referencing error) - #114107 (Prevent people from assigning me as a PR reviewer) - #114124 (tests/ui/proc-macro/*: Migrate FIXMEs to check-pass) - #114171 (Fix switch-stdout test for none unix/windows platforms) - #114172 (Fix issue_15149 test for the SGX target) - #114173 (btree/map.rs: remove "Basic usage" text) - #114174 (doc: replace wrong punctuation mark) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-29Rollup merge of #113773 - compiler-errors:err-layout-bail, r=cjgillotMatthias Krüger-0/+5
Don't attempt to compute layout of type referencing error Leads to more ICEs and strange diagnostics than are worth it. Fixes #113760
2023-07-29Auto merge of #111916 - fee1-dead-contrib:noop-method-call-warn, ↵bors-13/+15
r=compiler-errors make `noop_method_call` warn by default r? `@compiler-errors`
2023-07-29Update lexer emoji diagnostics to Unicode 15.0Charles Lew-5/+1
2023-07-28Add UI tests for generic const itemsLeón Orell Valerian Liehr-1/+1
2023-07-28Render generic const items in rustdocLeón Orell Valerian Liehr-69/+116
2023-07-28Make Clippy understand generic const itemsLeón Orell Valerian Liehr-7/+15
2023-07-28Lower generic const items to HIRLeón Orell Valerian Liehr-1/+2
2023-07-28Auto merge of #113931 - cuviper:ci-ubuntu-22.04, r=Mark-Simulacrumbors-264/+493
ci: update ubuntu:20.04 builders to 22.04 This is mostly just maintenance to avoid bitrotting, but 22.04 also updates to cmake 3.22, so they don't need the manual builds from #113714 anymore.
2023-07-28exract a perform_access, check read-read commutation exhaustivelyNeven Villani-100/+193
2023-07-28Auto merge of #111780 - weiznich:diagnostic_namespace, r=petrochenkovbors-1/+1
Diagnostic namespace This PR implements the basic infrastructure for accepting the `#[diagnostic]` attribute tool namespace as specified in https://github.com/rust-lang/rfcs/pull/3368. Note: This RFC is not merged yet, but it seems like it will be accepted soon. I open this PR early on to get feedback on the actual implementation as soon as possible. This hopefully enables getting at least the diagnostic namespace to stable rust "soon", so that crates do not need to bump their MSRV if we stabilize actual attributes in this namespace. This PR only adds infrastructure accept attributes from this namespace, it does not add any specific attribute. Therefore the compiler will emit a lint warning for each attribute that's actually used. This namespace is added behind a feature flag, so it will be only available on a nightly compiler for now. cc `@estebank` as they've supported me in planing, specifying and implementing this feature.
2023-07-28Change LLVM BOLT flagsJakub Beránek-0/+2
2023-07-28Introduce the `#[diagnostic]` attribute namespaceGeorg Semmler-1/+1
Co-authored-by: est31 <est31@users.noreply.github.com> Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com> Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
2023-07-28Auto merge of #114134 - fee1-dead-contrib:rm-constness-from-param-env, r=oli-obkbors-35/+37
Remove `constness` from `ParamEnv` This should be replaced by keyword generics/effects. cc #110395 r? `@oli-obk`
2023-07-28Auto merge of #114154 - calebcartwright:style-match-mac, r=joshtriplettbors-1/+6
style-guide: don't flatten match arms with macro call This pulls forward the gist of the text that was added to the style guide in https://github.com/rust-lang/style-team/pull/159 to account for needing to tweak/soften rustfmt's behavior based on the style guide prescriptions. There were a few options I considered, noted below, and although I don't particularly love any of them, I felt this was the lesser of the evils. r? `@joshtriplett`
2023-07-28Auto merge of #97571 - ehuss:symbol-mangling, r=michaelwoeristerbors-2/+1283
Add documentation on v0 symbol mangling. This adds official documentation for the v0 symbol mangling format, migrating the documentation from [RFC 2603](https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html). The format was originally stabilized as the `-C symbol-mangling-version` option, but the specifics were not stabilized (per https://github.com/rust-lang/rust/pull/90128#issuecomment-948569123). Per the discussion at https://github.com/rust-lang/rust/pull/93661#discussion_r799783363 this adds those specifics as an official description of the format. cc #89917
2023-07-27docs(style-guide): don't flatten match arms with macro callCaleb Cartwright-1/+6
2023-07-28Auto merge of #114115 - nnethercote:less-token-tree-cloning, r=petrochenkovbors-19/+19
Less `TokenTree` cloning `TokenTreeCursor` has this comment on it: ``` // FIXME: Many uses of this can be replaced with by-reference iterator to avoid clones. ``` This PR completes that FIXME. It doesn't have much perf effect, but at least we now know that. r? `@petrochenkov`
2023-07-27Auto merge of #114144 - workingjubilee:rollup-jkmtgdo, r=workingjubileebors-4333/+17
Rollup of 4 pull requests Successful merges: - #97571 (Add documentation on v0 symbol mangling.) - #114122 (tests/ui/hello_world/main.rs: Remove FIXME (#62277)) - #114133 (Revert "add tidy check that forbids issue ui test filenames") - #114139 (Make `--print` with path unstable) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-27Update the minimum external LLVM to 15Josh Stone-98/+11
2023-07-27Rollup merge of #114139 - Urgau:make-print-with-path-unstable, r=jackh726Jubilee-4/+11
Make `--print` with path unstable https://github.com/rust-lang/rust/pull/113780 should have gone through an MCP+FCP but wasn't, but instead of reverting the original PR, this PR just make that new option unstable. [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202023-07-27/near/379199738) cc `@dtolnay`
2023-07-27Rollup merge of #114133 - workingjubilee:revert-add-tidy-check-issue-12345, ↵Jubilee-4329/+6
r=jackh726 Revert "add tidy check that forbids issue ui test filenames" This reverts commit 13e2abf6b388762af2e97ce065d6206961264a8f. Reverting because an MCP was requested and it turned out there was a lack of a consensus on what to do in this area.
2023-07-27Auto merge of #113779 - Kobzol:try-build-no-lto, r=Mark-Simulacrumbors-1/+31
Build the first LLVM without LTO in try builds Currently, we perform three LLVM builds in the Linux x64 dist builder, which is used for `try` builds: 1) "Normal" LLVM - takes ~5s to compile thanks to `sccache`, but ~8 minutes to link because of ThinLTO 2) PGO instrumented LLVM - same timings as 1) 3) PGO optimized LLVM - takes about 20 minutes to build When I tried to disable LTO for build 1), it suddenly takes only about a minute to build, because the linking step is much faster. The first LLVM doesn't really need LTO all that much. Without it, it will be a bit slower to build `rustc` in two subsequent steps, but it seems that the ~7 minutes saved on linking it do win that back. Btw, we can't use the host LLVM for build 1), because this LLVM then builds `rustc` in PGO instrumented mode, and we need the same compiler when later PGO optimizing `rustc`. And we want to use our in-house LLVM for that I think.
2023-07-27Fix aksama templateMichael Goulet-0/+5
2023-07-27bless clippyDeadbeef-33/+36
2023-07-27Auto merge of #113298 - tgross35:update-bless-envs, r=oli-obkbors-30/+21
Unite bless environment variables under `RUST_BLESS` Currently, Clippy and Miri both use an environment variable to indicate that output should be blessed, but they use different variable names. In order to improve consistency, this patch applies the following changes: - Rename the variable `MIRI_BLESS` (as used in the Miri subtree) to `RUST_BLESS` - Rename the variable `BLESS` (as used in the Clippy subtree) to `RUST_BLESS` - Move emitting `RUST_BLESS` into `prepare_cargo_test` so it is always available (I need this for a WIP PR) --- I prefer something like `RUST_BLESS` to `BLESS` just for a lower chance of conflict (not super common but other tools [do use `BLESS`](https://grep.app/search?q=%22BLESS%22&case=true&words=true&filter[lang][0]=Text&filter[lang][1]=Rust&filter[lang][2]=Python&filter[lang][3]=C%2B%2B&filter[lang][4]=Markdown&filter[lang][5]=C&filter[lang][6]=JSON)), but I can change it to whatever is preferred. Original discussion: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/BLESS.20env.20var.3A.20rename.20to.20CLIPPY_BLESS r? `@oli-obk` cc `@flip1995`
2023-07-27Make `--print KIND=PATH` unstableUrgau-4/+11
https://github.com/rust-lang/rust/pull/113780 should have gone through an MCP+FCP but wasn't, but instead of reverting the original PR, this PR just make that new option unstable.
2023-07-27Auto merge of #113374 - GuillaumeGomez:private-to-public-path, ↵bors-3/+132
r=notriddle,fmease [rustdoc] If re-export is private, get the next item until a public one is found or expose the private item directly Fixes #81141. If we have: ```rust use Private as Something; pub fn foo() -> Something {} ``` Then `Something` will be replaced by `Private`. r? `@notriddle`
2023-07-27Remove `constness` from `ParamEnv`Deadbeef-4/+3
2023-07-27Revert "add tidy check that forbids issue ui test filenames"Jubilee Young-4329/+6
This reverts commit 13e2abf6b388762af2e97ce065d6206961264a8f. Reverting because an MCP was requested and it turned out there was a lack of a consensus on what to do in this area.
2023-07-27Auto merge of #114130 - GuillaumeGomez:rollup-69ihuaj, r=GuillaumeGomezbors-48/+88
Rollup of 7 pull requests Successful merges: - #114032 (typos) - #114059 (rustdoc: fix cross-crate `impl Sized` & `impl ?Sized`) - #114088 (Bump syn dependency) - #114091 (docs: fmt::Debug*: Fix comments for finish method.) - #114109 (Docs: Fix URL for `rmatches`) - #114117 (Restore region uniquification in the new solver 🎉 ) - #114123 (Turns out opaque types can have hidden types registered during mir validation) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-27Rollup merge of #114059 - fmease:rustdoc-fix-x-crate-impl-sized, ↵Guillaume Gomez-46/+86
r=GuillaumeGomez rustdoc: fix cross-crate `impl Sized` & `impl ?Sized` Previously, cross-crate impl-Trait (APIT, RPIT, etc.) that only consists of a single `Sized` bound (modulo outlives-bounds) and ones that are `?Sized` were incorrectly rendered. To give you a taste (before vs. after): ```diff - fn sized(x: impl ) -> impl + fn sized(x: impl Sized) -> impl Sized - fn sized_outlives<'a>(x: impl 'a) -> impl 'a + fn sized_outlives<'a>(x: impl Sized + 'a) -> impl Sized + 'a - fn maybe_sized(x: &impl ) -> &impl + fn maybe_sized(x: &impl ?Sized) -> &impl ?Sized - fn debug_maybe_sized(x: &impl Debug) -> &impl ?Sized + Debug + fn debug_maybe_sized(x: &(impl Debug + ?Sized)) -> &(impl Debug + ?Sized) ``` Moreover, we now surround impl-Trait that has multiple bounds with parentheses if they're the pointee of a reference or raw pointer type. This affects both local and cross-crate docs. The current output isn't correct (rustc would emit the error *ambiguous `+` in a type* if we fed the rendered code back to it). --- Best reviewed commit by commit :) `@rustbot` label A-cross-crate-reexports
2023-07-27Rollup merge of #114032 - tshepang:patch-1, r=GuillaumeGomezGuillaume Gomez-2/+2
typos
2023-07-27Auto merge of #114105 - dicej:llvm-update, r=cuviperbors-0/+0
Update LLVM submodule This adds https://github.com/rust-lang/llvm-project/pull/148.
2023-07-27Remove transmute calls and caching for use pathsGuillaume Gomez-34/+25
2023-07-27fmtRalf Jung-20/+11
2023-07-27Merge from rustcRalf Jung-182/+199
2023-07-27Preparing for merge from rustcRalf Jung-1/+1
2023-07-27Rollup merge of #114102 - compiler-errors:fulldeps-stage1-hack, r=pnkfelixMatthias Krüger-1/+8
Dont pass `-Zwrite-long-types-to-disk=no` for `ui-fulldeps --stage=1` Due to this hack: https://github.com/rust-lang/rust/blob/601a34de8c10458b72a7781eb0b44a7981e4a2b1/src/bootstrap/test.rs#L1473-L1484 We use the stage 0 compiler to build the stage 1 fulldeps tests. That means that we don't have `-Zwrite-long-types-to-disk=no` which was added in #113893. Add a temporary hack to fix this (https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Some.20tests.20failing.20with.20--stage.201) until the next beta bump.
2023-07-27Rollup merge of #114053 - Kobzol:ci-linux-fix-cmake, r=nikicMatthias Krüger-4/+2
CI: fix CMake installation for 32/64 bit `dist` Linux Should hopefully fix LLVM 17 build (https://github.com/rust-lang/rust/pull/114048#issuecomment-1649586577).
2023-07-27Avoid `into_trees` usage in rustfmt.Nicholas Nethercote-14/+14
Token tree cloning is only needed in one place.
2023-07-27Avoid some token cloning in `filter_tokens_from_list`.Nicholas Nethercote-5/+5
Now the cloning only happens on some paths, instead of all paths.
2023-07-26ci: use `armv7-a+fp` for `armv7-unknown-linux_musleabihf`Josh Stone-3/+3
This is consistent with what we had from `arm-linux-gnueabihf-gcc` in the `ubuntu:20.04` base.
2023-07-26Auto merge of #113843 - wesleywiser:replace_rustc_apfloat, r=pnkfelixbors-14/+2
Replace in-tree `rustc_apfloat` with the new version of the crate Replace the in-tree version of `rustc_apfloat` with the new version of the crate which has been correctly licensed. The new crate incorporates upstream changes from LLVM since the original port was done including many correctness fixes and has been extensively fuzz tested to validate correctness. Fixes #100233 Fixes #102403 Fixes #113407 Fixes #113409 Fixes #55993 Fixes #93224 Closes #93225 Closes #109573
2023-07-26Update LLVM submoduleJoel Dice-0/+0
This adds https://github.com/rust-lang/llvm-project/pull/148.