Commit graph

308401 commits

Author SHA1 Message Date
Matthias Krüger
aa65c31c18
Rollup merge of #147932 - thaliaarchi:utf8-osstring, r=tgross35
Create UTF-8 version of `OsStr`/`OsString`

Implement a UTF-8 version of `OsStr`/`OsString`, in addition to the existing bytes and WTF-8 platform-dependent encodings.

This is applicable for several platforms, but I've currently only implemented it for Motor OS:

- WASI uses Unicode paths, but currently reexports the Unix bytes-assuming `OsStrExt`/`OsStringExt` traits.
  - [wasi:filesystem](https://wa.dev/wasi:filesystem) APIs:
    > Paths are passed as interface-type `strings`, meaning they must consist of a sequence of Unicode Scalar Values (USVs). Some filesystems may contain paths which are not accessible by this API.
  - In [wasi-filesystem#17](https://github.com/WebAssembly/wasi-filesystem/issues/17#issuecomment-1430639353), it was decided that applications can use any Unicode transformation format, so we're free to use UTF-8 (and probably already do). This was chosen over specifically UTF-8 or an ad hoc encoding which preserves paths not representable in UTF-8.
      > The current API uses strings for filesystem paths, which contains sequences of Unicode scalar values (USVs), which applications can work with using strings encoded in UTF-8, UTF-16, or other Unicode encodings.
    >
    > This does mean that the API is unable to open files which do not have well-formed Unicode encodings, which may want separate APIs for handling such paths or may want something like the arf-strings proposal, but if we need that we should file a new issue for it.
- As of Redox OS [0.7.0](https://www.redox-os.org/news/release-0.7.0/), "All paths are now required to be UTF-8, and the kernel enforces this". This appears to have been implemented in commit [d331f72f](d331f72f2a) (Use UTF-8 for all paths, 2021-02-14). Redox does not have `OsStrExt`/`OsStringExt`.
- Motor OS guarantees that its OS strings are UTF-8 in its [current `OsStrExt`/`OsStringExt` traits](a828ffcf5f/library/std/src/os/motor/ffi.rs), but they're still internally bytes like Unix.

This is an alternate approach to https://github.com/rust-lang/rust/pull/147797, which reuses the existing bytes `OsString` and relies on the safety properties of `from_encoded_bytes_unchecked`. Compared to that, this also gains efficiency from propagating the UTF-8 invariant to the whole type, as it never needs to test for UTF-8 validity.

Note that Motor OS currently does not build until https://github.com/rust-lang/rust/pull/147930 merges.

cc `@tgross35` (for earlier review)
cc `@alexcrichton,` `@rylev,` `@loganek` (for WASI)
cc `@lasiotus` (for Motor OS)
cc `@jackpot51` (for Redox OS)
2025-10-22 07:12:11 +02:00
Matthias Krüger
8c40b9c6d7
Rollup merge of #147788 - clarfonthey:const-cell, r=oli-obk
const Cell methods

Tracking: rust-lang/rust#147787

r? `@oli-obk`
2025-10-22 07:12:11 +02:00
Matthias Krüger
aa64f568b4
Rollup merge of #147768 - chenyukang:yukang-refactor-report-method-error, r=nnethercote
Code refactoring on hir report_no_match_method_error

While working on rust-lang/rust#147753, I found `report_no_match_method_error` now is too long for maintain, 1200 lines of code now:
57ef8d642d/compiler/rustc_hir_typeck/src/method/suggest.rs (L589-L1736)

this PR try to refactor it.

I tried my best to group most related code into same places, but the logic here is still very complex, there are some variables across different functions, maybe we need more work to make it better understand.

Maybe we could add a tidy check to avoid long spaghetti code.

r? `@nnethercote`
2025-10-22 07:12:10 +02:00
Matthias Krüger
f6d324fb8d
Rollup merge of #142339 - oli-obk:not-null-pattern-types, r=BoxyUwU
Add NonNull pattern types

These are the final piece missing for

* https://github.com/rust-lang/rust/pull/136006

We cannot use the previous scheme of using an integer range for raw pointers, as we're not just changing the layout of raw pointers anymore, but also the type representation. And we can't represent "any provenance or NonZero<usize>" natively as patterns. So I created a new `!null` pattern. Since this is all unstable representation stuff for replacing rustc_layout_scalar_range_start with pattern types, the divergence from normal patterns is fine, especially since T-lang seems interested in exploring general negation patterns

r? `@BoxyUwU`
2025-10-22 07:12:09 +02:00
Matthias Krüger
664e3b0741
Rollup merge of #141445 - yotamofek:pr/library/from-iter-char-string, r=the8472,joshtriplett
Add `FromIterator` impls for `ascii::Char`s to `String`s

Wanted to `collect` ascii chars into a `String` while working on #141369 , and was surprised these impls don't exist. Seems to me to be simply oversight.

BTW, I only added `impl FromIterator<ascii::Char> for Cow<'_, str>`, without a corresponding `FromIterator<&Char>` impl, because there's no existing impl for `FromIterator<&char>`, but that might be oversight too.

cc #110998
2025-10-22 07:12:08 +02:00
yukang
38e8066575 add UnsatisfiedPredicate type alias 2025-10-22 09:51:58 +08:00
yukang
92d5196d7a code refactoring on report_no_match_method_error 2025-10-22 08:45:29 +08:00
bors
96fe3c31c2 Auto merge of #147022 - Zalathar:no-args, r=wesleywiser
Remove current code for embedding command-line args in PDB

The compiler currently has code that will obtain a list of quoted command-line arguments, and pass it through to TargetMachine creation, so that the command-line args can be embedded in PDB output.

This PR removes that code, due to subtle concerns that might not have been apparent when it was originally added.

---

Those concerns include:
- The entire command-line quoting process is repeated every time a target-machine-factory is created. In incremental builds this typically occurs 500+ times, instead of happening only once. The repeated quoting constitutes a large chunk of instructions executed in the `large-workspace` benchmark.
  - See https://github.com/rust-lang/rust/pull/146804#issuecomment-3317322958 for an example of the perf consequences of skipping all that work.
  - This overhead occurs even when building for targets or configurations that don't emit PDB output.
- Command-line arguments are obtained in a way that completely bypasses the query system, which is a problem for the integrity of incremental compilation.
  - Fixing this alone is likely to inhibit incremental rebuilds for most or all CGUs, even in builds that don't emit PDB output.
- Command-line arguments and the executable path are obtained in a way that completely bypasses the compiler's path-remapping system, which is a reproducibility hazard.
  - https://github.com/rust-lang/rust/issues/128842

---

Relevant PRs:
- https://github.com/rust-lang/rust/pull/113492
- https://github.com/rust-lang/rust/pull/130446
- https://github.com/rust-lang/rust/pull/131805
- https://github.com/rust-lang/rust/pull/146700
- https://github.com/rust-lang/rust/pull/146973

Zulip thread:
- https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Some.20PDB.20info.20bypasses.20the.20query.20system.20and.20path.20remapping/with/541432211

---

According to rust-lang/rust#96475, one of the big motivations for embedding the command-line arguments was to enable tools like Live++. [It appears that Live++ doesn't actually support Rust yet](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/embeded.20compiler.20args.20and.20--remap-path-prefix/near/523800010), so it's possible that there aren't any existing workflows for this removal to break.

In the future, there could be a case for reintroducing some or all of this functionality, guarded behind an opt-in flag so that it doesn't cause problems for other users. But as it stands, the current implementation puts a disproportionate burden on other users and on compiler maintainers.
2025-10-22 00:21:08 +00:00
Thalia Archibald
7e2b76e1b6 motor: Use UTF-8 guarantee for OS strings 2025-10-21 16:36:10 -06:00
Thalia Archibald
206ffcc786 os_str: Create UTF-8 platform encoding 2025-10-21 16:29:14 -06:00
bors
37ec98f5d3 Auto merge of #146725 - lcnr:eager-instantiate-binder, r=BoxyUwU
`-Znext-solver` instantiate predicate binder without recanonicalizing goal

This strengthens the leak check to match the old trait solver. The new trait solver now also instantiates higher ranked goals in the same scope as candidate selection, so the leak check in each candidate detects placeholder errors involving this higher ranked goal.

E.g. let's look at tests/ui/higher-ranked/leak-check/leak-check-in-selection-2.rs
```rust
trait Trait<T, U> {}
impl<'a> Trait<&'a str, &'a str> for () {}
impl<'a> Trait<&'a str, String> for () {}
fn impls_trait<T: for<'a> Trait<&'a str, U>, U>() {}

fn main() {
    impls_trait::<(), _>();
}
```
Here proving `(): for<'a> Trait<&'a str, ?u>` via `impl<'a> Trait<&'a str, &'a str> for ()` equates `?u` with `&'!a str` which results in a leak check error as `?u` cannot name `'a`. If this leak check error happens while considering candidates we drop the first impl and infer `?u` to `String`. If not, this remains ambiguous.

This behavior is a bit iffy, see the FCP proposal in rust-lang/rust#119820 for more details on why this current behavior is somewhat undesirable. However, considering placeholders from higher-ranked goals for candidate selection does allow more code to compile and a lot of the code *feels like it should compile*. **This caused us to revert the change of rust-lang/rust#119820 in rust-lang/rust#127568.**

I originally expected that we can avoid breakage with the new solver differently here, e.g. by considering OR-region constraints. However, doing so is a significant change and I don't have a great idea for how that should work. Matching the old solver behavior for now should not make this cleaner approach any more difficult in the future, so let's just go with what actually allows us to stabilize the new solver for now.

This PR changing the new solver to match the behavior of the old one wrt the leak check. As the new solver is already used by default in coherence, this allows more code to compile, see `tests/ui/higher-ranked/leak-check/leak-check-in-selection-7-coherence.rs`:
```rust
struct W<T, U>(T, U);

trait Trait<T> {}
// using this impl results in a higher-ranked region error.
impl<'a> Trait<W<&'a str, &'a str>> for () {}
impl<'a> Trait<W<&'a str, String>> for () {}

trait NotString {}
impl NotString for &str {}
impl NotString for u32 {}

trait Overlap<U> {}
impl<T: for<'a> Trait<W<&'a str, U>>, U> Overlap<U> for T {}
impl<U: NotString> Overlap<U> for () {}

fn main() {}
```

This behavior is quite arbitrary and not something I expect users to rely on in practice, however, it should still go through an FCP imo.

r? `@BoxyUwU` originally implemented by `@compiler-errors` in https://github.com/rust-lang/rust/pull/136997. Closes https://github.com/rust-lang/trait-system-refactor-initiative/issues/120.
2025-10-21 21:09:46 +00:00
bors
695857bc3f Auto merge of #147943 - matthiaskrgr:rollup-rd0gb6y, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#147929 (compiletest: Don't set `TARGET` for non run-make tests)
 - rust-lang/rust#147930 (motor: Add new `set_times` stubs)
 - rust-lang/rust#147934 (compiletest: More directive handling tweaks)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-21 17:59:51 +00:00
Matthias Krüger
8baad706b1
Rollup merge of #147934 - Zalathar:directive, r=jieyouxu
compiletest: More directive handling tweaks

- Follow-up to rust-lang/rust#147903.

---

These are some more preparatory changes that were extracted from a larger overhaul of directive handling that I'm still working on.

---

The revision check was introduced by rust-lang/rust#61778, and later modified by rust-lang/rust#113603. It doesn't appear to be doing anything particularly load-bearing (since a bogus mode seems to cause a panic later anyway), and getting rid of it avoids the need to pass the current test revision to directive-handling code.

- rust-lang/rust#61778
- rust-lang/rust#113603

r? jieyouxu
2025-10-21 17:26:41 +02:00
Matthias Krüger
e2110d8463
Rollup merge of #147930 - thaliaarchi:motor-set-times, r=joboet
motor: Add new `set_times` stubs

Motor OS `std` support (https://github.com/rust-lang/rust/pull/147000) and `set_times`/`set_times_nofollow` (https://github.com/rust-lang/rust/pull/147468) were merged around the same time, so Motor OS is missing this API and currently fails to build.

cc `@lasiotus`
2025-10-21 17:26:40 +02:00
Matthias Krüger
9671020233
Rollup merge of #147929 - Zalathar:target, r=jieyouxu
compiletest: Don't set `TARGET` for non run-make tests

There are a few tests that were using `TARGET` to quietly do nothing on `i586` targets, but it's cleaner to just add support for `//@ ignore-i586` instead.

This lets us get rid of an unsafe `env::set_var` in compiletest, which really should have been setting the environment variable on individual build/run subprocess commands anyway.

- The original code and tests were introduced way back in rust-lang/rust#39068
2025-10-21 17:26:40 +02:00
bors
869fb4679f Auto merge of #147723 - ChayimFriedman2:ns-types, r=BoxyUwU
Make `UnevaluatedConst` have a specific ID type in the new solver

For the benefit of rust-analyzer.

r? types
2025-10-21 14:43:26 +00:00
bors
19abae728e Auto merge of #147922 - Kivooeo:dead-link, r=petrochenkov
Remove broken link

Idk if this link is any important but it does not work anymore so...
2025-10-21 11:33:23 +00:00
Oli Scherer
375899c940 Allow unsizing pattern types with pointer base 2025-10-21 11:22:51 +00:00
Oli Scherer
ad4bd083f3 Add not-null pointer patterns to pattern types 2025-10-21 11:22:51 +00:00
Oli Scherer
d9f22d289c Pattern types have their base type as a field 2025-10-21 10:37:07 +00:00
bors
cf8346dd4c Auto merge of #147476 - ehuss:cold-attribute-test, r=chenyukang
Add a test for the cold attribute

This adds a test for the cold attribute to verify that it actually does something, and that it applies correctly in all the positions it is expected to work.
2025-10-21 07:41:32 +00:00
Zalathar
860a84c04a Remove bad-directive detection that has been subsumed by the allowlist
Now that all directive names are checked against a list of known-good names,
these ad-hoc checks can never fire.
2025-10-21 17:14:52 +11:00
Zalathar
891b8475bd Remove a confused use of revision from update_pass_mode 2025-10-21 16:52:44 +11:00
bors
e821cb8dd9 Auto merge of #147928 - Zalathar:rollup-2lmpajs, r=Zalathar
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#147125 (move `once` module out of `poison`)
 - rust-lang/rust#147800 (Add `Cacheable` trait alias in `rustc_public_bridge`)
 - rust-lang/rust#147860 (rustdoc search: relax rules for identifiers)
 - rust-lang/rust#147916 (Update books)
 - rust-lang/rust#147924 (rustc-dev-guide subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-21 04:28:53 +00:00
Thalia Archibald
b39fb327cb motor: Add new set_times stubs 2025-10-20 21:45:14 -06:00
Zalathar
a58115426e Don't set TARGET for non run-make tests
If something like this is needed again in the future, please set environment
variables for the build and run subprocesses, instead of setting them on the
compiletest process.
2025-10-21 12:54:31 +11:00
Zalathar
ff0c0967c1 Add support for //@ ignore-i586
There are a few tests that were trying to skip i586 targets via the `TARGET`
environment variable instead, so better to just add support for the directive.
2025-10-21 12:39:49 +11:00
Stuart Cook
866ed3a5ad
Rollup merge of #147924 - tshepang:rdg-sync, r=tshepang
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to 7cb1f4267c.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-10-21 12:20:58 +11:00
Stuart Cook
7b0e3eb0a8
Rollup merge of #147916 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

68 commits in 1d7c3e6abec2d5a9bfac798b29b7855b95025426..af415fc6c8a6823dfb4595074f27d5a3e9e2fe49
2025-10-20 14:01:39 UTC to 2025-01-21 22:49:39 UTC

- Prepare for renaming of rust-lang/rust default branch (rust-lang/book#4534)
- Adding Uzbek translated rust-book repository to the list (rust-lang/book#4387)
- I have added Bengali Translation of The Book. (rust-lang/book#4476)
- Add+ vietnamese language translate (rust-lang/book#4368)
- Appendix B and Appendix D from tech review (rust-lang/book#4466)
- Chapter 21 from tech review (rust-lang/book#4464)
- Chapter 20 from tech review (rust-lang/book#4460)
- Chapter 19 from tech review (rust-lang/book#4446)
- Chapter 18 from tech review (rust-lang/book#4445)
- Chapter 16 from tech review (rust-lang/book#4438)
- WIP ch 17 edits after tech review (rust-lang/book#4319)
- Chapter 15 from tech review (rust-lang/book#4433)
- Chapter 14 from tech review (rust-lang/book#4423)
- Chapter 13 from tech review (rust-lang/book#4421)
- Chapter 12 from tech review (rust-lang/book#4410)
- Chapter 11 from tech review (rust-lang/book#4391)
- Chapter 10 from tech review (rust-lang/book#4379)
- Chapter 9 from tech review (rust-lang/book#4377)
- Chapter 8 from tech review (rust-lang/book#4378)
- Chapter 7 from tech review (rust-lang/book#4374)
- Chapter 6 from tech review (rust-lang/book#4370)
- Chapter 5 from tech review (rust-lang/book#4359)
- Chapter 4 from tech review (rust-lang/book#4358)
- Chapter 3 from tech review (rust-lang/book#4353)
- Ch01+ch02 after tech review (rust-lang/book#4329)
- Ch. 21: call out Chrome multiple-connections issue (rust-lang/book#4297)
- Ch. 16: refactor 16-6 to using listing component (rust-lang/book#4295)
- Ch. 01: Show how to work offline (rust-lang/book#4294)
- Ch. 07: Clarify sentences about `pub use` (rust-lang/book#4293)
- Ch. 02: Consistent ordering of `use` statements (rust-lang/book#4292)
- Anchors on listings (rust-lang/book#4271)
- Ch. 17: another tweak to how we phrase things about sections (rust-lang/book#4288)
- Ch. 20: correct listing number (rust-lang/book#4287)
- Ch. 10.3: clarify language detail (rust-lang/book#4284)
- Ch. 17: minor typos and link reference (rust-lang/book#4286)
- Ch. 9: correctly demonstrate privacy with module (rust-lang/book#4282)
- Ch. 18: correct discussion of delegation in `Post` methods (rust-lang/book#4281)
- Ch. 20: tell folks to see the Reference for more ABI info (rust-lang/book#4165)
- Ch 10.1 minor clarifications (rust-lang/book#4256)
- Clarified the misunderstanding b/w crates, module, items (rust-lang/book#4232)
- Ferris: always show, even when it’s small (rust-lang/book#4280)
- Ch. 17: mention `use std::pin::{Pin, pin};` on introduction (rust-lang/book#4279)
- Persist printing error, NOT ErrorKind (rust-lang/book#4259)
- Typo: "2" should be "2 seconds" (rust-lang/book#4263)
- Ch. 17: fix tiny example consistency issue (rust-lang/book#4270)
- Bump ring from 0.17.8 to 0.17.13 in /listings/ch17-async-await/listing-17-02 (rust-lang/book#4261)
- Bump ring from 0.17.8 to 0.17.14 in /packages/trpl (rust-lang/book#4273)
- 2024 Print Edition: updates to Word docs and more fixes to Markdown text (rust-lang/book#4272)
- Ch. 10: Make social media discussion generic. (rust-lang/book#4249)
- Another Ch. 17 -> 18 fix (rust-lang/book#4247)
- Ch. 05: further tweak to wording about `user1` availability (rust-lang/book#4246)
- Ch. 02: Fix rand version mistake (from testing) (rust-lang/book#4245)
- Ch. 19: Correct the discussion of `fn` type and closures (rust-lang/book#4244)
- Edition maintenance: scripting the updates for future work (rust-lang/book#4243)
- Ch. 17: fresh-eyes edits (rust-lang/book#4242)
- Ch. 17: drop lifetime not required in 2024 Edition (rust-lang/book#4212)
- Appendix B, Operators: Replace “member access” with “field access” and “method call”. (rust-lang/book#4240)
- Update to Rust 1.85 and 2024 Edition! (rust-lang/book#4241)
- Chapter 1: fix 'four things' now that spacing is not emphasized (rust-lang/book#4239)
- Fix typos in chapter 17 (rust-lang/book#4238)
- NoStarch backports (rust-lang/book#4224)
- Fix example for `cargo fix` (rust-lang/book#4226)
- Add missing word in ch17-04-streams.md (rust-lang/book#4218)
- Fix typo in ch5.3 and in CONTRIBUTING.md (rust-lang/book#4216)
- chore: reformat src with dprint (rust-lang/book#4211)
- Redirects: get rid of the weird gap in Ch. 20 sections! (rust-lang/book#4209)
- Document that `use` is also for `precise capturing` (rust-lang/book#4210)
- Ch. 17: NoStarch Edits! (rust-lang/book#4206)

## rust-lang/nomicon

1 commits in 23fc2682f8fcb887f77d0eaabba708809f834c11..60f0b30d8ec1c9eb5c2582f2ec55f1094b0f8c42
2025-10-20 13:05:39 UTC to 2025-10-20 13:05:39 UTC

- Fix typo in exception-safety.md (BinaryHeap::sift_up, user-defined and unsafe code separated) (rust-lang/nomicon#504)

## rust-lang/reference

11 commits in 8efb9805686722dba511b7b27281bb6b77d32130..752eab01cebdd6a2d90b53087298844c251859a1
2025-10-16 04:31:58 UTC to 2025-10-06 22:38:53 UTC

- Clarify struct pattern binding shorthand (rust-lang/reference#2054)
- Follow edition formatting for keywords (rust-lang/reference#2050)
- generalise paragraph (rust-lang/reference#2047)
- Rework the definitions of the extern ABIs (rust-lang/reference#2003)
- Fix grammar of `ConstParam` (rust-lang/reference#2036)
- Add a note to patterns.ident.precedent (rust-lang/reference#2022)
- Add a description of how the reference is published (rust-lang/reference#2028)
- Rearrange the README a little (rust-lang/reference#2029)
- Consistently use sentence case (rust-lang/reference#2030)
- More clearly define the default abi of an extern block (rust-lang/reference#2001)
- fix(css): Correctly specify grammar-literal-bg (rust-lang/reference#2032)
2025-10-21 12:20:58 +11:00
Stuart Cook
68bcd9020a
Rollup merge of #147860 - lolbinarycat:rustdoc-search-relax-ident-rules, r=notriddle,GuillaumeGomez
rustdoc search: relax rules for identifiers

fixes https://github.com/rust-lang/rust/issues/147763
2025-10-21 12:20:57 +11:00
Stuart Cook
8cd557d4ec
Rollup merge of #147800 - makai410:rp-cache-obj, r=celinval
Add `Cacheable` trait alias in `rustc_public_bridge`

r? `@celinval`
2025-10-21 12:20:56 +11:00
Stuart Cook
79e46694de
Rollup merge of #147125 - connortsui20:poison-once-remove, r=tgross35
move `once` module out of `poison`

From https://github.com/rust-lang/rust/issues/134645#issuecomment-3324577500, since `Once` will not have a non-poisoning variant, we remove it from the `poison` module.

Additionally:

1. Renames `once::ExclusiveState` to `OnceExclusiveState` since it was a bit confusing reading just `ExclusiveState` where it is used.
2. Reorders a few module definitions and re-exports in `library/std/src/sync/mod.rs` for clarity.

Also, once this is merged, I think that we can begin the process of stabilizing [`sync_poison_mod`](https://github.com/rust-lang/rust/issues/134646)
2025-10-21 12:20:56 +11:00
bors
63dcdf7ca8 Auto merge of #147867 - cjgillot:invalidate-cleanup, r=tmiasko
Stop invalidating CFG caches in CleanupPostBorrowck.

r? `@ghost`
2025-10-21 01:17:03 +00:00
bors
c7a635f33c Auto merge of #147910 - joboet:wait_timeout-spurious-test, r=ChrisDenton
handle spurious returns of `wait_timeout` in test

Fixes https://github.com/rust-lang/rust/issues/147885
Closes https://github.com/rust-lang/rust/pull/147871

`wait_timeout` is allowed to spuriously return, hence the `timeout_nanoseconds` must not assume that the wakeup resulted from a `notify_all()`.
2025-10-20 22:04:39 +00:00
Camille Gillot
6abc50b394 Stop invalidating in CleanupPostBorrowck. 2025-10-20 21:34:46 +00:00
Kivooeo
5acfc01acb remove broken link 2025-10-20 20:50:44 +00:00
nora
05d4da333f
Merge pull request #2613 from Enselic/bitcode
debugging.md: Remove wrong claim that LLVM bitcode is not the same as LLVM IR
2025-10-20 21:52:26 +02:00
binarycat
a35499268e rustdoc search: relax rules for identifiers 2025-10-20 12:58:55 -05:00
Martin Nordholts
578d06d320 debugging.md: Remove wrong claim that LLVM bitcode is not the same as IR
They are the same thing since they can be converted back and forth
without loss.
2025-10-20 19:39:00 +02:00
rustbot
67ec3ad033 Update books 2025-10-20 19:01:04 +02:00
bors
4068bafedd Auto merge of #147913 - matthiaskrgr:rollup-lmm3dsh, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#147577 (Improve error message for ambiguous numeric types in closure parameters)
 - rust-lang/rust#147785 (fix incorrect line number when building trimmed multi-line suggestions)
 - rust-lang/rust#147814 (btree: some cleanup with less unsafe)
 - rust-lang/rust#147843 (Change the tidy license checker)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-20 16:40:43 +00:00
Matthias Krüger
2a6ac46f31
Rollup merge of #147843 - bjorn3:tidy_licenses, r=clubby789
Change the tidy license checker

This adds a bunch of licenses to the global list of allowed licenses that are at least as permissive as some other license in the list. In addition it adds another list for licenses that are allowed to be used by tools, but not by the runtime. All permissive licenses from the exception lists are added here. This makes it clearer what actual exceptions to our permissive licensing policy are and will hopefully make it a bit easier to review future changes to the list of licenses rather than just adding whatever license is necessary to the global list of allowed licenses or to the list of exceptions.
2025-10-20 18:21:34 +02:00
Matthias Krüger
003feb45d2
Rollup merge of #147814 - hkBst:btree-4, r=joboet
btree: some cleanup with less unsafe
2025-10-20 18:21:34 +02:00
Matthias Krüger
1bb91dedd5
Rollup merge of #147785 - relaxcn:emitter_sugg_line, r=petrochenkov
fix incorrect line number when building trimmed multi-line suggestions

While fixing the issue https://github.com/rust-lang/rust-clippy/issues/15883 from `rust-clippy`, I tracked it down to a problem in `rustc` where line numbers were incorrect when building trimmed multi-line suggestions.
2025-10-20 18:21:33 +02:00
Matthias Krüger
5be6c6f16b
Rollup merge of #147577 - JohnTitor:issue-147312, r=davidtwco
Improve error message for ambiguous numeric types in closure parameters

Closes https://github.com/rust-lang/rust/issues/147312
2025-10-20 18:21:32 +02:00
joboet
76dfdd4e70
handle spurious returns of wait_timeout in test 2025-10-20 17:53:49 +02:00
bors
bd4a8004c2 Auto merge of #147906 - Zalathar:rollup-2wik61l, r=Zalathar
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#147734 (Further tighten up relaxed bounds)
 - rust-lang/rust#147888 (enzyme/autodiff is compatible with download-ci=true)
 - rust-lang/rust#147898 (compiletest: Move `AuxProps` out of `EarlyProps`)
 - rust-lang/rust#147903 (compiletest: Store the selected edition in `TestProps`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-20 13:31:49 +00:00
Stuart Cook
58345bb5eb
Rollup merge of #147903 - Zalathar:edition, r=jieyouxu
compiletest: Store the selected edition in `TestProps`

While working on a larger overhaul of directive processing, I ran into difficulty with the `has_edition` local variable.

Storing the selected edition in `TestProps` should make it easier to extract parts of directive processing into independent handler functions, because the `//@ edition` handler won't need access to additional mutable state outside of `TestProps`.

We still automatically add the edition to `compile_flags`, because there is too much existing compiletest code relying on that behaviour.

r? jieyouxu
2025-10-20 22:30:56 +11:00
Stuart Cook
40475b4088
Rollup merge of #147898 - Zalathar:aux-props, r=jieyouxu
compiletest: Move `AuxProps` out of `EarlyProps`

The primary purpose of `EarlyProps` is to discover revisions, so that we can create a separate test structure for each revision.

Revisions can (and do) have different auxiliaries, and up-to-date checking is already done per-revision, so it makes more sense to perform up-to-date checks based on the current revisions's auxiliaries only.

r? jieyouxu
2025-10-20 22:30:55 +11:00
Stuart Cook
d376a496f8
Rollup merge of #147888 - ZuseZ4:autodiff-with-download-ci, r=jieyouxu
enzyme/autodiff is compatible with download-ci=true

To my surprise autodiff just works out of the box with download-ci=true. Thanks to all the bootstrap people who over the past helped me to link properly against the sysroot LLVM, which seems to pay off here.
That also helps with enabling Rust in Enzyme CI, since CCache for some reason doesn't seem to cache LLVM correctly on their runners.

I verified that this works with
` ./configure --release-channel=nightly --enable-llvm-enzyme --enable-option-checking --disable-docs --enable-llvm-assertions --set llvm.download-ci-llvm=true`. However, shouldn't download-ci-llvm already be the default? Why do I still have to manually set it with this pr?

I tested it afterwards with
`./x.py test --stage 1 tests/codegen-llvm/autodiff`

r? bootstrap

closes https://github.com/rust-lang/rust/issues/147535
2025-10-20 22:30:54 +11:00