about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-10-23remove `PredicatePolarity` and `BoundConstness` relate implslcnr-40/+11
Also removes `TypeError::ConstnessMismatch`. It is unused.
2024-10-22do not relate `Abi` and `Safety`lcnr-75/+99
and update some macros while we're at it
2024-10-22Auto merge of #132035 - matthiaskrgr:rollup-ty1e4q0, r=matthiaskrgrbors-253/+473
Rollup of 8 pull requests Successful merges: - #125205 (Fixup Windows verbatim paths when used with the `include!` macro) - #131049 (Validate args are correct for `UnevaluatedConst`, `ExistentialTraitRef`/`ExistentialProjection`) - #131549 (Add a note for `?` on a `impl Future<Output = Result<..>>` in sync function) - #131731 (add `TestFloatParse` to `tools.rs` for bootstrap) - #131732 (Add doc(plugins), doc(passes), etc. to INVALID_DOC_ATTRIBUTES) - #132006 (don't stage-off to previous compiler when CI rustc is available) - #132022 (Move `cmp_in_dominator_order` out of graph dominator computation) - #132033 (compiletest: Make `line_directive` return a `DirectiveLine`) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-22Rollup merge of #132033 - Zalathar:directive-line, r=jieyouxuMatthias Krüger-65/+56
compiletest: Make `line_directive` return a `DirectiveLine` This reduces the need to juggle raw tuples, and opens up the possibility of moving more parts of directive parsing into `line_directive`. In order to make the main change possible, this PR also (partly) separates the debugger-command parsing from the main directive parser. That cleanup removes support for `[rev]` in debugger commands, which is not used by any tests.
2024-10-22Rollup merge of #132022 - Zalathar:dominator-order, r=tmiaskoMatthias Krüger-24/+24
Move `cmp_in_dominator_order` out of graph dominator computation Dominator-order information is only needed for coverage graphs, and is easy enough to collect by just traversing the graph again. This avoids wasted work when computing graph dominators for any other purpose.
2024-10-22Rollup merge of #132006 - onur-ozkan:131947, r=jieyouxuMatthias Krüger-7/+9
don't stage-off to previous compiler when CI rustc is available Resolves the 4th item in [Tracking Issue for download-rustc improvements](https://github.com/rust-lang/rust/issues/131744).
2024-10-22Rollup merge of #131732 - m4tx:fix-82824, r=davidtwcoMatthias Krüger-69/+84
Add doc(plugins), doc(passes), etc. to INVALID_DOC_ATTRIBUTES This fixes #82824.
2024-10-22Rollup merge of #131731 - lucarlig:master, r=onur-ozkanMatthias Krüger-3/+33
add `TestFloatParse` to `tools.rs` for bootstrap add TestFloatParse to tools for bootstrap, I am not sure this is what the issue https://github.com/rust-lang/rust/issues/128012 discussion wants. try-job: aarch64-apple
2024-10-22Rollup merge of #131549 - compiler-errors:try-in-sync, r=spastorinoMatthias Krüger-52/+135
Add a note for `?` on a `impl Future<Output = Result<..>>` in sync function It's confusing to `?` a future of a result in a sync function. We have a suggestion to `.await` it if we're in an async function, but not a sync function. Note that this is the case for sync functions, at least. Let's be a bit more vague about a fix, since it's somewhat context dependent. For example, you could block on it, or you could make your function asynchronous. 🤷
2024-10-22Rollup merge of #131049 - compiler-errors:more-validation, r=spastorinoMatthias Krüger-32/+104
Validate args are correct for `UnevaluatedConst`, `ExistentialTraitRef`/`ExistentialProjection` For the `Existential*` ones, we have to do some adjustment to the args list to deal with the missing `Self` type, so we introduce a `debug_assert_existential_args_compatible` function to the interner as well.
2024-10-22Rollup merge of #125205 - ChrisDenton:verbatim-include, r=jieyouxuMatthias Krüger-1/+28
Fixup Windows verbatim paths when used with the `include!` macro On Windows, the following code can fail if the `OUT_DIR` environment variable is a [verbatim path](https://doc.rust-lang.org/std/path/enum.Prefix.html) (i.e. begins with `\\?\`): ```rust include!(concat!(env!("OUT_DIR"), "/src/repro.rs")); ``` This is because verbatim paths treat `/` literally, as if it were just another character in the file name. The good news is that the standard library already has code to fix this. We can simply use `components` to normalize the path so it works as intended.
2024-10-22Auto merge of #131321 - RalfJung:feature-activation, r=nnethercotebors-129/+151
terminology: #[feature] *enables* a feature (instead of "declaring" or "activating" it) Mostly, we currently call a feature that has a corresponding `#[feature(name)]` attribute in the current crate a "declared" feature. I think that is confusing as it does not align with what "declaring" usually means. Furthermore, we *also* refer to `#[stable]`/`#[unstable]` as *declaring* a feature (e.g. in [these diagnostics](https://github.com/rust-lang/rust/blob/f25e5abea229a6b6aa77b45e21cb784e785c6040/compiler/rustc_passes/messages.ftl#L297-L301)), which aligns better with what "declaring" usually means. To make things worse, the functions `tcx.features().active(...)` and `tcx.features().declared(...)` both exist and they are doing almost the same thing (testing whether a corresponding `#[feature(name)]` exists) except that `active` would ICE if the feature is not an unstable lang feature. On top of this, the callback when a feature is activated/declared is called `set_enabled`, and many comments also talk about "enabling" a feature. So really, our terminology is just a mess. I would suggest we use "declaring a feature" for saying that something is/was guarded by a feature (e.g. `#[stable]`/`#[unstable]`), and "enabling a feature" for `#[feature(name)]`. This PR implements that.
2024-10-22Make `line_directive` return a `DirectiveLine`Zalathar-15/+20
This reduces the need to juggle raw tuples, and opens up the possibility of moving more parts of directive parsing into `line_directive`.
2024-10-22Rename some fields of `DirectiveLine`Zalathar-23/+27
2024-10-22Stop using `line_directive` in `runtest::debugger`Zalathar-30/+12
This also removes unused support for `[rev]` in debugger commands, and makes breakpoint detection slightly more sensible.
2024-10-22Move `cmp_in_dominator_order` out of graph dominator computationZalathar-24/+24
Dominator-order information is only needed for coverage graphs, and is easy enough to collect by just traversing the graph again. This avoids wasted work when computing graph dominators for any other purpose.
2024-10-22Auto merge of #132030 - matthiaskrgr:rollup-1g6quh0, r=matthiaskrgrbors-3031/+7209
Rollup of 3 pull requests Successful merges: - #131918 (coverage: Make counter creation handle node/edge counters more uniformly) - #132021 (nuttx.md: typo) - #132029 (Subtree update of `rust-analyzer`) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-22Rollup merge of #132029 - lnicola:sync-from-ra, r=lnicolaMatthias Krüger-2913/+7101
Subtree update of `rust-analyzer` r? `@ghost`
2024-10-22Rollup merge of #132021 - tshepang:patch-2, r=workingjubileeMatthias Krüger-1/+1
nuttx.md: typo
2024-10-22Rollup merge of #131918 - Zalathar:counters, r=nnethercoteMatthias Krüger-117/+107
coverage: Make counter creation handle node/edge counters more uniformly Similar to #130380, this is another round of small improvements informed by my ongoing attempts to overhaul coverage counter creation. One of the big benefits is getting rid of the awkward special-case that would sometimes attach an edge counter to a node instead. That was needed by the code that chooses which out-edge should be given a counter expression, but we can avoid that by making the corresponding check a little smarter. I've also renamed several things to be simpler and more consistent, which should help with future changes.
2024-10-22Auto merge of #18364 - lnicola:sync-from-rust, r=lnicolabors-7362/+11339
minor: sync from downstream
2024-10-22Replace some LayoutError variants with the rustc_abi errorsLaurențiu Nicola-24/+22
2024-10-22Bump rustc cratesLaurențiu Nicola-5/+5
2024-10-22Merge from rust-lang/rustLaurențiu Nicola-7333/+11312
2024-10-22Preparing for merge from rust-lang/rustLaurențiu Nicola-1/+1
2024-10-22make some rustc_feature internals private, and ensure invariants with debug ↵Ralf Jung-26/+62
assertions
2024-10-22terminology: #[feature] *enables* a feature (instead of "declaring" or ↵Ralf Jung-129/+115
"activating" it)
2024-10-22Auto merge of #132020 - workingjubilee:rollup-a8iehqg, r=workingjubileebors-94/+494
Rollup of 6 pull requests Successful merges: - #130432 (rust_for_linux: -Zregparm=<N> commandline flag for X86 (#116972)) - #131697 (`rt::Argument`: elide lifetimes) - #131807 (Always specify `llvm_abiname` for RISC-V targets) - #131954 (shave 150ms off bootstrap) - #132015 (Move const trait tests from `ui/rfcs/rfc-2632-const-trait-impl` to `ui/traits/const-traits`) - #132017 (Update triagebot.toml) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-22nuttx.md: typoTshepang Mbambo-1/+1
2024-10-21Rollup merge of #132017 - celinval:smir-update-reviewerss, r=scottmcmJubilee-1/+1
Update triagebot.toml Update the list of reviewers after updating the team here: https://github.com/rust-lang/team/pull/1555
2024-10-21Rollup merge of #132015 - compiler-errors:move-const-trait-tests, r=fee1-deadJubilee-10/+10
Move const trait tests from `ui/rfcs/rfc-2632-const-trait-impl` to `ui/traits/const-traits` I found the old test directory to be somewhat long to name, and I don't think it's necessary to put an experimental implementation's tests under an rfc which is closed. r? fee1-dead Breaking this out of #131985 so that PR doesn't touch 300 files.
2024-10-21Rollup merge of #131954 - the8472:bootstrap-parallel-git, r=KobzolJubilee-14/+46
shave 150ms off bootstrap This starts `git` commands inside `GitInfo`and the submodule updates in parallel. Git should already perform internal locking in cases where it needs to serialize a modification. ``` OLD Benchmark #1: ./x check core Time (mean ± σ): 608.7 ms ± 4.4 ms [User: 368.3 ms, System: 455.1 ms] Range (min … max): 602.3 ms … 618.8 ms 10 runs NEW Benchmark #1: ./x check core Time (mean ± σ): 462.8 ms ± 2.6 ms [User: 350.2 ms, System: 485.1 ms] Range (min … max): 457.5 ms … 465.6 ms 10 runs ``` This should help with the rust-analyzer setup which issues many individual `./x check` calls. There's more that could be done but these were the lowest-hanging fruits that I saw.
2024-10-21Rollup merge of #131807 - beetrees:riscv-target-abi, r=workingjubileeJubilee-1/+71
Always specify `llvm_abiname` for RISC-V targets For RISC-V targets, when `llvm_abiname` is not specified LLVM will infer the ABI from the target features, causing #116344 to occur. This PR adds the correct `llvm_abiname` to all RISC-V targets where it is missing (which are all soft-float targets), and adds a test to prevent future RISC-V targets from accidentally omitting `llvm_abiname`. The only affect of this PR is that `-Ctarget-feature=+f` (or similar) will no longer affect the ABI on the modified targets. <!-- homu-ignore:start --> r? `@RalfJung` <!--- homu-ignore:end -->
2024-10-21Rollup merge of #131697 - ShE3py:rt-arg-lifetimes, r=AmanieuJubilee-16/+16
`rt::Argument`: elide lifetimes `@rustbot` label +C-cleanup
2024-10-21Rollup merge of #130432 - azhogin:azhogin/regparm, r=workingjubilee,pnkfelixJubilee-52/+350
rust_for_linux: -Zregparm=<N> commandline flag for X86 (#116972) Command line flag `-Zregparm=<N>` for X86 (32-bit) for rust-for-linux: https://github.com/rust-lang/rust/issues/116972 Implemented in the similar way as fastcall/vectorcall support (args are marked InReg if fit).
2024-10-22Auto merge of #129935 - RalfJung:unsupported_calling_conventions, ↵bors-201/+97
r=compiler-errors make unsupported_calling_conventions a hard error This has been a future-compat lint (not shown in dependencies) since Rust 1.55, released 3 years ago. Hopefully that was enough time so this can be made a hard error now. Given that long timeframe, I think it's justified to skip the "show in dependencies" stage. There were [not many crates hitting this](https://github.com/rust-lang/rust/pull/86231#issuecomment-866300943) even when the lint was originally added. This should get cratered, and I assume then it needs a t-compiler FCP. (t-compiler because this looks entirely like an implementation oversight -- for the vast majority of ABIs, we already have a hard error, but some were initially missed, and we are finally fixing that.) Fixes https://github.com/rust-lang/rust/pull/87678
2024-10-22Move testsMichael Goulet-10/+10
2024-10-21Auto merge of #131840 - compiler-errors:impossible-maybe, r=lcnrbors-12/+22
Dont consider predicates that may hold as impossible in `is_impossible_associated_item` Use infer vars to account for ambiguities when considering if methods are impossible to instantiate for a given self type. Also while we're at it, let's use the new trait solver instead of `evaluate` since this is used in rustdoc. r? lcnr Fixes #131839
2024-10-21Auto merge of #131570 - ehuss:update-xcode, r=Mark-Simulacrumbors-8/+8
(ci) Update macOS Xcode to 15 This updates the macOS builders to Xcode 15. The aarch64 images will be removing Xcode 14 and 16 very soon (https://github.com/actions/runner-images/issues/10703), so we will need to make the switch to continue operating. The linked issue also documents GitHub's new policy for how they will be updating Xcode in the future. Also worth being aware of is the future plans for x86 runners documented in https://github.com/actions/runner-images/issues/9255 and https://github.com/actions/runner-images/issues/10686, which will impact our future upgrade behaviors. I decided to also update the Xcode in the x86_64 runners, even though they are not being removed. It felt better to me to have all macOS runners on the same (major) version of Xcode. However, note that the x86_64 runners do not have the latest version of 15 (15.4), so I left them at 15.2 (which is currently the default Xcode of the runner). Xcode 15 was previously causing problems (see #121058) which seem to be resolved now. `@bjorn3` fixed the `invalid r_symbolnum` issue with cranelift. The issue with clang failing to link seems to be fixed, possibly by the update of the pre-built LLVM from 14 to llvm 15 in https://github.com/rust-lang/rust/pull/124850, or an update in our source version of LLVM. I have run some try builds and at least LLVM seems to build (I did not run any tests). Closes #121058
2024-10-21Update debuginfo test for newer lldbEric Huss-3/+3
For reasons I don't understand, lldb in Xcode 15 no longer prints objects as: (long) $0 = 19 instead, it is printing them as: (long) 19
2024-10-21Auto merge of #18360 - roife:safe-kw-3, r=Veykrilbors-54/+146
feat: better completions for extern blcoks This PR refactors `add_keywords` (making it much clearer!) and enhances completion for `extern` blocks. It is recommended to reviewing the changes in order of the commits: - The first commit (f3c4dde0a4917a2bac98605cc045eecfb4d69872) doesn’t change any logic but refactors parts of the `add_keywords` function and adds detailed comments. - The second commit (5dcc1ab649bf8a49cadf006d620871b12f093a2f) improves completion for `extern` kw and extern blocks.
2024-10-21Auto merge of #132005 - matthiaskrgr:rollup-ced4upi, r=matthiaskrgrbors-560/+613
Rollup of 7 pull requests Successful merges: - #130350 (stabilize Strict Provenance and Exposed Provenance APIs) - #131737 (linkchecker: add a reminder on broken links to add new/renamed pages to `SUMMARY.md` for mdBooks) - #131991 (test: Add test for trait in FQS cast, issue #98565) - #131997 (Make `rustc_abi` compile on stable again) - #131999 (Improve test coverage for `unit_bindings` lint) - #132001 (fix coherence error for very large tuples™) - #132003 (update ABI compatibility docs for new option-like rules) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-22minor: refactor completions in item_listroife-27/+24
2024-10-21don't stage-off to previous compiler when CI rustc is availableonur-ozkan-7/+9
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-21Rollup merge of #132003 - RalfJung:abi-compat-docs, r=traviscrossMatthias Krüger-3/+5
update ABI compatibility docs for new option-like rules Documents the rules decided [here](https://github.com/rust-lang/rust/pull/130628#issuecomment-2402761599) for our ABI compatibility rules. Long-term this should be moved to the reference, but for now this is what we got. Cc `@rust-lang/lang` `@rust-lang/opsem`
2024-10-21Rollup merge of #132001 - lcnr:stabilize-coherence-again, r=compiler-errorsMatthias Krüger-28/+94
fix coherence error for very large tuples™ see https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/diesel.20error for an in-depth explanation of this issue. We once again specialize `NormalizesTo` goals to avoid the impact of erasing their expected term. fixes #131969 r? `@compiler-errors`
2024-10-21Rollup merge of #131999 - jieyouxu:unit-bindings, r=WaffleLapkinMatthias Krüger-0/+100
Improve test coverage for `unit_bindings` lint Follow-up to #112380, apparently at the time I didn't add much of any test coverage outside of just "generally works as intended on the test suites and in the crater run". r? compiler
2024-10-21Rollup merge of #131997 - Veykril:veykril/push-upvqkyxmvkzw, r=jieyouxuMatthias Krüger-15/+27
Make `rustc_abi` compile on stable again https://github.com/rust-lang/rust/pull/131473 accidentally broke this
2024-10-21Rollup merge of #131991 - jannden:issue-98565-test, r=jieyouxuMatthias Krüger-0/+24
test: Add test for trait in FQS cast, issue #98565 Closes #98565 by adding a test to check for diagnostics when the built-in type `str` is used in a cast where a trait is expected.
2024-10-21Rollup merge of #131737 - jieyouxu:note-summary, r=ehussMatthias Krüger-0/+11
linkchecker: add a reminder on broken links to add new/renamed pages to `SUMMARY.md` for mdBooks I spent an embarrassingly long amount of time trying to figure out why CI was failing for a PR adding new platform support docs. In turns out it's because the PR author didn't register the new page in `SUMMARY.md`. I completely forgot about it too, and was reading linkchecker source because I thought it was a bug in linkchecker. So this PR adds a note to modify `SUMMARY.md` when adding new pages in a mdBook. E.g. ``` # Adding a new `meow` target but forgor to register the page in `SUMMARY.md` rustc\platform-support.html:183: broken link - `rustc\platform-support\meow.html` rustc\print.html:9730: broken link - `rustc\platform-support\meow.html` checked links in: 19.1s number of HTML files scanned: 43588 number of HTML redirects found: 13735 number of links checked: 3145951 number of links ignored due to external: 156244 number of links ignored due to exceptions: 9 number of intra doc links ignored: 8 errors found: 2 NOTE: if you are adding or renaming a markdown file in a mdBook, don't forget to register the page in SUMMARY.md found some broken links ```