about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-10-08coverage. Adapt to mcdc mapping formats introduced by llvm 19zhuyunxing-488/+493
2024-10-08coverage. MCDC ConditionId start from 0 to keep with llvm 19zhuyunxing-31/+27
2024-10-08coverage. Disable supporting mcdc on llvm-18zhuyunxing-54/+38
2024-10-07Auto merge of #131343 - compiler-errors:remove-combine-fields, r=lcnrbors-281/+168
Remove `CombineFields` This conflicts with #131263, but if this one lands first then perhaps #131263 could then go ahead and remove all the branching on solver in `TypeRelating`. We could perhaps then rename `TypeRelating` to `OldSolverRelating` or something, idk. r? lcnr
2024-10-07Auto merge of #131372 - workingjubilee:rollup-4tyqgx2, r=workingjubileebors-703/+254
Rollup of 7 pull requests Successful merges: - #128721 (Don't allow the `#[pointee]` attribute where it doesn't belong) - #130479 (skip in-tree compiler build for llvm-bitcode-linker if ci-rustc is on) - #130899 (Couple of changes to make it easier to compile rustc for wasm) - #131225 (`rustc_borrowck` memory management tweaks) - #131351 (Remove valgrind test suite and support from compiletest, bootstrap and opt-dist) - #131359 (Fix used_underscore_binding in rustc_serialize) - #131367 (Mark Boxy as on vacation) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-07Rollup merge of #131367 - compiler-errors:unboxy, r=lqdJubilee-0/+1
Mark Boxy as on vacation Boxy asked me to do this since she's busy :D cc `@BoxyUwU`
2024-10-07Rollup merge of #131359 - practicalrs:fix_used_underscore_binding, r=jieyouxuJubilee-3/+3
Fix used_underscore_binding in rustc_serialize Hi, This PR fixes the following clippy warnings in rustc_serialize ``` warning: used underscore-prefixed binding --> compiler/rustc_serialize/src/opaque.rs:443:27 | 443 | debug_assert_eq!((_end_pos - _start_pos), IntEncodedWithFixedSize::ENCODED_SIZE); | ^^^^^^^^ | note: binding is defined here --> compiler/rustc_serialize/src/opaque.rs:442:13 | 442 | let _end_pos = e.position(); | ^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding = note: requested on the command line with `-W clippy::used-underscore-binding` warning: used underscore-prefixed binding --> compiler/rustc_serialize/src/opaque.rs:443:38 | 443 | debug_assert_eq!((_end_pos - _start_pos), IntEncodedWithFixedSize::ENCODED_SIZE); | ^^^^^^^^^^ | note: binding is defined here --> compiler/rustc_serialize/src/opaque.rs:440:13 | 440 | let _start_pos = e.position(); | ^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding ``` Best regards, Michal
2024-10-07Rollup merge of #131351 - jieyouxu:yeet-the-valgrind, r=KobzolJubilee-619/+29
Remove valgrind test suite and support from compiletest, bootstrap and opt-dist The `run-pass-valgrind` test suite is not exercised in CI, and as far as I'm aware nobody runs it (asked in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Are.20the.20valgrind.20tests.20even.20used.20by.20anyone.3F). What's remaining of valgrind support in compiletest isn't even properly hooked up with bootstrap. The existing valgrind logic in compiletest is also straight up questionable, i.e. https://github.com/rust-lang/rust/blob/1b3b8e7b0265162853c650ead09905bc3cdaeae9/src/tools/compiletest/src/runtest/valgrind.rs#L7-L12 It just runs valgrind tests as `rpass` if no valgrind path is provided to compiletest from bootstrap -- but bootstrap doesn't even pass a valgrind path to compiletest in the first place, so this always ran as `rpass` tests. So what is this even testing? So if it's not testing anything, let's delete it. Closes #44816 by deleting the test suite :3 <img src="https://github.com/user-attachments/assets/99525bf7-e85b-40ba-9281-e4e1e275c4e8" width=300 />
2024-10-07Rollup merge of #131225 - nnethercote:rustc_borrowck-mm, r=lqdJubilee-70/+58
`rustc_borrowck` memory management tweaks Minor cleanups in `rustc_borrowck` relating to memory management. r? `@lqd`
2024-10-07Rollup merge of #130899 - bjorn3:wasi_bootstrap_fixes, r=davidtwcoJubilee-8/+27
Couple of changes to make it easier to compile rustc for wasm This is a subset of the patches I have on my rust fork to compile rustc for wasm32-wasip1.
2024-10-07Rollup merge of #130479 - ↵Jubilee-2/+5
onur-ozkan:llvm-bitcode-linker-multiple-candidates, r=Kobzol skip in-tree compiler build for llvm-bitcode-linker if ci-rustc is on Similar to https://github.com/rust-lang/rust/issues/108767, resolves the `multiple candidates` problem for ci-rustc. See https://github.com/rust-lang/rust/pull/122709#issuecomment-2355436227 for more context. Blocker for #122709.
2024-10-07Rollup merge of #128721 - Brezak:pointee-in-strange-places, r=pnkfelixJubilee-1/+131
Don't allow the `#[pointee]` attribute where it doesn't belong Error if the `#[pointee]` attribute is applied to anything but generic type parameters. Closes #128485 Related to #123430
2024-10-07Mark Boxy as on vacationMichael Goulet-0/+1
2024-10-07Fix used_underscore_binding in rustc_serializeMichal Piotrowski-3/+3
2024-10-07Auto merge of #131354 - matthiaskrgr:rollup-hprnng2, r=matthiaskrgrbors-128/+53
Rollup of 4 pull requests Successful merges: - #131331 (Revert "warn_old_master_branch" check) - #131344 (Avoid `&Lrc<T>` in various places) - #131346 (Restrict `ignore-mode-*` directives) - #131353 (Add documentation for `runtest::check_rustdoc_test_option` method) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-07Rollup merge of #131353 - GuillaumeGomez:check_rustdoc_test_option, r=jieyouxuMatthias Krüger-0/+4
Add documentation for `runtest::check_rustdoc_test_option` method r? `@jieyouxu`
2024-10-07Rollup merge of #131346 - jieyouxu:prune-invalid-directives, r=ZalatharMatthias Krüger-21/+3
Restrict `ignore-mode-*` directives This is only used by coverage test suites where the same sources get run under different coverage modes. Restrict `ignore-mode-<coverage_mode>` to only coverage modes.
2024-10-07Rollup merge of #131344 - nnethercote:ref-Lrc, r=compiler-errorsMatthias Krüger-39/+45
Avoid `&Lrc<T>` in various places Seeing `&Lrc<T>` is a bit suspicious, and `&T` or `Lrc<T>` is often better. r? `@oli-obk`
2024-10-07Rollup merge of #131331 - onur-ozkan:131296, r=KobzolMatthias Krüger-68/+1
Revert "warn_old_master_branch" check See https://github.com/rust-lang/rust/issues/131296#issuecomment-2395486918. Reverts https://github.com/rust-lang/rust/pull/130121 and https://github.com/rust-lang/rust/pull/129584. Fixes https://github.com/rust-lang/rust/issues/131296 and https://github.com/rust-lang/rust/issues/131324.
2024-10-07Add documentation for `runtest::check_rustdoc_test_option` methodGuillaume Gomez-0/+4
2024-10-07Remove At methods that are unusedMichael Goulet-41/+0
2024-10-07Remove unnecessary DefineOpaqueTypes from lubMichael Goulet-44/+16
2024-10-07Inline CombineFieldsMichael Goulet-218/+174
2024-10-07Auto merge of #131235 - ↵bors-191/+186
codemountains:rename-nestedmetaitem-to-metaitemlnner, r=nnethercote Rename `NestedMetaItem` to `MetaItemInner` Fixes #131087 r? `@nnethercote`
2024-10-07Delete the `run-pass-valgrind` test suite许杰友 Jieyou Xu (Joe)-515/+0
2024-10-07Remove valgrind test suite from opt-dist许杰友 Jieyou Xu (Joe)-1/+0
2024-10-07Remove valgrind test suite support from bootstrap许杰友 Jieyou Xu (Joe)-8/+0
2024-10-07Remove valgrind test suite and support from compiletest许杰友 Jieyou Xu (Joe)-95/+29
2024-10-07Rename nested_meta to meta_item_innercodemountains-22/+23
2024-10-07Auto merge of #131345 - Zalathar:rollup-scdxuou, r=Zalatharbors-163/+195
Rollup of 3 pull requests Successful merges: - #128399 (liballoc: introduce String, Vec const-slicing) - #131308 (enable f16 and f128 on windows-gnullvm targets) - #131325 (coverage: Multiple small tweaks to counter creation) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-07Prune invalid `ignore-mode-*` directives许杰友 Jieyou Xu (Joe)-21/+3
These are only valid for coverage test modes.
2024-10-07Rollup merge of #131325 - Zalathar:tweak-counters, r=jieyouxuStuart Cook-25/+28
coverage: Multiple small tweaks to counter creation I've been experimenting with some larger changes to how coverage counters are assigned to parts of the control-flow graph, and while none of that is ready yet, along the way I've repeatedly found myself wanting these smaller tweaks as a base. There are no changes to compiler output.
2024-10-07Rollup merge of #131308 - mati865:gnullvm-f16-f128, r=tgross35Stuart Cook-2/+3
enable f16 and f128 on windows-gnullvm targets Continuation of https://github.com/rust-lang/rust/pull/130959
2024-10-07Rollup merge of #128399 - mammothbane:master, r=Amanieu,tgross35Stuart Cook-136/+164
liballoc: introduce String, Vec const-slicing This change `const`-qualifies many methods on `Vec` and `String`, notably `as_slice`, `as_str`, `len`. These changes are made behind the unstable feature flag `const_vec_string_slice`. ## Motivation This is to support simultaneous variance over ownership and constness. I have an enum type that may contain either `String` or `&str`, and I want to produce a `&str` from it in a possibly-`const` context. ```rust enum StrOrString<'s> { Str(&'s str), String(String), } impl<'s> StrOrString<'s> { const fn as_str(&self) -> &str { match self { // In a const-context, I really only expect to see this variant, but I can't switch the implementation // in some mode like #[cfg(const)] -- there has to be a single body Self::Str(s) => s, // so this is a problem, since it's not `const` Self::String(s) => s.as_str(), } } } ``` Currently `String` and `Vec` don't support this, but can without functional changes. Similar logic applies for `len`, `capacity`, `is_empty`. ## Changes The essential thing enabling this change is that `Unique::as_ptr` is `const`. This lets us convert `RawVec::ptr` -> `Vec::as_ptr` -> `Vec::as_slice` -> `String::as_str`. I had to move the `Deref` implementations into `as_{str,slice}` because `Deref` isn't `#[const_trait]`, but I would expect this change to be invisible up to inlining. I moved the `DerefMut` implementations as well for uniformity.
2024-10-07Auto merge of #131226 - nnethercote:rustc_infer-cleanups, r=lcnrbors-195/+90
`rustc_infer` cleanups Various small improvements I found while reading over this code. r? `@lcnr`
2024-10-07Avoid another `&Lrc<..>` in a return value.Nicholas Nethercote-2/+3
2024-10-07Remove an unnecessary `&Lrc<_>` local variable.Nicholas Nethercote-3/+2
2024-10-07Convert a `&Lrc<T>` argument to `Lrc<T>`.Nicholas Nethercote-4/+12
It's slightly simpler.
2024-10-07Convert `Option<&Lrc<T>>` return types to `Option<&T>`.Nicholas Nethercote-30/+28
It's simpler and more concise.
2024-10-07Auto merge of #131068 - RalfJung:immediate-offset-sanity-check, r=nnethercotebors-46/+76
Don't use Immediate::offset to transmute pointers to integers This applies the relatively new `assert_matches_abi` check in the `offset` operation on immediates, which makes sure that if offsets are used to alter the layout (which is possible because the field layout is arbitrarily picked by the caller), this is not done in a way that breaks the invariant of the `Immediate` type. This leads to ICEs in a GVN mir-opt test, so the second commit fixes GVN. Fixes https://github.com/rust-lang/rust/issues/131064.
2024-10-06liballoc: introduce String, Vec const-slicingNathan Perry-136/+164
This change `const`-qualifies many methods on Vec and String, notably `as_slice`, `as_str`, `len`. These changes are made behind the unstable feature flag `const_vec_string_slice` with the following tracking issue: https://github.com/rust-lang/rust/issues/129041
2024-10-07Remove out-of-date comment.Nicholas Nethercote-2/+0
2024-10-07Move a `use` statement so it's with the other `use` statements.Nicholas Nethercote-2/+1
2024-10-07Simplify two matches.Nicholas Nethercote-24/+2
Matches involving `GenericArgKind` pairs typically use a single `_` for the impossible case. This commit shortens two verbose matches in this way.
2024-10-07Streamline `next_*_var*` methods.Nicholas Nethercote-18/+6
Inline and remove `next_const_var_id`, `next_int_var_id`, `next_float_var_id`, all of which have a single call site.
2024-10-07Inline and remove `InferCtxtBuilder::with_defining_opaque_types`.Nicholas Nethercote-10/+3
It has a single use.
2024-10-07Fix `FIXME` comment on `FixupError`.Nicholas Nethercote-27/+24
`FixupError` is isomorphic with `TyOrConstInferVar`, so this commit changes it to just be a wrapper around `TyOrConstInferVar`. Also, move the `Display` impl for `FixupError` next to `FixupError`.
2024-10-07Remove `InferCtxt::err_count_on_creation`.Nicholas Nethercote-30/+3
It's no longer used meaningfully. This also means `DiagCtxtHandle::err_count_excluding_lint_errs` can be removed.
2024-10-07Reduce visibilities some more.Nicholas Nethercote-25/+26
It helps people reading the code understand how widely things are used.
2024-10-07Remove unused `UnitResult` type.Nicholas Nethercote-2/+0