about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-14Adjust error message grammar to be less awkwardJake Goulding-61/+61
2025-08-14Remove lto inline logicMarcelo Domínguez-79/+1
2025-08-14Remove inlining for autodiff handlingMarcelo Domínguez-19/+21
2025-08-14Complete functionality and general cleanupMarcelo Domínguez-827/+419
2025-08-14Basic implementation of `autodiff` intrinsicMarcelo Domínguez-245/+284
2025-08-14cleanup: Remove useless `[T].iter().last()`Esteban Küber-2/+2
2025-08-14Update uitestsJonathan Brouwer-2267/+2449
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-14Remove the old target checking logicJonathan Brouwer-1310/+138
2025-08-14Specify the list of allowed targets per attributeJonathan Brouwer-44/+361
2025-08-14Allow attribute parsers to specify a list of allowed targetsJonathan Brouwer-13/+304
Every acceptor gets an `ALLOWED_TARGETS` specification which can specify per target whether it is allowed, warned, or errored.
2025-08-14Pass the target type down to `parse_attribute_list`Jonathan Brouwer-25/+48
2025-08-14Improved `Target` typeJonathan Brouwer-11/+143
- Added a few more variants which are needed for various attributes - Previously a trait method with default block had the same target representation as a method in a `impl trait for` block, this has been changed (See `MethodKind`) - Added `plural_name` for more precision on the form of the name
2025-08-14Do not ICE on private type in field of unresolved structEsteban Küber-3/+33
2025-08-14resolve: Add one more test case for "binding is available in a different ↵Vadim Petrochenkov-2/+21
scope" help
2025-08-14resolve: Restructure `resolve_ident_in_lexical_scope` for better clarityVadim Petrochenkov-42/+37
2025-08-14resolve: Inline `with_mod_rib`Vadim Petrochenkov-26/+18
2025-08-14resolve: Introduce `RibKind::Block`Vadim Petrochenkov-24/+24
to avoid confusing module items, blocks with items, and blocks without items.
2025-08-14Use `default_field_values` in `Resolver`Esteban Küber-30/+17
2025-08-14it's not a borrow checker limitation :<lcnr-24/+24
2025-08-14add commentlcnr-1/+6
2025-08-14fix alignment testEsteban Küber-1/+1
2025-08-14rustc-dev-guide :3lcnr-2/+2
2025-08-14Rename and document `ONLY_HOSTS` in bootstrapJakub Beránek-114/+119
2025-08-14Remove `ONLY_HOSTS` value overrides that just set the default value and had ↵Jakub Beránek-5/+0
no comment
2025-08-14update commentlcnr-0/+12
2025-08-14Auto merge of #144542 - sayantn:stabilize-sse4a-tbm, r=Amanieu,traviscrossbors-15/+7
Stabilize `sse4a` and `tbm` target features This PR stabilizes the feature flag `sse4a_target_feature` and `tbm_target_feature` (tracking issue rust-lang/rust#44839). # Public API The 2 `x86` target features `sse4a` and `tbm` Also, these were added in LLVM2.6 and LLVM3.4-rc1, respectively, and as the minimum LLVM required for rustc is LLVM19, we are safe in that front too! As all of the required tasks have been done (adding the target features to rustc, implementing their runtime detection in std_detect and implementing the associated intrinsics in core_arch), these target features can be stabilized now. The intrinsics were stabilized *long* ago, in 1.27.0 Reference PR: - https://github.com/rust-lang/reference/pull/1949 cc `@rust-lang/lang` `@rustbot` label I-lang-nominated r? lang
2025-08-14add regression testlcnr-0/+43
2025-08-14Add FnContext in parser for diagnosticxizheyin-80/+95
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-08-14Add test suggest-self-in-bare-functionxizheyin-0/+87
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-08-14resolve prelude import at `build_reduced_graph` phaseLorrensP-2158466-49/+53
2025-08-14ignore head usages of ignored candidateslcnr-149/+374
2025-08-14coverage: Remove intermediate data structures from mapping creationZalathar-77/+31
2025-08-14Print regions in `type_name`.Nicholas Nethercote-57/+78
Currently they are skipped, which is a bit weird, and it sometimes causes malformed output like `Foo<>` and `dyn Bar<, A = u32>`. Most regions are erased by the time `type_name` does its work. So all regions are now printed as `'_` in non-optional places. Not perfect, but better than the status quo. `c_name` is updated to trim lifetimes from MIR pass names, so that the `PASS_NAMES` sanity check still works. It is also renamed as `simplify_pass_type_name` and made non-const, because it doesn't need to be const and the non-const implementation is much shorter. The commit also renames `should_print_region` as `should_print_optional_region`, which makes it clearer that it only applies to some regions. Fixes #145168.
2025-08-14Revert "rustdoc search: prefer stable items in search results"Guillaume Gomez-65/+5
This reverts commit 1140e90074b0cbcfdea8535e4b51877e2838227e.
2025-08-14Revert "rustdoc: IndexItem::{stability -> is_unstable}"Guillaume Gomez-4/+9
This reverts commit 5e8ebd5ecd8546591a6707ac9e1a3b8a64c72f76.
2025-08-14Revert "rustdoc search: add performance note about searchIndexUnstable check"Guillaume Gomez-6/+0
This reverts commit fdbc8d08a63a3d34b7aebabb2f18a768462a98c4.
2025-08-14Revert "Correctly handle when there are no unstable items in the documented ↵Guillaume Gomez-3/+1
crate" This reverts commit cd79c7189db7b611f9199fd12ba56563afa18642.
2025-08-14ci: clean windows disk space in backgroundMarcoIeni-1/+184
2025-08-14Auto merge of #145388 - GuillaumeGomez:rollup-hnlt5ov, r=GuillaumeGomezbors-361/+646
Rollup of 13 pull requests Successful merges: - rust-lang/rust#140434 (rustdoc: Allow multiple references to a single footnote) - rust-lang/rust#142372 (Improve `--remap-path-prefix` documentation) - rust-lang/rust#142741 (Fix unsoundness in some tests) - rust-lang/rust#144515 (Implement `ptr_cast_array`) - rust-lang/rust#144727 (Add tracing to resolve-related functions) - rust-lang/rust#144959 (fix(unicode-table-generator): fix duplicated unique indices) - rust-lang/rust#145179 (Avoid abbreviating "numerator" as "numer", to allow catching typo "numer" elsewhere) - rust-lang/rust#145250 (Add regression test for a former ICE involving helper attributes containing interpolated tokens) - rust-lang/rust#145266 (Reduce some queries around associated items) - rust-lang/rust#145299 (doc test: fix mpsc.rs try_send doc test) - rust-lang/rust#145323 (Port the `#[linkage]` attribute to the new attribute system) - rust-lang/rust#145361 (Suppress wrapper suggestion when expected and actual ty are the same adt and the variant is unresolved) - rust-lang/rust#145372 (resolve: Miscellaneous cleanups) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-14Rollup merge of #145372 - petrochenkov:noresmacpath, r=jackh726Guillaume Gomez-101/+72
resolve: Miscellaneous cleanups See individual commits. All noticed when reviewing recent PRs to name resolution.
2025-08-14Rollup merge of #145361 - xizheyin:145294, r=compiler-errorsGuillaume Gomez-0/+56
Suppress wrapper suggestion when expected and actual ty are the same adt and the variant is unresolved Fixes rust-lang/rust#145294 I initially tried the desired suggestion in this issue, but since that suggestion occurs in the expected type, it is inappropriate to suggest for expected expressions (see other suggest methods in the same file). I believe that suppressing the incorrect suggestion is the more appropriate choice here. I opted for a slightly more general approach: when the expected type and actual type are the same ADT (e.g., both are Result in this example), we assume that code tend to compare the internal generic parameters(i.e. `Option<&str>` vs `Option<String>`, instead of `E = _` vs `Result<Option<String>>>`). When `E` is an unresolved infer type in the expected type (`_` in this example), we should not wrapp the actual type. Two commits show the difference. r? compiler
2025-08-14Rollup merge of #145323 - scrabsha:push-pqwvmznzzmpr, r=jdonszelmannGuillaume Gomez-124/+207
Port the `#[linkage]` attribute to the new attribute system r? `@jdonszelmann`
2025-08-14Rollup merge of #145299 - eval-exec:exec-fix-145293, r=tgross35Guillaume Gomez-2/+6
doc test: fix mpsc.rs try_send doc test This Pr want to fix the doctest, to make https://github.com/rust-lang/rust/pull/145293 's CI pass: r? ``@Zalathar`` https://github.com/rust-lang/rust/actions/runs/16903356990/job/47887354221 ```bash 2025-08-12T10:19:32.3873237Z test library/std/src/thread/scoped.rs - thread::scoped::ScopedJoinHandle<'scope,T>::join (line 302) ... ok 2025-08-12T10:19:32.4370250Z test library/std/src/time.rs - time::SystemTimeError::duration (line 688) ... ok 2025-08-12T10:19:32.5121966Z test library/std/src/time.rs - time::UNIX_EPOCH (line 664) ... ok 2025-08-12T10:19:32.5122586Z 2025-08-12T10:19:32.5122738Z failures: 2025-08-12T10:19:32.5122973Z 2025-08-12T10:19:32.5123482Z ---- library/std/src/sync/mpsc.rs - sync::mpsc::SyncSender<T>::try_send (line 691) stdout ---- 2025-08-12T10:19:32.5124286Z Test executable failed (exit status: 1). 2025-08-12T10:19:32.5124518Z 2025-08-12T10:19:32.5124605Z stdout: 2025-08-12T10:19:32.5124810Z message 3 received 2025-08-12T10:19:32.5125043Z message 1 received 2025-08-12T10:19:32.5125288Z the third message was never sent 2025-08-12T10:19:32.5125497Z 2025-08-12T10:19:32.5125581Z stderr: 2025-08-12T10:19:32.5125701Z 2025-08-12T10:19:32.5125935Z thread '<unnamed>' (203874) panicked at library/std/src/sync/mpsc.rs:14:25: 2025-08-12T10:19:32.5126459Z called `Result::unwrap()` on an `Err` value: SendError { .. } 2025-08-12T10:19:32.5126836Z stack backtrace: 2025-08-12T10:19:32.5127568Z ␛[0m␛[1m␛[38;5;9merror␛[0m␛[0m␛[1m: the main thread terminated without waiting for all remaining threads␛[0m 2025-08-12T10:19:32.5127971Z 2025-08-12T10:19:32.5128335Z ␛[0m␛[1m␛[38;5;10mnote␛[0m␛[0m␛[1m: set `MIRIFLAGS=-Zmiri-ignore-leaks` to disable this check␛[0m 2025-08-12T10:19:32.5128694Z 2025-08-12T10:19:32.5128943Z ␛[0m␛[1m␛[38;5;9merror␛[0m␛[0m␛[1m: aborting due to 1 previous error␛[0m 2025-08-12T10:19:32.5129519Z 2025-08-12T10:19:32.5129527Z 2025-08-12T10:19:32.5129532Z 2025-08-12T10:19:32.5129537Z 2025-08-12T10:19:32.5129631Z failures: 2025-08-12T10:19:32.5130018Z library/std/src/sync/mpsc.rs - sync::mpsc::SyncSender<T>::try_send (line 691) 2025-08-12T10:19:32.5130396Z 2025-08-12T10:19:32.5130713Z test result: FAILED. 999 passed; 1 failed; 16 ignored; 0 measured; 344 filtered out; finished in 105.92s ```
2025-08-14Rollup merge of #145266 - camsteffen:reduce-queries, r=petrochenkovGuillaume Gomez-64/+79
Reduce some queries around associated items
2025-08-14Rollup merge of #145250 - fmease:regr-test-for-attr-meta-ice, r=jdonszelmannGuillaume Gomez-0/+28
Add regression test for a former ICE involving helper attributes containing interpolated tokens Add regression test for rust-lang/rust#140612 from rust-lang/rust#140601 or rather rust-lang/rust#140859 that only added it to `stable` not `master`. Supersedes https://github.com/rust-lang/rust/pull/140584. r? `@jdonszelmann` or anyone
2025-08-14Rollup merge of #145179 - joshtriplett:number, r=RalfJungGuillaume Gomez-10/+8
Avoid abbreviating "numerator" as "numer", to allow catching typo "numer" elsewhere `typos.toml` has an exception for "numer", to avoid flagging its use as an abbreviation for "numerator". Remove the use of that abbrevation, spelling out "numerator" instead, and remove the exception, so that typo checks can find future instances of "numer" as a typo for "number".
2025-08-14Rollup merge of #144959 - Marcondiro:master, r=Mark-SimulacrumGuillaume Gomez-1/+1
fix(unicode-table-generator): fix duplicated unique indices unicode-table-generator panicked while populating `distinct_indices` because of duplicated indices. This was introduced in rust-lang/rust#144134, where the order of `canonical_words.push(...)` and `canonical_words.len()` was swapped. Fixes: rust-lang/rust#144134
2025-08-14Rollup merge of #144727 - Stypox:add-tracing-to-resolve, r=RalfJungGuillaume Gomez-23/+43
Add tracing to resolve-related functions Resolve-related functions are not called often but still make up for ~3% of execution time for non-repetitive programs (as seen in the first table below, obtained from running the rust snippet at the bottom with `n=1`). On the other hand, for repetitive programs they become less relevant (I tested the same snippet but with `n=100` and got ~1.5%), and it appears that only `try_resolve` is called more often (see the last two tables). The first table was obtained by opening the trace file in https://ui.perfetto.dev and running the following query: ```sql select "TOTAL PROGRAM DURATION" as name, count(*), max(ts + dur) as "sum(dur)", 100.0 as "%", null as "min(dur)", null as "max(dur)", null as "avg(dur)", null as "stddev(dur)" from slices union select "TOTAL OVER ALL SPANS (excluding events)" as name, count(*), sum(dur), cast(cast(sum(dur) as float) / (select max(ts + dur) from slices) * 1000 as int) / 10.0 as "%", min(dur), max(dur), cast(avg(dur) as int) as "avg(dur)", cast(sqrt(avg(dur*dur)-avg(dur)*avg(dur)) as int) as "stddev(dur)" from slices where parent_id is null and name != "frame" and name != "step" and dur > 0 union select name, count(*), sum(dur), cast(cast(sum(dur) as float) / (select max(ts + dur) from slices) * 1000 as int) / 10.0 as "%", min(dur), max(dur), cast(avg(dur) as int) as "avg(dur)", cast(sqrt(avg(dur*dur)-avg(dur)*avg(dur)) as int) as "stddev(dur)" from slices where parent_id is null and name != "frame" and name != "step" group by name order by sum(dur) desc, count(*) desc ``` <img width="1687" height="242" alt="image" src="https://github.com/user-attachments/assets/4d4bd890-869b-40f3-a473-8e4c42b02da4" /> The following two tables show how many `resolve` spans there per subname/subcategory, and how much time is spent in each. The first is for `n=1` and the second for `n=100`. The query that was used is: ```sql select args.string_value as name, count(*), max(dur), avg(dur), sum(dur) from slices inner join args USING (arg_set_id) where args.key = "args." || slices.name and name = "resolve" group by args.string_value ``` <img width="1688" height="159" alt="image" src="https://github.com/user-attachments/assets/a8749856-c099-492e-a86e-6d67b146af9c" /> <img width="1688" height="159" alt="image" src="https://github.com/user-attachments/assets/ce3ac1b5-5c06-47d9-85a6-9b921aea348e" /> The snippet I tested with Miri to obtain the above traces is: ```rust fn main() { let n: usize = std::env::args().nth(1).unwrap().parse().unwrap(); let mut v = (0..n).into_iter().collect::<Vec<_>>(); for i in &mut v { *i += 1; } } ```
2025-08-14Rollup merge of #144515 - scottmcm:ptr_cast_array, r=Mark-SimulacrumGuillaume Gomez-10/+35
Implement `ptr_cast_array` ACP: https://github.com/rust-lang/libs-team/issues/602 Tracking Issue: https://github.com/rust-lang/rust/issues/144514
2025-08-14Rollup merge of #142741 - a1phyr:fix_unsoundness, r=Mark-SimulacrumGuillaume Gomez-2/+2
Fix unsoundness in some tests These tests were marked uninit bytes as initilized, which is unsound. Use initialized `MaybeUninit` instead.