Commit Graph

268193 Commits

Author SHA1 Message Date
onur-ozkan
ee5f51af30 disable read-only mode in mingw-check image for merge pipeline
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08 18:25:18 +03:00
onur-ozkan
1090d8920c improve ci-rustc finding logic
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08 18:25:07 +03:00
onur-ozkan
eb5e6239aa use if-unchanged only when ci rustc is available
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08 18:24:44 +03:00
onur-ozkan
b21949b962 make an explicit change on compiler then run bootstrap test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08 18:22:59 +03:00
onur-ozkan
bfcd00190d add test for ci rustc's if-unchanged logic
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08 18:22:57 +03:00
onur-ozkan
9826e3ece3 disable CI rustc when not using CI LLVM
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08 18:22:54 +03:00
onur-ozkan
11af16c983 use precompiled rustc for non-dist builders by default
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08 18:22:51 +03:00
bors
10a9ee0607 Auto merge of #131404 - matthiaskrgr:rollup-z0dawoo, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #131348 (More `rustc_infer` cleanups)
 - #131392 (Drop compiletest legacy directive check)
 - #131395 (Add a mailmap entry for bjorn3)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-08 15:22:08 +00:00
Matthias Krüger
37a8ad8722
Rollup merge of #131395 - bjorn3:bjorn3_mailmap, r=lqd
Add a mailmap entry for bjorn3
2024-10-08 16:05:37 +02:00
Matthias Krüger
46f821a016
Rollup merge of #131392 - jieyouxu:remove-legacy-directive-check, r=Urgau
Drop compiletest legacy directive check

Sufficient time has passed (> 6 months) since we migrated from `//` to `//`@`,` so let's drop the
legacy directive check as it causes friction due to false positives.

As a side-effect, dropping the legacy directive check simplifies the directive scanning logic.

The legacy directive check was originally added to help people be aware of the migration.

Blocker for #131382 cc `@ehuss.`

Can be reviewed by any compiler/bootstrap reviewer.
2024-10-08 16:05:36 +02:00
Matthias Krüger
7cb47b505c
Rollup merge of #131348 - nnethercote:rustc_infer-more-cleanups, r=lcnr
More `rustc_infer` cleanups

A sequel to #131226.

r? `@lcnr`
2024-10-08 16:05:36 +02:00
Michal Piotrowski
7ab466697f
Fix needless_lifetimes in rustc_serialize 2024-10-08 15:17:45 +02:00
Guillaume Gomez
c9b4d1bfb1 Remove unneeded argument of LinkCollector::verify_disambiguator 2024-10-08 15:13:26 +02:00
ismailarilik
076927b7cf fix(rustdoc): add space between struct fields and their descriptions 2024-10-08 16:06:22 +03:00
bors
68e4d9654e Auto merge of #131399 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2024-10-08 12:43:18 +00:00
Ralf Jung
287eb03838 fix/update teach_note from 'escaping mutable ref/ptr' const-check 2024-10-08 14:03:03 +02:00
Zalathar
27583378d3 Simplify the directives for ignoring coverage-test modes 2024-10-08 22:51:53 +11:00
bors
84a16c49d4 Auto merge of #18267 - lnicola:sync-from-rust, r=lnicola
minor: Sync from downstream
2024-10-08 11:27:18 +00:00
Laurențiu Nicola
4316afffd9 Merge from rust-lang/rust 2024-10-08 14:25:39 +03:00
Laurențiu Nicola
537fb8d1bb Preparing for merge from rust-lang/rust 2024-10-08 14:25:24 +03:00
bors
76fc27a178 Auto merge of #18266 - lnicola:macos-13, r=lnicola
internal: Use macos-13 runners and bump MACOSX_DEPLOYMENT_TARGET to 13.0

As Monterey seems to be EOL.
2024-10-08 10:39:04 +00:00
bjorn3
aeaea1b4b1 Add a mailmap entry for bjorn3 2024-10-08 12:09:19 +02:00
bors
6a3c45e1c6 Auto merge of #131368 - GuillaumeGomez:rustdoc-dead-code, r=notriddle
[rustdoc] Remove intra-doc links dead code

While working on https://github.com/rust-lang/rust/pull/130278, I wondered what `resolve_display_text` was doing. I removed it and ran all rustdoc tests, and nothing failed. Are some intra-doc links tests missing or is it really dead code? Couldn't figure it out.

r? `@notriddle`
2024-10-08 10:07:44 +00:00
Laurențiu Nicola
ac5361f95f Use macos-13 runners and bump MACOSX_DEPLOYMENT_TARGET 2024-10-08 13:00:58 +03:00
许杰友 Jieyou Xu (Joe)
b81a3c8199 Drop compiletest legacy directive checks
Sufficient time has passed (> 6 months) since we migrated from `//` to
`//@`, so let's drop the legacy directive check as it causes friction
due to false positives.
2024-10-08 07:54:10 +00:00
bors
cf24c73141 Auto merge of #126733 - ZhuUx:llvm-19-adapt, r=Zalathar
[Coverage][MCDC] Adapt mcdc to llvm 19

Related issue: #126672

Also finish task 4 at #124144

[llvm #82448](https://github.com/llvm/llvm-project/pull/82448) has introduced some break changes into mcdc, causing incompatibility between llvm 18 and 19. This draft adapts to that change and gives up supporting for llvm-18.
2024-10-08 07:08:41 +00:00
Nicholas Nethercote
3b1eee7755 Remove unnecessary return keyword. 2024-10-08 16:28:58 +11:00
Nicholas Nethercote
1dac23f6fe Use Default more in InferCtxtInner. 2024-10-08 16:28:58 +11:00
Nicholas Nethercote
4df21f2ca0 Downgrade a &mut self to &self. 2024-10-08 16:28:58 +11:00
Nicholas Nethercote
8b05df44f9 Remove Deref/DerefMut impls for RegionConstraintCollector.
`Deref`/`DerefMut` can be useful, but they can also obfuscate. I don't
think they're worth it for `RegionConstraintCollector`. They're also not
present on the similar types `OpaqueTypeTable` and `TypeVariableTable`.
2024-10-08 16:28:58 +11:00
Nicholas Nethercote
e8a0bd6549 Remove unnecessary lifetime from LeakCheck.
`LeakCheck` can own `mini_graph` and `rcc` instead of holding references
to them. This requires inlining `assign_scc_value` to avoid a borrowck
error, but that's fine because it has a single call site.
2024-10-08 16:28:58 +11:00
Nicholas Nethercote
85507cffc3 Inline and remove RegionConstraintStorage::remove_constraint_entry.
It has a single call site.
2024-10-08 16:28:58 +11:00
Nicholas Nethercote
2b57a785a9 Inline and remove RegionConstraintCollector::into_infos_and_data.
It's a weird method, and used weirdly:
- It's on `RegionConstraintCollector` but operates on
  `RegionConstraintStorage`. So at both call sites we create a temporary
  `RegionConstraintCollector`, using `with_log`, to call it.
- It `take`s just two of the six fields in `RegionConstraintStorage`.
  At one of the two call sites we unnecessarily clone the entire
  `RegionConstraintStorage` just to take those two fields.

This commit just inlines and removes it. We no longer need to `take` the
two fields, we can just use them directly.
2024-10-08 16:28:58 +11:00
Nicholas Nethercote
0293827e09 Improve formatting of some comments.
I.e. fixing comments lines that are too long or too short.
2024-10-08 16:28:58 +11:00
Nicholas Nethercote
27dad009c6 Add a useful comment about InferOk.
Prompted by #131134, which tried to remove `InferOk<'tcx, ()>`
occurrences.
2024-10-08 16:27:44 +11:00
Nicholas Nethercote
abf212c16c Remove OutlivesEnvironmentBuilder.
`OutlivesEnvironment::new` can call `OutlivesEnvironment::with_bounds`
with an empty `extra_bounds`. And once that's done,
`OutlivesEnvironmentBuilder` has a single use and can be inlined and
removed into `OutlivesEnvironment::with_bounds`.
2024-10-08 16:27:44 +11:00
bors
e6c46db4e9 Auto merge of #131387 - Zalathar:rollup-kprp512, r=Zalathar
Rollup of 7 pull requests

Successful merges:

 - #130824 (Add missing module flags for `-Zfunction-return=thunk-extern`)
 - #131170 (Fix `target_vendor` in non-IDF Xtensa ESP32 targets)
 - #131355 (Add tests for some old fixed issues)
 - #131369 (Update books)
 - #131370 (rustdoc: improve `<wbr>`-insertion for SCREAMING_CAMEL_CASE)
 - #131379 (Fix utf8-bom test)
 - #131385 (Un-vacation myself)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-08 04:38:04 +00:00
zhuyunxing
acd64fa0d9 coverage. Warn about too many test vectors 2024-10-08 11:15:26 +08:00
zhuyunxing
6e3e19f714 coverage. Adapt to mcdc mapping formats introduced by llvm 19 2024-10-08 11:15:24 +08:00
zhuyunxing
99bd601df5 coverage. MCDC ConditionId start from 0 to keep with llvm 19 2024-10-08 10:50:18 +08:00
zhuyunxing
911ac56e95 coverage. Disable supporting mcdc on llvm-18 2024-10-08 10:50:18 +08:00
Stuart Cook
e0555e93fd
Rollup merge of #131385 - jieyouxu:unvac, r=jieyouxu
Un-vacation myself

r? `@ghost`
2024-10-08 13:19:46 +11:00
Stuart Cook
2da0d40389
Rollup merge of #131379 - ehuss:fix-utf8-bom, r=jieyouxu
Fix utf8-bom test

The BOM was accidentally removed in https://github.com/rust-lang/rust/pull/57108

I had to move the run-pass line down, because compiletest doesn't seem to know about BOMs, so it does not parse the header if it is the first line.
2024-10-08 13:19:45 +11:00
Stuart Cook
ad96cf3685
Rollup merge of #131370 - notriddle:notriddle/screaming-camel-case, r=GuillaumeGomez
rustdoc: improve `<wbr>`-insertion for SCREAMING_CAMEL_CASE
2024-10-08 13:19:45 +11:00
Stuart Cook
4efe50d0a3
Rollup merge of #131369 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

8 commits in 99cf75a5414fa8adbe3974bd0836661ca901708f..f38ce8baef98cb20229e56f1be2d50e345f11792
2024-10-07 13:21:46 UTC to 2024-09-25 22:46:26 UTC

- Swap assert_eq! parameters (rust-lang/book#4058)
- Add a short discussion of assignment and ownership in ch. 04 (rust-lang/book#4049)
- Standardize on 'adapter', not 'adaptor' (rust-lang/book#4057)
- A bit more clarity about all the stack types in 3.2 (rust-lang/book#4055)
- Mention move of individual struct fields in struct update syntax (rust-lang/book#4046)
- Convert ch05 to `<Listing>` (rust-lang/book#4051)
- Convert ch04 to `<Listing>` (rust-lang/book#4043)
- Fixed Ukrainian translation link to community repo (rust-lang/book#4039)

## rust-embedded/book

1 commits in dbae36bf3f8410aa4313b3bad42e374735d48a9d..f40a8b420ec4b4505d9489965e261f1d5c28ba23
2024-09-30 19:16:36 UTC to 2024-09-30 19:16:36 UTC

- Update macOS installation instructions (rust-embedded/book#379)

## rust-lang/nomicon

1 commits in 14649f15d232d509478206ee9ed5105641aa60d0..456b904f791751892b01282fd2757904993c4c26
2024-10-05 17:29:16 UTC to 2024-10-05 17:29:16 UTC

- Improve/fix description of drops (rust-lang/nomicon#465)

## rust-lang/reference

7 commits in 24fb2687cdbc54fa18ae4acf5d879cfceca77b2c..c64e52a3d306eac0129f3ad6c6d8806ab99ae2e9
2024-10-05 00:33:03 UTC to 2024-09-24 22:04:59 UTC

- Fix inline-assembly documentation for LoongArch (rust-lang/reference#1644)
- Explain how to name rule identifiers (rust-lang/reference#1609)
- Add `expr_2021` macro fragment specifier (rust-lang/reference#1580)
- Add spec identifier syntax to macro subchapters (rust-lang/reference#1625)
- Authoring guide: clarify standard library linking (rust-lang/reference#1629)
- Add spec identifiers to comments.md (rust-lang/reference#1563)
- Add identifier syntax to visibility-and-privacy.md (rust-lang/reference#1627)

## rust-lang/rust-by-example

3 commits in c79ec345f08a1e94494cdc8c999709a90203fd88..8bede1b919a81ab7d0c961f6bbf68d3efa297bd2
2024-09-30 13:38:03 UTC to 2024-09-30 13:32:58 UTC

- Minor improvements (rust-lang/rust-by-example#1888)
- Clarify that the associated type is also required by the Iterator trait (rust-lang/rust-by-example#1887)
- Add Chinese(zh) translation (rust-lang/rust-by-example#1886)

## rust-lang/rustc-dev-guide

34 commits in 555f3de2fa0d61c4294b74d245f1cbad6fcbf589..07bc9ca9eb1cd6d9fbbf758c2753b748804a134f
2024-10-07 15:09:03 UTC to 2024-09-24 17:49:14 UTC

- rustdoc: docs for search deduplication (rust-lang/rustc-dev-guide#1850)
- Revise test naming advice to discourage using issue numbers alone (rust-lang/rustc-dev-guide#2090)
- Document `bootstrap` integration with `rustc-perf` (rust-lang/rustc-dev-guide#2005)
- building: Update instructions for ./x setup editor (rust-lang/rustc-dev-guide#2086)
- [Testing 2/2] Revise revisions docs (rust-lang/rustc-dev-guide#2089)
- [Testing 1/2] Revise testing chapters excluding the directives chapter (rust-lang/rustc-dev-guide#2088)
- Fixed links to rust-analyzer configs for Emacs and Helix (rust-lang/rustc-dev-guide#2087)
- update `x install` documentation (rust-lang/rustc-dev-guide#2084)
- Rename "object safe" to "dyn compatible" (rust-lang/rustc-dev-guide#2083)
- Small follow-up to my "internal `#[rustc_*]` TEST attributes" PR (rust-lang/rustc-dev-guide#2082)
- Add documentation for `{{rust-src-base}}` (rust-lang/rustc-dev-guide#2079)
- building/suggested: Add instructions for Emacs & Helix (rust-lang/rustc-dev-guide#2080)
- Fix file paths to section 35.1 & 35.2 example code  (rust-lang/rustc-dev-guide#2078)
- Clarify how to disable warnings in deps (rust-lang/rustc-dev-guide#2015)
- Update compiler-src.md (rust-lang/rustc-dev-guide#1899)
- Update rustdoc build instructions (rust-lang/rustc-dev-guide#1917)
- Update salsa.md (rust-lang/rustc-dev-guide#1906)
- Update memory.md (rust-lang/rustc-dev-guide#1907)
- Update serialization.md (rust-lang/rustc-dev-guide#1909)
- update rustc-driver.md (rust-lang/rustc-dev-guide#1929)
- Update syntax-intro.md (rust-lang/rustc-dev-guide#1932)
- Update the-parser.md (rust-lang/rustc-dev-guide#1933)
- Update macro-expansion.md (rust-lang/rustc-dev-guide#1934)
- Clarify a little bit in MIR chapter (rust-lang/rustc-dev-guide#1986)
- Update name-resolution.md (rust-lang/rustc-dev-guide#1935)
- feat: Add section about partial clones with `git clone --filter='blob:none'` (rust-lang/rustc-dev-guide#2035)
- Mention rustc's stable-item-through-unstable-path bug being fixed (rust-lang/rustc-dev-guide#2064)
- Fix `is_diagnostic_item()` example (rust-lang/rustc-dev-guide#2013)
- Revise lldb debuginfo note wording to not imply *only* Python 3.10 can be installed (rust-lang/rustc-dev-guide#2077)
- Document `crashes` test suite (rust-lang/rustc-dev-guide#2075)
- Fix getting diagnostics example (rust-lang/rustc-dev-guide#2067)
- Document `#[rustc_default_body_unstable]` (rust-lang/rustc-dev-guide#2065)
- Describe `.git-blame-ignore-rev` (rust-lang/rustc-dev-guide#2072)
- Note lldb debuginfo requires `python310.dll` to be present in `PATH` on Windows (rust-lang/rustc-dev-guide#2076)
2024-10-08 13:19:44 +11:00
Stuart Cook
cc5a24caf6
Rollup merge of #131355 - clubby789:old-tests, r=jieyouxu
Add tests for some old fixed issues

Closes #30867
Closes #30472
Closes #28994
Closes #26719 (and migrates the relevant test to the new run-make)
Closes #23600

cc `@jieyouxu` for the run-make-support changes

try-job: x86_64-msvc
2024-10-08 13:19:44 +11:00
Stuart Cook
e416a9cf4e
Rollup merge of #131170 - madsmtm:target-info-esp32-vendor, r=workingjubilee
Fix `target_vendor` in non-IDF Xtensa ESP32 targets

`rustc`'s Xtensa ESP32 targets are the following:
- `xtensa-esp32-none-elf`
- `xtensa-esp32-espidf`
- `xtensa-esp32s2-none-elf`
- `xtensa-esp32s2-espidf`
- `xtensa-esp32s3-none-elf`
- `xtensa-esp32s3-espidf`

The ESP-IDF targets already set `target_vendor="espressif"`, however, the ESP32 is, from my understanding, produced by Espressif regardless of whether using the IDF or not, so we should set the target vendor there as well?
2024-10-08 13:19:43 +11:00
Stuart Cook
4d63896018
Rollup merge of #130824 - Darksonn:fix-function-return, r=wesleywiser
Add missing module flags for `-Zfunction-return=thunk-extern`

This fixes a bug in the `-Zfunction-return=thunk-extern` flag. The flag needs to be passed onto LLVM to ensure that functions such as `asan.module_ctor` and `asan.module_dtor` that are created internally in LLVM have the mitigation applied to them.

This was originally discovered [in the Linux kernel](https://lore.kernel.org/all/CANiq72myZL4_poCMuNFevtpYYc0V0embjSuKb7y=C+m3vVA_8g@mail.gmail.com/).

Original flag PR: #116892
PR for similar issue: #129373
Tracking issue: #116853

cc ``@ojeda``
r? ``@wesleywiser``
2024-10-08 13:19:43 +11:00
许杰友 Jieyou Xu (Joe)
5c0131641d Add regression test for rustc/rustdoc broken pipe ICEs 2024-10-08 10:10:25 +08:00
bors
b8495e5dd2 Auto merge of #130251 - saethlin:ptr-offset-preconditions, r=Amanieu
Add precondition checks to ptr::offset, ptr::add, ptr::sub

All of `offset`, `add`, and `sub` (currently) have the trivial preconditions that the offset in bytes must be <= isize::MAX, and the computation of the new address must not wrap. This adds precondition checks for these, and like in slice indexing, we use intrinsics directly to implement unsafe APIs that have explicit checks, because we get a clearer error message that mentions the misused API not an implementation detail.

Experimentation indicates these checks have 1-2% compile time overhead, due primarily to adding the checks for `add`.

A crater run (https://github.com/rust-lang/rust/pull/130251#issuecomment-2395824565) indicates some people currently have buggy calls to `ptr::offset` that apply a negative offset to a null pointer, but the crater run does not hit the `ptr::add` or `ptr::sub` checks, which seems like an argument for cfg'ing out those checks on account of their overhead.
2024-10-08 01:56:58 +00:00