about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-04-25Keep the LIB env var in the compiler-builtins testDaniel Paoliello-1/+4
2024-04-25Auto merge of #124386 - matthiaskrgr:rollup-0a6yr00, r=matthiaskrgrbors-55/+264
Rollup of 3 pull requests Successful merges: - #124313 (Detect borrow error involving sub-slices and suggest `split_at_mut`) - #124374 (Don't ICE when `codegen_select_candidate` returns ambiguity in new solver) - #124380 (`Range` iteration specialization: remove trivial bounds) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-25add triage bot mentionslcnr-0/+4
2024-04-25use `EagerResolver`lcnr-1/+3
2024-04-25ast: Visit item components in "natural" orderVadim Petrochenkov-4/+4
2024-04-25ast: Generalize item kind visitingVadim Petrochenkov-379/+407
And avoid duplicating logic for visiting `Item`s with different kinds (regular, associated, foreign).
2024-04-25thread_local: split refs to fields of KeyJubilee Young-3/+4
2024-04-25hir typeck: look into nested goalslcnr-317/+632
uses a `ProofTreeVisitor` to look into nested goals when looking at the pending obligations during hir typeck. Used by closure signature inference, coercion, and for async functions.
2024-04-25thread_local: use less &mut T in LazyKeyInner::takeJubilee Young-6/+8
Instead, use raw pointers to accomplish internal mutability throughout.
2024-04-25debuginfo: Stabilize `-Z debug-macros`, `-Z collapse-macro-debuginfo` and ↵Vadim Petrochenkov-339/+209
`#[collapse_debuginfo]` `-Z debug-macros` is "stabilized" by enabling it by default and removing. `-Z collapse-macro-debuginfo` is stabilized as `-C collapse-macro-debuginfo`. It now supports all typical boolean values (`parse_opt_bool`) in addition to just yes/no. Default value of `collapse_debuginfo` was changed from `false` to `external` (i.e. collapsed if external, not collapsed if local). `#[collapse_debuginfo]` attribute without a value is no longer supported to avoid guessing the default.
2024-04-25Rollup merge of #124380 - lcnr:std-unnecessary-params, r=NilstriebMatthias Krüger-13/+7
`Range` iteration specialization: remove trivial bounds These bounds on impl items are trivially true and never checked by a caller. They end up shadowing the actual impls, currently preventing normalization in the new solver. While we may have to fix the underlying issue in the new solver at some point, for now this is an easy way to get us closer to compiling core with `-Znext-solver`. r? `@Nilstrieb`
2024-04-25Rollup merge of #124374 - compiler-errors:fix-ambiguity-ice, r=lcnrMatthias Krüger-19/+22
Don't ICE when `codegen_select_candidate` returns ambiguity in new solver Because we merge identical candidates, we may have >1 impl candidate to in `codegen_select_error` but *not* have a trait error. r? lcnr
2024-04-25Rollup merge of #124313 - estebank:split-at-mut, r=fee1-deadMatthias Krüger-23/+235
Detect borrow error involving sub-slices and suggest `split_at_mut` ``` error[E0499]: cannot borrow `foo` as mutable more than once at a time --> $DIR/suggest-split-at-mut.rs:13:18 | LL | let a = &mut foo[..2]; | --- first mutable borrow occurs here LL | let b = &mut foo[2..]; | ^^^ second mutable borrow occurs here LL | a[0] = 5; | ---- first borrow later used here | = help: use `.split_at_mut(position)` or similar method to obtain two mutable non-overlapping sub-slices ``` Address most of #58792. For follow up work, we should emit a structured suggestion for cases where we can identify the exact `let (a, b) = foo.split_at_mut(2);` call that is needed.
2024-04-25Remove special-casing for SimplifiedType for next solverMichael Goulet-63/+18
2024-04-25review comment: rename methodEsteban Küber-5/+8
2024-04-25remove trivial boundslcnr-13/+7
2024-04-25Auto merge of #124377 - matthiaskrgr:rollup-ajxjq35, r=matthiaskrgrbors-28/+20
Rollup of 2 pull requests Successful merges: - #124287 (Improved code with clippy) - #124326 (tests: remove few ignore-stage2) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-25Rollup merge of #124326 - klensy:ignore-stage2, r=compiler-errorsMatthias Krüger-21/+13
tests: remove few ignore-stage2 beta was branched long ago, so can be removed
2024-04-25Rollup merge of #124287 - 41Leahcim:master, r=fmeaseMatthias Krüger-7/+7
Improved code with clippy I haven't used the bootstrapped compiler, but I think I have made some improvements using clippy. I have already made the following changes to the compiler: Replaced `self.first().is_digit(10)` with `self.first().is_ascii_digit()` on lines 633, 664, and 680 of compiler/rust_lexer/src/lib.rs. Removed unnecessary cast on line 262 of compiler/rustc_lexer/src/unescape.rs Replaced ok_or_else with ok_or on line 303 of compiler/rustc_lexer/src/unescape.rs Replaced `!std::env::var("RUSTC_BOOTSTRAP").is_ok()` with `std::env::var("RUSTC_BOOTSTRAP").is_err()` on line 4 of compiler/rustc_macros/build.rs Removed needless borrow for generic argument `env`on line 53 of compiler/rust_llvm/build.rs
2024-04-25Check equivalence of indices in more casesEsteban Küber-7/+10
2024-04-25Don't suggest `split_at_mut` when the multiple borrows have the same indexEsteban Küber-5/+60
2024-04-25Mention `split_at_mut` when mixing mutability in indexing opsEsteban Küber-4/+106
Emit suggestion when encountering ```rust let a = &mut foo[0]; let b = &foo[1]; a.use_mut(); ```
2024-04-25Only suggest `split_at_mut` on indexing borrowck errors for std typesEsteban Küber-13/+23
2024-04-25Detect borrow error involving sub-slices and suggest `split_at_mut`Esteban Küber-18/+57
``` error[E0499]: cannot borrow `foo` as mutable more than once at a time --> $DIR/suggest-split-at-mut.rs:13:18 | LL | let a = &mut foo[..2]; | --- first mutable borrow occurs here LL | let b = &mut foo[2..]; | ^^^ second mutable borrow occurs here LL | a[0] = 5; | ---- first borrow later used here | = help: use `.split_at_mut(position)` or similar method to obtain two mutable non-overlapping sub-slices ``` Address most of #58792. For follow up work, we should emit a structured suggestion for cases where we can identify the exact `let (a, b) = foo.split_at_mut(2);` call that is needed.
2024-04-25Don't ICE when codegen_select returns ambiguity in new solverMichael Goulet-19/+22
2024-04-25`pub(in super::super)` to `pub(crate)`lcnr-21/+21
`super::super` of `rustc_hir_typeck::fn_ctxt::_impl` is just `rustc_hir_typeck`.
2024-04-25`obligations_for_self_ty` to sub modulelcnr-59/+65
2024-04-25Auto merge of #123531 - compiler-errors:closure-wf, r=oli-obkbors-44/+126
Enforce closure args + return type are WF I found this out when investigating https://github.com/rust-lang/rust/issues/123461#issuecomment-2040894359. Turns out we don't register WF obligations for closure args and return types, leading to the ICE. ~~I think this is a useful thing to check for, but I'd like to check what the fallout is.~~ crater is complete. ~~Worst case, I think we should enforce this across an edition boundary (and possibly eventually migrate this for all editions) -- this should be super easy to do, since this is a check in HIR wfcheck, so it can be made edition dependent.~~ I believe the regressions are manageable enough to not necessitate edition-specific behavior. Fixes #123461
2024-04-25Add testMichael Goulet-5/+51
2024-04-25Check closure args and returns are WFMichael Goulet-37/+73
2024-04-25Format stash message correctlyMichael Goulet-2/+2
2024-04-25Auto merge of #124058 - TechVest:master, r=fmeasebors-5/+5
Fix some typos in comments
2024-04-25Auto merge of #124368 - RalfJung:miri, r=RalfJungbors-516/+3265
Miri subtree update r? `@ghost`
2024-04-25update lockfileRalf Jung-2/+4
2024-04-25Auto merge of #3514 - RalfJung:hyperfine, r=RalfJungbors-6/+6
CI: run benches with hyperfine rather than bash The hyperfine installation is cached so this should not cost a lot of CI time. This is step 1/2 to getting rid of the BASH variable hack.
2024-04-25CI: run benches with hyperfine rather than bashRalf Jung-6/+6
2024-04-25Auto merge of #119650 - chenyukang:yukang-fix-118596-ref-mut, r=wesleywiserbors-41/+164
Suggest ref mut for pattern matching assignment Fixes #118596
2024-04-25Auto merge of #3501 - RalfJung:tls-many-seeds, r=RalfJungbors-12/+47
add a test for the TLS memory leak This is a regression test for https://github.com/rust-lang/rust/issues/123583.
2024-04-25run many-seeds tests at least a few times on all tier 1 targetsRalf Jung-11/+28
2024-04-25add a test for the TLS memory leakRalf Jung-0/+13
2024-04-25weak memory outdated loads: show where the load was fromRalf Jung-5/+10
2024-04-25tests: remove few ignore-stage2klensy-21/+13
beta was branched long ago, so can be removed
2024-04-25Auto merge of #3512 - RalfJung:miri-script-build, r=RalfJungbors-1/+3
make miri-script a workspace root This is needed to make miri-script build on stable (as is done by the `./miri` script) when the parent package uses unstable cargo features.
2024-04-25Auto merge of #3513 - rust-lang:rustup-2024-04-25, r=RalfJungbors-2829/+4213
Automatic Rustup
2024-04-25Auto merge of #124360 - matthiaskrgr:rollup-k6bffhd, r=matthiaskrgrbors-193/+256
Rollup of 3 pull requests Successful merges: - #124257 (Rewrite the `no-input-file.stderr` test in Rust and support diff) - #124324 (Minor AST cleanups) - #124327 (CI: implement job skipping in Python matrix calculation) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-25Auto merge of #3505 - RalfJung:ci, r=RalfJungbors-1/+1
CI: don't run cron-fail-notify when the job just got canceled Doesn't seem right to prepare a PR in that case
2024-04-25Name the field in `Expander`.Nicholas Nethercote-4/+6
For code clarity.
2024-04-25fmtThe Miri Cronjob Bot-80/+149
2024-04-25Merge from rustcThe Miri Cronjob Bot-2769/+4084
2024-04-25Preparing for merge from rustcThe Miri Cronjob Bot-1/+1