about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-12-31Fix tidy errorbjorn3-2/+2
2023-12-31Avoid specialization for AttrId deserializationbjorn3-23/+30
2023-12-31Remove almost all uses of specialization from the metadata encoding codebjorn3-284/+301
2023-12-31Avoid specialization for the Span Encodable and Decodable implsbjorn3-94/+140
2023-12-31Auto merge of #119470 - bjorn3:sync_cg_clif-2023-12-31, r=bjorn3bors-20/+22
Subtree sync for rustc_codegen_cranelift The main highlight this time is a fix for https://github.com/rust-lang/rustc_codegen_cranelift/issues/1437. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
2023-12-31Merge commit '6d355f6844323db03bfd608899613e363e701951' into ↵bjorn3-20/+22
sync_cg_clif-2023-12-31
2023-12-31Merge pull request #1440 from rust-lang/ci_speedup_and_cleanupbjorn3-18/+18
Slightly reduce CI runtime and reduce log verbosity
2023-12-31Remove no longer needed config option from setup_rust_fork.shbjorn3-3/+0
2023-12-31Suppress default config change warningsbjorn3-1/+1
2023-12-31Suppress progress notifications for all git commandsbjorn3-4/+6
2023-12-31Install ripgrep using the system package managerbjorn3-0/+5
2023-12-31Update the GHA artifacts actions to v4bjorn3-3/+3
2023-12-31Install hyperfine using the system package managerbjorn3-7/+3
2023-12-31Rustup to rustc 1.77.0-nightly (2a3e63551 2023-12-30)bjorn3-1/+1
2023-12-31Auto merge of #119441 - Urgau:check-cfg-simplify-bootstrap-args, r=onur-ozkanbors-14/+35
Simplify bootstrap `--check-cfg` arguments This PR simplifies the generated check-cfg arguments generated for the no-values case. For the `bootstrap` cfg: ```diff - --check-cfg=cfg(bootstrap,values()) + --check-cfg=cfg(bootstrap) ``` Those are equivalent, so there isn't any semantic difference; but the invocation is short and less distracting. `@rustbot` label +F-check-cfg
2023-12-31Auto merge of #119447 - Nilstrieb:STACKOVERFLOW, r=compiler-errorsbors-1/+2
Fix `<BoundConstness as Display>` There was infinite recursion, which is not very good. I'm not sure what the best way to implement this is, I just did something that felt right. r? `@fmease`
2023-12-30Auto merge of #119284 - Nadrieril:fix-bodiless-arm-parse, r=cjgillotbors-3/+38
Don't drop a hir node after lowering Fixes https://github.com/rust-lang/rust/issues/119271. It seems that all hir nodes that get allocated an id must be placed within the hir on pain of ICEs. In https://github.com/rust-lang/rust/pull/118527 I dropped guards on never patterns since they're not useful, which caused the ICE.
2023-12-30Auto merge of #119443 - Urgau:move-around-builtin-diag-context, r=Nilstriebbors-444/+538
Move around the code responsible for decorating builtin diagnostics This PR move the code responsible for decorating builtin diagnostics into a separate sub-module for ease of use and readability. While my original intention was to also move the check-cfg unexpected logic in their own function I changed my mind after moving the match altogether. I can move those if desired. Fixes https://github.com/rust-lang/rust/pull/119425#discussion_r1438446596 r? `@Nilstrieb`
2023-12-30Auto merge of #119446 - Nilstrieb:bitflags2.0-hell, r=compiler-errorsbors-139/+132
Update to bitflags 2 in the compiler This involves lots of breaking changes. There are two big changes that force changes. The first is that the bitflag types now don't automatically implement normal derive traits, so we need to derive them manually. Additionally, bitflags now have a hidden inner type by default, which breaks our custom derives. The bitflags docs recommend using the impl form in these cases, which I did. r? compiler
2023-12-30Update to bitflags 2 in the compilerNilstrieb-139/+132
This involves lots of breaking changes. There are two big changes that force changes. The first is that the bitflag types now don't automatically implement normal derive traits, so we need to derive them manually. Additionally, bitflags now have a hidden inner type by default, which breaks our custom derives. The bitflags docs recommend using the impl form in these cases, which I did.
2023-12-30bootstrap: extract --check-cfg arg generation and add unit tests for itUrgau-19/+35
2023-12-30Fix `<BoundConstness as Display>`Nilstrieb-1/+2
There was infinite recursion, which is not very good. I'm not sure what the best way to implement this is, I just did something that felt right.
2023-12-30Auto merge of #119436 - semarie:openbsd-available_parallelism, r=Mark-Simulacrumbors-26/+6
openbsd: available_parallelism: use the right API use the standard `sysconf(_SC_NPROCESSORS_ONLN)` way to get the number of available processors (capable of running processes), and fallback to `sysctl([CTL_HW, HW_NCPU])` (number of CPUs configured) only on error. it permits to differenciate CPUs online (capable of running processes) vs CPUs configured (not necessary capable of running processes). while here, use the common code path for BSDs for doing that, and avoid code duplication. Problem initially reported to me by Jiri Navratil.
2023-12-30Move around the code responsible for decorating builtin diagnosticsUrgau-444/+538
2023-12-30Simplify bootstrap check-cfg argumentsUrgau-10/+15
2023-12-30Auto merge of #119438 - Zalathar:prepare-mappings, r=cjgillotbors-53/+74
coverage: Prepare mappings separately from injecting statements These two tasks historically needed to be interleaved, but after various recent changes (including #116046 and #116917) they can now be fully separated. --- `@rustbot` label +A-code-coverage
2023-12-30Rustup to rustc 1.77.0-nightly (3cdd004e5 2023-12-29)bjorn3-1/+1
2023-12-30Auto merge of #119437 - matthiaskrgr:rollup-esf96p6, r=matthiaskrgrbors-93/+101
Rollup of 5 pull requests Successful merges: - #119158 (Clean up alloc::sync::Weak Clone implementation) - #119386 (fix typo in `IpAddr::to_canonical`) - #119413 (solaris support on bootstrap lock) - #119424 (Primitive docs: fix confusing `Send` in `&T`'s list) - #119425 (Fix invalid check-cfg Cargo feature diagnostic help) r? `@ghost` `@rustbot` modify labels: rollup
2023-12-30coverage: Make `coverage_counters` a local variableZalathar-31/+37
This avoids the awkwardness of having to create it in the pass's constructor, and then mutate it later to actually create the counters.
2023-12-30coverage: Prepare mappings separately from injecting statementsZalathar-29/+44
These two tasks historically needed to be interleaved, but after various recent changes (including #116046 and #116917) they can now be fully separated.
2023-12-30Sync from rust 3cdd004e55c869faa2b7b25efd3becf50346e7d6bjorn3-2/+2
2023-12-30Rollup merge of #119425 - Urgau:check-cfg-fix-cargo-diag-bug, r=NilstriebMatthias Krüger-8/+29
Fix invalid check-cfg Cargo feature diagnostic help #118213 added specialized diagnostic for Cargo `feature` cfg. However when providing an empty `#[cfg(feature)]` condition the suggestion would suggest adding `feature` as a feature in `Cargo.toml` (wtf!). This PR removes the invalid logic, which even brings a nice improvement. ```diff --> $DIR/cargo-feature.rs:18:7 | LL | #[cfg(feature)] - | ^^^^^^^ + | ^^^^^^^- help: specify a config value: `= "bitcode"` | = note: expected values for `feature` are: `bitcode` - = help: consider defining `feature` as feature in `Cargo.toml` ``` The first commit add a test showing the bug and the second commit fixes the bug. `@rustbot` label +F-check-cfg
2023-12-30Rollup merge of #119424 - ojeda:send-sync, r=est31Matthias Krüger-1/+3
Primitive docs: fix confusing `Send` in `&T`'s list The two lists in this document describe what traits are implemented on references when their underlying `T` also implements them. However, while it is true that `T: Send + Sync` implies `&T: Send` (which is what the sentence is trying to explain), it is confusing to have `Send` in the list because `T: Send` is not needed for that. In particular, the "also require" part may be interpreted as "both `T: Send` and `T: Sync` are required". Instead, move `Send` back to where it was before commit 7a477869b72e ("Makes docs for references a little less confusing"), i.e. to the `&mut` list (where no extra nota is needed, i.e. it fits naturally) and move the `Sync` definition/note to the bottom as something independent.
2023-12-30Rollup merge of #119413 - onur-ozkan:bump-fd-lock, r=Mark-SimulacrumMatthias Krüger-69/+57
solaris support on bootstrap lock With https://github.com/yoshuawuyts/fd-lock/pull/48, `fd-lock` now supports Solaris. Therefore we no longer need to conditionally handle the bootstrap locks.
2023-12-30Rollup merge of #119386 - Emilgardis:typo-ipaddr-canonical-doc, r=est31Matthias Krüger-1/+1
fix typo in `IpAddr::to_canonical`
2023-12-30Rollup merge of #119158 - JohnTheCoolingFan:arc-weak-clone-pretty, r=cuviperMatthias Krüger-14/+11
Clean up alloc::sync::Weak Clone implementation Since both return points (tail and early return) return the same expression and the only difference is whether inner is available, the code that does the atomic operations and checks on inner was moved into the if body and the only return is at the tail. Original comments preserved.
2023-12-30Auto merge of #119377 - tmiasko:after, r=cjgillotbors-7/+1
Don't validate / lint MIR before each pass To avoid redundant work and verbose output in case of failures.
2023-12-30openbsd: available_parallelism: use the right APISebastien Marie-26/+6
use the standard sysconf(_SC_NPROCESSORS_ONLN) way to get the number of available processors (capable of running processes), and fallback to sysctl([CTL_HW, HW_NCPU]) (number of CPUs configured) only on error. it permits to differenciate CPUs online vs CPUs configured (and not necessary capable of running processes). while here, use the common code path for BSDs for doing that, and avoid code duplication. Problem initially reported to me by Jiri Navratil.
2023-12-30Auto merge of #118705 - WaffleLapkin:codegen-atomic-exhange-untuple, r=cjgillotbors-20/+12
Change `rustc_codegen_ssa`'s `atomic_cmpxchg` interface to return a pair of values Doesn't change much, but a little nicer that way.
2023-12-30Auto merge of #119367 - Mark-Simulacrum:relative-spans, r=wesleywiserbors-47/+130
Shrink span encoding further Spans are now stored in a more compact form which cuts down on at least 1 byte per span (indirect/direct encoding) and at most 3 bytes per span (indirect/direct encoding, context byte, length byte). As a result, libcore metadata shrinks by 1.5MB. I'm not a huge fan of the fairly manual encoding/decoding from bits implemented here. Something like Tokio's pack abstraction (https://github.com/tokio-rs/tokio/blob/master/tokio/src/util/bit.rs) might be desirable to cut down on some of the shifting etc. We might also say that this isn't worth doing :) I took a look at copying the span encoding we use in memory (described [here](https://github.com/rust-lang/rust/blob/master/compiler/rustc_span/src/span_encoding.rs)). I think the format there makes a lot more sense for in-memory storage where prioritizing a fixed length (i.e., 4 or 8 bytes) is much more important. In metadata, it's much easier for us to have variable-length values, so there's less of a cliff if we don't quite fit. The bit packing scheme there would need changes to fit the varint scheme since it has a lot of all-1s patterns as the "relative offset" form.
2023-12-30Auto merge of #116012 - cjgillot:gvn-const, r=oli-obkbors-1581/+1088
Implement constant propagation on top of MIR SSA analysis This implements the idea I proposed in https://github.com/rust-lang/rust/pull/110719#issuecomment-1718324700 Based on https://github.com/rust-lang/rust/pull/109597 The value numbering "GVN" pass formulates each rvalue that appears in MIR with an abstract form (the `Value` enum), and assigns an integer `VnIndex` to each. This abstract form can be used to deduplicate values, reusing an earlier local that holds the same value instead of recomputing. This part is proposed in #109597. From this abstract representation, we can perform more involved simplifications, for example in https://github.com/rust-lang/rust/pull/111344. With the abstract representation `Value`, we can also attempt to evaluate each to a constant using the interpreter. This builds a `VnIndex -> OpTy` map. From this map, we can opportunistically replace an operand or a rvalue with a constant if their value has an associated `OpTy`. The most relevant commit is [Evaluated computed values to constants.](https://github.com/rust-lang/rust/commit/2767c4912ea249c2f613a9cedcd6c13ea1237e54)" r? `@oli-obk`
2023-12-29Shrink span encoding furtherMark Rousskov-47/+130
Spans are now stored in a more compact form which cuts down on at least 1 byte per span (indirect/direct encoding) and at most 3 bytes per span (indirect/direct encoding, context byte, length byte). As a result, libcore metadata shrinks by 1.5MB.
2023-12-30Auto merge of #119421 - matthiaskrgr:rollup-dbera1b, r=matthiaskrgrbors-696/+142
Rollup of 5 pull requests Successful merges: - #119322 (Couple of random coroutine pass simplifications) - #119374 (Italicise "bytes" in the docs of some `Vec` methods) - #119388 (rustc_lint: Prevent triplication of various lints) - #119406 (Add non-regression test for ATPIT ICE #114325) - #119410 (Rename test to be more descriptive) r? `@ghost` `@rustbot` modify labels: rollup
2023-12-30Fix invalid check-cfg Cargo feature diagnostic helpUrgau-4/+1
2023-12-30Add check-cfg test for Cargo feature without valueUrgau-6/+30
2023-12-30apply bootstrap lock unconditionallyonur-ozkan-32/+23
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-30bootstrap: bump fd-lockonur-ozkan-37/+34
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-29Primitive docs: fix confusing `Send` in `&T`'s listMiguel Ojeda-1/+3
The two lists in this document describe what traits are implemented on references when their underlying `T` also implements them. However, while it is true that `T: Send + Sync` implies `&T: Send` (which is what the sentence is trying to explain), it is confusing to have `Send` in the list because `T: Send` is not needed for that. In particular, the "also require" part may be interpreted as "both `T: Send` and `T: Sync` are required". Instead, move `Send` back to where it was before commit 7a477869b72e ("Makes docs for references a little less confusing"), i.e. to the `&mut` list (where no extra nota is needed, i.e. it fits naturally) and move the `Sync` definition/note to the bottom as something independent. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2023-12-29Rollup merge of #119410 - est31:fix_if_guard_unused, r=NilstriebMatthias Krüger-2/+2
Rename test to be more descriptive As suggested in https://github.com/rust-lang/rust/pull/119402#discussion_r1438171079 r? ``@Nilstrieb``
2023-12-29Rollup merge of #119406 - lqd:issue-114325, r=compiler-errorsMatthias Krüger-0/+55
Add non-regression test for ATPIT ICE #114325 ATPIT issue #114325 had been unknowingly fixed by https://github.com/rust-lang/rust/pull/107421, so this PR adds its [MCVE](https://github.com/rust-lang/rust/issues/114325#issuecomment-1721561552) as a non-regression test. Closes #114325.