about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-03-10Rollup merge of #121860 - mu001999:master, r=NilstriebMatthias Krüger-6/+96
Add a tidy check that checks whether the fluent slugs only appear once As ``````@Nilstrieb`````` said in https://github.com/rust-lang/rust/pull/121828#issuecomment-1972622855: > Might make sense to have a tidy check that checks whether the fluent slugs only appear once in the source code and lint for that there's a tidy check already for sorting We can get the tidy check error: ``` tidy check tidy error: /path/to/rust/compiler/rustc_const_eval/messages.ftl: message `const_eval_invalid_align` is not used tidy error: /path/to/rust/compiler/rustc_lint/messages.ftl: message `lint_trivial_untranslatable_diag` is not used tidy error: /path/to/rust/compiler/rustc_parse/messages.ftl: message `parse_invalid_literal_suffix` is not used tidy error: /path/to/rust/compiler/rustc_infer/messages.ftl: message `infer_need_type_info_in_coroutine` is not used tidy error: /path/to/rust/compiler/rustc_passes/messages.ftl: message `passes_expr_not_allowed_in_context` is not used tidy error: /path/to/rust/compiler/rustc_passes/messages.ftl: message `passes_layout` is not used tidy error: /path/to/rust/compiler/rustc_parse/messages.ftl: message `parse_not_supported` is not used ``` r? ``````@Nilstrieb``````
2024-03-10Rollup merge of #121567 - Nilstrieb:less-interning, r=albertlarsan68Matthias Krüger-140/+128
Avoid some interning in bootstrap This interning is pointless and only makes the code more complex. The only remaining use of interning is `TargetSelection`, for which I left a comment.
2024-03-10Auto merge of #122246 - RalfJung:miri, r=RalfJungbors-260/+238
Miri subtree update r? `@ghost` `@WaffleLapkin` when this lands, setting `MIRI_TEMP` should not be needed any more on the dev desktops.
2024-03-10Bring back in-rust-tree feature to ideLaurențiu Nicola-0/+3
2024-03-10remove unnecessary frame parameter from after_local_allocatedRalf Jung-2/+1
2024-03-10Introduce perma-unstable `wasm-c-abi` flagdaxpedda-0/+10
2024-03-10Merge commit '574e23ec508064613783cba3d1833a95fd9a5080' into sync-from-raLaurențiu Nicola-2350/+4709
2024-03-10doc/rustc: Move loongarch64-unknown-linux-musl to Tier 3WANG Rui-1/+1
Fixes #122266
2024-03-10fmtThe Miri Cronjob Bot-12/+4
2024-03-10Merge from rustcThe Miri Cronjob Bot-45/+304
2024-03-10Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-03-10Auto merge of #122042 - GuillaumeGomez:subtree-update_cg_gcc_2024-03-05, ↵bors-8/+59
r=MarkSimulacrum Subtree update cg gcc 2024 03 05 Reopening of #121390. r? `@ghost`
2024-03-10Auto merge of #121662 - saethlin:precondition-unification, r=RalfJungbors-1/+1
Distinguish between library and lang UB in assert_unsafe_precondition As described in https://github.com/rust-lang/rust/pull/121583#issuecomment-1963168186, `assert_unsafe_precondition` now explicitly distinguishes between language UB (conditions we explicitly optimize on) and library UB (things we document you shouldn't do, and maybe some library internals assume you don't do). `debug_assert_nounwind` was originally added to avoid the "only at runtime" aspect of `assert_unsafe_precondition`. Since then the difference between the macros has gotten muddied. This totally revamps the situation. Now _all_ preconditions shall be checked with `assert_unsafe_precondition`. If you have a precondition that's only checkable at runtime, do a `const_eval_select` hack, as done in this PR. r? RalfJung
2024-03-10Use full commit hash and remove `libgccjit.version` fileGuillaume Gomez-5/+2
2024-03-09Auto merge of #122256 - Nadrieril:rollup-rc232xh, r=Nadrierilbors-8/+8
Rollup of 8 pull requests Successful merges: - #99153 (Add Read Impl for &Stdin) - #114655 (Make `impl<Fd: AsFd>` impl take `?Sized`) - #120504 (Vec::try_with_capacity) - #121280 (Implement MaybeUninit::fill{,_with,_from}) - #121403 (impl From<TryReserveError> for io::Error) - #121526 (on the fly type casting for `build.rustc` and `build.cargo`) - #121584 (bump itertools to 0.12) - #121711 (Implement junction_point) r? `@ghost` `@rustbot` modify labels: rollup
2024-03-09Rollup merge of #121584 - klensy:itertools-up, r=Mark-SimulacrumGuillaume Boisseau-2/+1
bump itertools to 0.12 still depend on 0.11 (temporary dupes version): * <del>clippy</del>, https://github.com/rust-lang/rust-clippy/pull/12346 * rustfmt, sigh, https://github.com/rust-lang/rustfmt/pull/6093 https://github.com/rust-itertools/itertools/blob/v0.12.1/CHANGELOG.md removed unused `derive_more` dep from `rustc_middle`
2024-03-09Rollup merge of #121526 - onur-ozkan:minor-improvement, r=Mark-SimulacrumGuillaume Boisseau-6/+7
on the fly type casting for `build.rustc` and `build.cargo` self-explanatory
2024-03-09windows: remove support for slim rwlockRalf Jung-602/+0
Since https://github.com/rust-lang/rust/pull/121956 we don't need it any more, and we are generally short on Windows staff so reducing the amount of code we have to test and maintain sounds like a good idea. The InitOnce stuff is still used by `thread_local_key::StaticKey`.
2024-03-09interpret: do not call machine read hooks during validationRalf Jung-0/+62
2024-03-09miri: add some chance to reuse addresses of previously freed allocationsRalf Jung-39/+182
2024-03-09simplify no-std testsRalf Jung-17/+9
set panic=abort so that we do not need this eh_personality thing
2024-03-09Respect COMPILETEST_FORCE_STAGE0 sysroot when compiling rmake.rs许杰友 Jieyou Xu (Joe)-30/+36
2024-03-09rustdoc-search: depth limit `T<U>` -> `U` unboxingMichael Howell-31/+108
Profiler output: https://notriddle.com/rustdoc-html-demo-9/search-unbox-limit/ This is a performance enhancement aimed at a problem I found while using type-driven search on the Rust compiler. It is caused by [`Interner`], a trait with 41 associated types, many of which recurse back to `Self` again. This caused search.js to struggle. It eventually terminates, after about 10 minutes of turning my PC into a space header, but it's doing `41!` unifications and that's too slow. [`Interner`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/trait.Interner.html
2024-03-09Auto merge of #120985 - Kobzol:linux-update-host-llvm, r=Mark-Simulacrumbors-1/+1
Update host LLVM on x64 Linux to LLVM 18 Updates host LLVM on Linux to `18.1.0`.
2024-03-09remove some frame parameters that are no longer neededRalf Jung-1/+1
2024-03-09Merge remote-tracking branch 'upstream/master' into HEADGuillaume Gomez-3064/+5045
2024-03-09Rollup merge of #122233 - RalfJung:custom-alloc-box, r=oli-obkMatthias Krüger-13/+205
miri: do not apply aliasing restrictions to Box with custom allocator This is the Miri side of https://github.com/rust-lang/rust/pull/122018. The "intrinsics with body" made this much more pleasant. :) Fixes https://github.com/rust-lang/miri/issues/3341. r? `@oli-obk`
2024-03-09Rollup merge of #122209 - onur-ozkan:fix-tidy-path-resolution, r=compiler-errorsMatthias Krüger-3/+4
fix incorrect path resolution in tidy Previously, reading the current path from the environment led to failure when invoking x from outside the source root. This change fixes this issue by passing the already resolved root path into `ui_tests::check`. Fixes #122202
2024-03-09Rollup merge of #122178 - cuviper:ci-llvm-18, r=KobzolMatthias Krüger-0/+64
ci: add a runner for vanilla LLVM 18 For CI cost, this can be seen as replacing the llvm-15 runner we dropped in #117947. Also, I've set `IS_NOT_LATEST_LLVM` in the llvm-17 runner, since that's not the latest anymore.
2024-03-09rename intptrcast -> alloc_addresses, and make a folder for itRalf Jung-13/+16
2024-03-09interpret: pass Size and Align to before_memory_deallocationRalf Jung-13/+14
2024-03-09miri: do not apply aliasing restrictions to Box with custom allocatorRalf Jung-13/+205
2024-03-09Auto merge of #3367 - rust-lang:rustup-2024-03-09, r=RalfJungbors-125/+154
Automatic Rustup
2024-03-09fix clippy lintsRalf Jung-1/+1
2024-03-09rename tests/compiletest → tests/uiRalf Jung-4/+4
2024-03-09fix incorrect path resolution in tidyonur-ozkan-3/+4
Previously, reading the current path from the environment led to failure when invoking x from outside the source root. This change fixes this issue by passing the already resolved root path into `ui_tests::check`. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-09fmtThe Miri Cronjob Bot-1/+2
2024-03-09Merge from rustcThe Miri Cronjob Bot-124/+152
2024-03-09Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-03-09Auto merge of #118879 - Nadrieril:lint-range-gap, r=estebankbors-19/+21
Lint singleton gaps after exclusive ranges In the discussion to stabilize exclusive range patterns (https://github.com/rust-lang/rust/issues/37854), it has often come up that they're likely to cause off-by-one mistakes. We already have the `overlapping_range_endpoints` lint, so I [proposed](https://github.com/rust-lang/rust/issues/37854#issuecomment-1845580712) a lint to catch the complementary mistake. This PR adds a new `non_contiguous_range_endpoints` lint that catches likely off-by-one errors with exclusive range patterns. Here's the idea (see the test file for more examples): ```rust match x { 0..10 => ..., // WARN: this range doesn't match `10_u8` because `..` is an exclusive range 11..20 => ..., // this could appear to continue range `0_u8..10_u8`, but `10_u8` isn't matched by either of them _ => ..., } // help: use an inclusive range instead: `0_u8..=10_u8` ``` More precisely: for any exclusive range `lo..hi`, if `hi+1` is matched by another range but `hi` isn't, we suggest writing an inclusive range `lo..=hi` instead. We also catch `lo..T::MAX`.
2024-03-09Allow lint where we don't careNadrieril-19/+21
2024-03-08Distinguish between library and lang UB in assert_unsafe_preconditionBen Kimock-1/+1
2024-03-09compiletest: create fresh tempdir for tests to useRalf Jung-15/+32
2024-03-08Rollup merge of #122076 - WaffleLapkin:mplace-args, r=RalfJungMatthias Krüger-11/+4
Tweak the way we protect in-place function arguments in interpreters Use `MPlaceTy` instead of `PlaceTy` in `FnArg` and ignore (copy) locals in an earlier step ("Locals that don't have their address taken are as protected as they can ever be"). This seems to be crucial for tail call support (as they can't refer to caller's locals which are killed when replacing the stack frame). r? `@RalfJung` cc `@oli-obk` see https://github.com/rust-lang/rust/pull/121273#issuecomment-1980210690
2024-03-08Add a change entryAlex Crichton-0/+5
2024-03-08Auto merge of #122190 - matthiaskrgr:rollup-9ol4y30, r=matthiaskrgrbors-117/+121
Rollup of 8 pull requests Successful merges: - #121025 (add known-bug tests for derive failure to detect packed repr) - #121194 (Refactor pre-getopts command line argument handling) - #121563 (Use `ControlFlow` in visitors.) - #122173 (Don't ICE in CTFE if raw/fn-ptr types differ) - #122175 (Bless tidy issues order) - #122179 (rustc: Fix typo) - #122181 (Fix crash in internal late lint checking) - #122183 (interpret: update comment about read_discriminant on uninhabited variants) Failed merges: - #122076 (Tweak the way we protect in-place function arguments in interpreters) - #122132 (Diagnostic renaming 3) r? `@ghost` `@rustbot` modify labels: rollup
2024-03-08Add `target.*.runner` configuration for targetsAlex Crichton-7/+27
This commit adds a `runner` field configuration to `config.toml` for specifying a wrapper executable when executing binaries for a target. This is pulled out of #122036 where a WebAssembly runtime is used, for example, to execute tests for `wasm32-wasip1`. The name "runner" here is chosen to match Cargo's `CARGO_*_RUNNER` configuration, and to make things a bit more consistent this additionally renames compiletest's `--runtool` argument to `--runner`.
2024-03-08Auto merge of #121500 - oli-obk:track_errors12, r=petrochenkovbors-11/+0
Merge `collect_mod_item_types` query into `check_well_formed` follow-up to https://github.com/rust-lang/rust/pull/121154 this removes more potential parallel-compiler bottlenecks and moves diagnostics for the same items next to each other, instead of grouping diagnostics by analysis kind
2024-03-08Tweak the way we protect in-place function arguments in interpretersMaybe Waffle-11/+4
Use `MPlaceTy` instead of `PlaceTy` in `FnArg` and ignore (copy) locals in an earlier step ("Locals that don't have their address taken are as protected as they can ever be"). This seems to be crucial for tail call support (as they can't refer to caller's locals which are killed when replacing the stack frame).
2024-03-08Rollup merge of #122175 - chenyukang:yukang-fix-tidy-issues, r=workingjubileeMatthias Krüger-100/+109
Bless tidy issues order The order is not right now because of https://github.com/rust-lang/rust/pull/121248#issuecomment-1975324159 from https://github.com/rust-lang/rust/pull/122161#discussion_r1517107993 r? `@workingjubilee`