about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-10-13Add some optimizationsdaxpedda-5/+3
2023-10-13Implement `OnceCell/Lock::try_insert()`daxpedda-8/+75
2023-10-08Auto merge of #116515 - petrochenkov:nolegflavor, r=lqdbors-23/+12
linker: Remove unstable legacy CLI linker flavors
2023-10-08Auto merge of #116454 - tmiasko:small-dominators, r=cjgillotbors-115/+134
Generalize small dominators optimization * Use small dominators optimization from 640ede7b0a1840415cb6ec881c2210302bfeba18 more generally. * Merge `DefLocation` and `LocationExtended` since they serve the same purpose.
2023-10-08Auto merge of #116183 - cjgillot:debug-dse-always, r=oli-obkbors-808/+774
Always preserve DebugInfo in DeadStoreElimination. This is a version of #106852 that does not check the current crate's debuginfo flag, and always attempts to preserve debuginfo. I haven't figured out how to handle mixing debuginfo levels for std, the one for the test, and the one for the CI target just right to merge #106852, so this can at least fix the debuginfo issue. Fixes https://github.com/rust-lang/rust/issues/103655
2023-10-08Auto merge of #116514 - petrochenkov:nogccld, r=lqdbors-68/+27
linker: Remove `-Zgcc-ld` option It is subsumed by `-Clinker-flavor=*-lld-cc -Clink-self-contained=+linker` options now. r? `@lqd`
2023-10-08Auto merge of #116509 - Enselic:rustc-test-op, r=Mark-Simulacrumbors-69/+33
tests/run-make: Move RUSTC_TEST_OP to tools.mk and use in more places
2023-10-08linker: Remove `-Zgcc-ld` optionVadim Petrochenkov-68/+27
It is subsumed by `-Clinker-flavor=*-lld-cc -Clink-self-contained=+linker` options now
2023-10-08Auto merge of #116487 - tamird:avoid-unwrap-absolute, r=bjorn3bors-28/+30
compiler: env/path handling fixes Please see individual commits. r? `@bjorn3` cf. #116426
2023-10-08Auto merge of #116486 - van-ema:master, r=nikicbors-14/+14
Fix to register analysis passes with -Zllvm-plugins at link-time This PR fixes an unexpected behavior of the `-Zllvm-plugins` flag. It allows to run an out-of-tree pass as part of LTO. However, analysis passes are registered before the plugin is loaded. As a result an analysis pass, which is passed as a plugin, is not registered. This causes the LLVM PassManager to fail when the analysis pass is queried from a transformation pass [(here)](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/IR/PassManager.h#L776). This fix mimics the bahavior in [LLVM LTOBackend.cpp](https://github.com/llvm/llvm-project/blob/main/llvm/lib/LTO/LTOBackend.cpp#L273) by loading the plugin before the analysis passes are registered. Tested with rustc 1.60 and 1.65 and LLVM-13.0.1.
2023-10-08Auto merge of #116450 - Kobzol:automation-try-bors-ci, r=Mark-Simulacrumbors-4/+3
Enable new bors try branch to run on CI Needed to fix [this error](https://github.com/rust-lang/rust/actions/runs/6420044833/job/17431256956). Inspired by https://github.com/rust-lang/rust/pull/99988 Also, removes `try-merge` from the workflow. It shouldn't have been added in https://github.com/rust-lang/rust/pull/116353. r? `@Mark-Simulacrum`
2023-10-08Auto merge of #114623 - Kobzol:opt-dist-gha-summaries, r=Mark-Simulacrumbors-28/+160
Print some information from try builds to GitHub summary This PR adds some logs from `opt-dist` (the duration of the individual steps of the build pipeline, and the size of the resulting artifacts) to GitHub [job summaries](https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/), in order to quickly show useful information right in the GHA CI job page, without needing to read the full log. [This](https://github.com/rust-lang-ci/rust/actions/runs/5810621086) is how the summary currently looks like. r? `@ghost`
2023-10-07Auto merge of #116416 - Kobzol:ci-host-llvm-17-0-2, r=Mark-Simulacrumbors-1/+1
Bump host compiler on x64 dist Linux to LLVM 17.0.2 17.0.0-rc3 had a bunch of miscompilations, and it's probably better in general not to use a RC version of LLVM long term on CI.
2023-10-07Auto merge of #116437 - nnethercote:rustc_features, r=Nilstriebbors-166/+149
Clean up `rustc_features` Plenty more to be done, but this is a decent start. r? `@Nilstrieb`
2023-10-07linker: Remove unstable legacy CLI linker flavorsVadim Petrochenkov-23/+12
2023-10-07Auto merge of #100806 - timvermeulen:split_inclusive_double_ended_bound, ↵bors-1/+1
r=dtolnay Fix generic bound of `str::SplitInclusive`'s `DoubleEndedIterator` impl `str::SplitInclusive`'s `DoubleEndedIterator` implementation currently uses a `ReverseSearcher` bound for the corresponding searcher. A `DoubleEndedSearcher` bound should have been used instead. `DoubleEndedIterator` requires that repeated `next_back` calls produce the same items as repeated `next` calls, in opposite order. `ReverseSearcher` lets you search starting from the back of a string, but it makes no guarantees about how its matches correspond to the matches found by a forward search. `DoubleEndedSearcher` is a subtrait of `ReverseSearcher` and does require that the same matches are found in both directions. This bug fix is a breaking change. Calling `next_back` on `"a+++b".split_inclusive("++")` is currently accepted with repeated calls producing `"b"` and `"a+++"`, while forward iteration yields `"a++"` and `"+b"`. Also see https://github.com/rust-lang/rust/issues/100756#issuecomment-1221307166 for more details. I believe that this is the only iterator that uses this bound incorrectly — other related iterators such as `str::Split` do have a `DoubleEndedSearcher` bound for their `DoubleEndedIterator` implementation. And `slice::SplitInclusive` doesn't face this problem at all because it doesn't use patterns, only a predicate. cc `@SkiFire13`
2023-10-07Auto merge of #116330 - RalfJung:dont-key-on-allocid, r=oli-obkbors-33/+0
remove Key impls for types that involve an AllocId I don't understand how but somehow that leads to issues like https://github.com/rust-lang/rust/issues/83085? Anyway removing unused impls doesn't seem like a bad idea. The concerning part is that of course nothing will stop us from having such impls again in the future, alongside re-introducing bugs like #83085. r? `@oli-obk`
2023-10-07Auto merge of #116310 - Enselic:check_fn_args_move_size, r=oli-obkbors-58/+83
rustc_monomorphize: Introduce check_fn_args_move_size() This is in preparation of improving diagnostics of "large moves into functions", a.k.a. passing args. Note: This PR consists of two self-contained commits that can be reviewed independently. For https://github.com/rust-lang/rust/issues/83518 Also see https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/arg.20Spans.20for.20TerminatorKind.3A.3ACall.3F r? `@oli-obk` who is E-mentor
2023-10-07Auto merge of #115583 - RalfJung:packed-unsized, r=lcnrbors-12/+73
fix detecting references to packed unsized fields Fixes https://github.com/rust-lang/rust/issues/115396 This is a breaking change, but permitted as a soundness fix.
2023-10-07Auto merge of #116457 - RalfJung:try_eval_scalar_int, r=cjgillotbors-15/+15
fix fast-path for try_eval_scalar_int Cc https://github.com/rust-lang/rust/pull/116281 `@Nadrieril`
2023-10-07rustc_monomorphize: Introduce check_fn_args_move_size()Martin Nordholts-56/+76
So that we later can improve the accuracy of diagnostics.
2023-10-07rustc_monomorphize: Move limit check into check_move_size()Martin Nordholts-5/+10
And rename to check_operand_move_size(). Later we will introduce check_fn_args_move_size().
2023-10-07Auto merge of #116508 - RalfJung:miri, r=RalfJungbors-1813/+2384
Miri subtree update r? `@ghost`
2023-10-07tests/run-make: Use RUSTC_TEST_OP in more placesMartin Nordholts-56/+11
2023-10-07tests/run-make: Move RUSTC_TEST_OP to tools.mkMartin Nordholts-12/+22
To reduce duplication. A follow-up commit will begin using it in even more places.
2023-10-07tests/run-make: Remove wrong blessing adviceMartin Nordholts-1/+0
run-make tests are not special but can be blessed like other tests, like this: ./x.py test --bless tests/run-make/unknown-mod-stdin
2023-10-07allow option-ext as a tool dependency (MPL licensed)Ralf Jung-0/+1
2023-10-07update lockfileRalf Jung-10/+42
2023-10-07Auto merge of #109214 - tosti007:std_collection_hash_new_rework, ↵bors-1/+1
r=workingjubilee Use `HashMap::with_capacity_and_hasher` instead of using base Cleans up the internal logic for `HashMap::with_capacity` slightly.
2023-10-07Auto merge of #3113 - rust-lang:rustup-2023-10-07, r=saethlinbors-4889/+7078
Automatic sync from rustc
2023-10-07Merge from rustcThe Miri Conjob Bot-4888/+7077
2023-10-07Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-10-07Auto merge of #116318 - pitaj:android-backtrace-build, r=workingjubileebors-0/+13
Invoke `backtrace-rs` buildscript in `std` buildscript Based on #99883 by `@Arc-blroth` Depends on rust-lang/backtrace-rs#556 and rust-lang/cc-rs#705
2023-10-07Auto merge of #116501 - workingjubilee:rollup-fpzov6m, r=workingjubileebors-124/+266
Rollup of 4 pull requests Successful merges: - #116277 (dont call mir.post_mono_checks in codegen) - #116400 (Detect missing `=>` after match guard during parsing) - #116458 (Properly export function defined in test which uses global_asm!()) - #116500 (Add tvOS to target_os for register_dtor) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-06Rollup merge of #116500 - simlay:tvos-support-for-register_dtor, ↵Jubilee-1/+1
r=workingjubilee Add tvOS to target_os for register_dtor Closes #116491.
2023-10-06Rollup merge of #116458 - bjorn3:fix_global_asm_test, r=workingjubileeJubilee-1/+8
Properly export function defined in test which uses global_asm!() Currently the test passes with the LLVM backend as the codegen unit partitioning logic happens to place both the global_asm!() and the function which calls the function defined by the global_asm!() in the same CGU. With the Cranelift backend it breaks however as it will place all assembly in separate codegen units to be passed to an external linker.
2023-10-06Rollup merge of #116400 - estebank:issue-78585, r=WaffleLapkinJubilee-41/+225
Detect missing `=>` after match guard during parsing ``` error: expected one of `,`, `:`, or `}`, found `.` --> $DIR/missing-fat-arrow.rs:25:14 | LL | Some(a) if a.value == b { | - while parsing this struct LL | a.value = 1; | -^ expected one of `,`, `:`, or `}` | | | while parsing this struct field | help: try naming a field | LL | a: a.value = 1; | ++ help: you might have meant to start a match arm after the match guard | LL | Some(a) if a.value == b => { | ++ ``` Fix #78585.
2023-10-06Rollup merge of #116277 - RalfJung:post-mono, r=oli-obkJubilee-81/+32
dont call mir.post_mono_checks in codegen It seems like all tests are still passing when I remove this... let's see what CI says.
2023-10-06Auto merge of #114709 - ShE3py:wasi-io-error-more, r=workingjubileebors-23/+92
Use `io_error_more` on WASI #86442 added many variants to [`io::ErrorKind`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html), but `sys::wasi::decode_error_kind()` wasn't modified to use them. The preview1 `errno` list: https://github.com/WebAssembly/WASI/blob/4712d490fd7662f689af6faa5d718e042f014931/legacy/preview1/docs.md#-errno-variant Original implementation: #63814 `@rustbot` label +A-error-handling +C-enhancement +O-wasi
2023-10-06Add tvOS to target_os for register_dtorSebastian Imlay-1/+1
2023-10-06Auto merge of #116492 - matthiaskrgr:rollup-xzfhmq1, r=matthiaskrgrbors-166/+116
Rollup of 7 pull requests Successful merges: - #114564 (Attempt to describe the intent behind the `From` trait further) - #116297 (add some docs to hooks/mod.rs) - #116423 (Fix typo in attrs.rs) - #116466 (`rustc_transmute` cleanups) - #116474 (Assorted small cleanups) - #116481 (Reuse existing `Some`s in `Option::(x)or`) - #116484 (Minor doc clarification in Once::call_once) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-06Rollup merge of #116484 - peterjoel:once-doc-clarify, r=cuviperMatthias Krüger-1/+1
Minor doc clarification in Once::call_once
2023-10-06Rollup merge of #116481 - scottmcm:tweak-combinators, r=cuviperMatthias Krüger-4/+4
Reuse existing `Some`s in `Option::(x)or` LLVM still has trouble re-using discriminants sometimes when rebuilding a two-variant enum, so when we have the correct variant already built, just use it. That's shorter in the Rust code, as well as simpler in MIR and the optimized LLVM, so might as well: <https://rust.godbolt.org/z/KhdE8eToW> Thanks to `@veber-alex` for pointing out this opportunity in https://github.com/rust-lang/rust/issues/101210#issuecomment-1732470941
2023-10-06Rollup merge of #116474 - nnethercote:rustc_assorted, r=spastorinoMatthias Krüger-81/+28
Assorted small cleanups r? `@spastorino`
2023-10-06Rollup merge of #116466 - nnethercote:rustc_transmute, r=oli-obkMatthias Krüger-78/+36
`rustc_transmute` cleanups Just some things I found while poking around this code. r? `@oli-obk`
2023-10-06Rollup merge of #116423 - eltociear:patch-22, r=flip1995Matthias Krüger-2/+2
Fix typo in attrs.rs documenation -> documentation
2023-10-06Rollup merge of #116297 - RalfJung:hooks, r=oli-obkMatthias Krüger-0/+5
add some docs to hooks/mod.rs r? `@oli-obk`
2023-10-06Rollup merge of #114564 - scottmcm:when-to-from, r=dtolnayMatthias Krüger-0/+40
Attempt to describe the intent behind the `From` trait further Inspired by the <https://internals.rust-lang.org/t/allow-use-as-and-try-as-for-from-and-tryfrom-traits/19240/26?u=scottmcm> thread. `@rustbot` label +T-libs-api
2023-10-06Auto merge of #114811 - estebank:impl-ambiguity, r=wesleywiserbors-3825/+3993
Show more information when multiple `impl`s apply - When there are `impl`s without type params, show only those (to avoid showing overly generic `impl`s). ``` error[E0283]: type annotations needed --> $DIR/multiple-impl-apply.rs:34:9 | LL | let y = x.into(); | ^ ---- type must be known at this point | note: multiple `impl`s satisfying `_: From<Baz>` found --> $DIR/multiple-impl-apply.rs:14:1 | LL | impl From<Baz> for Bar { | ^^^^^^^^^^^^^^^^^^^^^^ ... LL | impl From<Baz> for Foo { | ^^^^^^^^^^^^^^^^^^^^^^ = note: required for `Baz` to implement `Into<_>` help: consider giving `y` an explicit type | LL | let y: /* Type */ = x.into(); | ++++++++++++ ``` - Lower the importance of `T: Sized`, `T: WellFormed` and coercion errors, to prioritize more relevant errors. The pre-existing deduplication logic deals with hiding redundant errors better that way, and we show errors with more metadata that is useful to the user. - Show `<SelfTy as Trait>::assoc_fn` suggestion in more cases. ``` error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type --> $DIR/cross-return-site-inference.rs:38:16 | LL | return Err(From::from("foo")); | ^^^^^^^^^^ cannot call associated function of trait | help: use a fully-qualified path to a specific available implementation | LL | return Err(</* self type */ as From>::from("foo")); | +++++++++++++++++++ + ``` Fix #88284.
2023-10-06Use `io_error_more` on WASIShE3py-23/+92