Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #138760

Merged
merged 24 commits into from
Mar 21, 2025
Merged

Rollup of 8 pull requests #138760

merged 24 commits into from
Mar 21, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

eholk and others added 24 commits March 14, 2025 12:21
We had a discussion[1] today about whether postfix yield would make sense.
It's easy enough to support both in the parser, so we might as well have
both and see how people use it while the feature is experimental.

[1]: https://rust-lang.zulipchat.com/#narrow/channel/481571-t-lang.2Fgen/topic/postfix-yield/with/505231568
This involved fixing the span when parsing .yield
Parameter patterns are lowered to an `Ident` by
`lower_fn_params_to_names`, which is used when lowering bare function
types, trait methods, and foreign functions. Currently, there are two
exceptional cases where the lowered param can become an empty `Ident`.

- If the incoming pattern is an empty `Ident`. This occurs if the
  parameter is anonymous, e.g. in a bare function type.

- If the incoming pattern is neither an ident nor an underscore. Any
  such parameter will have triggered a compile error (hence the
  `span_delayed_bug`), but lowering still occurs.

This commit replaces these empty `Ident` results with `None`, which
eliminates a number of `kw::Empty` uses, and makes it impossible to fail
to check for these exceptional cases.

Note: the `FIXME` comment in `is_unwrap_or_empty_symbol` is removed. It
actually should have been removed in rust-lang#138482, the precursor to this PR.
That PR changed the lowering of wild patterns to `_` symbols instead of
empty symbols, which made the mentioned underscore check load-bearing.
This is currently unused, but paves the way for future work on expansion
regions without having to worry about the FFI parts.
For expansion region support, we will want to be able to convert and check
spans before creating a corresponding local file ID.

If we create local file IDs eagerly, but some expansion turns out to have no
successfully-converted spans, LLVM will complain about that expansion's file ID
having no regions.
Because it's way too easy to confuse that versus trying to ping WG-llvm.
And AFAIK, icebreakers-llvm isn't really used in a good while.
Add support for postfix yield expressions

We've been having a discussion about whether we want postfix yield, or want to stick with prefix yield, or have both. I figured it's easy enough to support both for now and let us play around with them while the feature is still experimental.

This PR treats `yield x` and `x.yield` as semantically equivalent. There was a suggestion to make `yield x` have a `()` type (so it only works in coroutines with `Resume = ()`. I think that'd be worth trying, either in a later PR, or before this one merges, depending on people's opinions.

rust-lang#43122
…owered-param-names, r=compiler-errors

Use `Option<Ident>` for lowered param names.

Parameter patterns are lowered to an `Ident` by `lower_fn_params_to_names`, which is used when lowering bare function types, trait methods, and foreign functions. Currently, there are two exceptional cases where the lowered param can become an empty `Ident`.

- If the incoming pattern is an empty `Ident`. This occurs if the parameter is anonymous, e.g. in a bare function type.

- If the incoming pattern is neither an ident nor an underscore. Any such parameter will have triggered a compile error (hence the `span_delayed_bug`), but lowering still occurs.

This commit replaces these empty `Ident` results with `None`, which eliminates a number of `kw::Empty` uses, and makes it impossible to fail to check for these exceptional cases.

Note: the `FIXME` comment in `is_unwrap_or_empty_symbol` is removed. It actually should have been removed in rust-lang#138482, the precursor to this PR. That PR changed the lowering of wild patterns to `_` symbols instead of empty symbols, which made the mentioned underscore check load-bearing.

r? ```@compiler-errors```
Suggest `-Whelp` when pass `--print lints` to rustc

Closes rust-lang#138612
…mease

Do not rely on `type_var_origin` in `OrphanCheckErr::NonLocalInputType`

The ordering of ty var unification means that we may end up with a root variable whose ty var origin is from another item's params.

Let's not rely on this by just unifying the infer vars with the params of the impl + resolving. It's kinda goofy but it's clearer IMO.

Fixes rust-lang#132826.

r? ``@fmease`` or ``@lcnr``
Clean up `FnCtxt::resolve_coroutine_interiors`

Random cleanups before I make a PR that stalls generator obligations.

r? lcnr
coverage: Add LLVM plumbing for expansion regions

This is currently unused, but paves the way for future work on expansion regions without having to worry about the FFI parts.

The span conversion refactoring is only loosely related, but I've included it here because it would conflict with the main changes in `fill_region_tables`, and is pretty straightforward on its own.
Use `def_path_str` for def id arg in `UnsupportedOpInfo`

We could alternatively just omit the def path from the label, but I think it's fine to keep around

Fixes rust-lang#138730
Remove `llvm` and `llvms` triagebot ping aliases for `icebreakers-llvm` ping group

Because it's way too easy to confuse LLVM Icebreakers ping group versus trying to ping WG-llvm.
And AFAIK, icebreakers-llvm isn't really used in a good while.

I also fixed the rustc-dev-guide docs about ```@rustbot`` ping llvm` (and changed that to the raw ping group name ```@rustbot`` icebreakers-llvm`) because it's very confusing.

Previously discussed in [#t-compiler/wg-llvm > Ping group renaming](https://rust-lang.zulipchat.com/#narrow/channel/187780-t-compiler.2Fwg-llvm/topic/Ping.20group.20renaming/with/453005029).

FYI ``@rust-lang/wg-llvm``
FYI ``@RalfJung`` (since you asked in rust-lang#138120 (comment))
r? ``@nikic`` (or wg-llvm)
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Mar 20, 2025
@rustbot rustbot added the rollup A PR which is a rollup label Mar 20, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 20, 2025

📌 Commit 4a87516 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 20, 2025
@bors
Copy link
Contributor

bors commented Mar 21, 2025

⌛ Testing commit 4a87516 with merge 01dc45c...

@bors
Copy link
Contributor

bors commented Mar 21, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 01dc45c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 21, 2025
@bors bors merged commit 01dc45c into rust-lang:master Mar 21, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 21, 2025
Copy link

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing eda7820 (parent) -> 01dc45c (this PR)

Test differences

Show 32888 test diffs
  • arc::shared_from_iter_normal (stage 1): pass -> [missing] (J0)
  • array::array_rsplit_array_mut_out_of_bounds (stage 1): pass -> [missing] (J0)
  • ascii::test_to_ascii_uppercase (stage 2): [missing] -> pass (J0)
  • ascii_char::test_debug_control (stage 1): pass -> [missing] (J0)
  • c_str2::build_with_zero2 (stage 2): [missing] -> pass (J0)
  • cell::ref_mut_map_accessor (stage 1): pass -> [missing] (J0)
  • cell::refcell_default (stage 2): [missing] -> pass (J0)
  • collections::binary_heap::test_drain (stage 1): pass -> [missing] (J0)
  • collections::btree::map::tests::cursor_peek_prev_agrees_with_cursor_mut (stage 1): pass -> [missing] (J0)
  • collections::btree::map::tests::test_extract_if::height_0_keeping_one (stage 2): [missing] -> pass (J0)
  • collections::hash::map::tests::test_find (stage 1): pass -> [missing] (J0)
  • f32::test_classify (stage 2): [missing] -> pass (J0)
  • f64::test_nan (stage 1): pass -> [missing] (J0)
  • fmt::test_format_flags (stage 1): pass -> [missing] (J0)
  • intrinsics::test_assume_can_be_in_const_contexts (stage 1): pass -> [missing] (J0)
  • io::borrowed_buf::advance_filled (stage 1): pass -> [missing] (J0)
  • io::cursor::tests::read_to_end (stage 2): [missing] -> pass (J0)
  • io::tests::test_take_wrong_length (stage 2): [missing] -> pass (J0)
  • iter::adapters::map_windows::output_n1 (stage 1): pass -> [missing] (J0)
  • iter::adapters::skip::test_skip_non_fused_nth_overflow (stage 1): pass -> [missing] (J0)
  • iter::adapters::take::test_iterator_take (stage 2): [missing] -> pass (J0)
  • join_paths_unix (stage 2): [missing] -> pass (J0)
  • mpmc::oneshot_single_thread_peek_close (stage 1): pass -> [missing] (J0)
  • mpmc::send_from_outside_runtime (stage 2): [missing] -> pass (J0)
  • net::ip_addr::ipv6_const (stage 1): pass -> [missing] (J0)
  • num::dec2flt::decimal_seq::test_trim (stage 1): pass -> [missing] (J0)
  • num::i32::test_widening_mul (stage 2): [missing] -> pass (J0)
  • num::i64::test_from_str (stage 1): pass -> [missing] (J0)
  • num::i8::test_borrowing_sub (stage 1): pass -> [missing] (J0)
  • num::i8::test_unbounded_shl (stage 2): [missing] -> pass (J0)
  • num::test_i8f32 (stage 1): pass -> [missing] (J0)
  • num::test_try_i128i8 (stage 1): pass -> [missing] (J0)
  • num::u16::test_num (stage 2): [missing] -> pass (J0)
  • num::u64::test_count_ones (stage 2): [missing] -> pass (J0)
  • num::u64::test_swap_bytes (stage 2): [missing] -> pass (J0)
  • num::u8::test_reverse_bits (stage 2): [missing] -> pass (J0)
  • only_one_source (stage 2): [missing] -> pass (J0)
  • rc::test_from_box_trait_zero_sized (stage 1): pass -> [missing] (J0)
  • rwlock::panic_while_mapping_write_unlocked_poison (stage 2): [missing] -> pass (J0)
  • slice::test_get (stage 1): pass -> [missing] (J0)
  • slice::test_get_disjoint_mut_range_empty_at_edge (stage 2): [missing] -> pass (J0)
  • slice::test_split_iterators_size_hint (stage 1): pass -> [missing] (J0)
  • sort::tests::stable::correct_i32_random_s95 (stage 1): pass -> [missing] (J0)
  • sort::tests::stable::correct_i32_random_s95 (stage 2): [missing] -> pass (J0)
  • str::slice_index::boundary::rangefrom::pass (stage 2): [missing] -> pass (J0)
  • vec::test_drain_items_reverse (stage 2): [missing] -> pass (J0)
  • sort::tests::stable::correct_u64_random_d20 (stage 1): ignore -> [missing] (J1)
  • sort::tests::stable::panic_retain_orig_set_i32_saw_mixed (stage 2): [missing] -> ignore (J1)
  • sort::tests::stable::self_cmp_cell_i32_random (stage 1): ignore -> [missing] (J1)
  • sort::tests::stable::self_cmp_string_random_d20 (stage 1): ignore -> [missing] (J1)
  • sort::tests::unstable::correct_cell_i32_random_d2 (stage 1): ignore -> [missing] (J1)
  • sort::tests::unstable::correct_u64_random (stage 2): [missing] -> ignore (J1)
  • sort::tests::unstable::self_cmp_string_saw_mixed (stage 1): ignore -> [missing] (J1)
  • sort::tests::unstable::violate_ord_retain_orig_set_cell_i32_random_d20 (stage 2): [missing] -> ignore (J1)
  • ascii::is_ascii::unaligned_tail_long::case01_iter_all (stage 1): pass -> [missing] (J2)
  • ascii::long::case09_mask_mult_bool_branchy_lookup_table (stage 2): [missing] -> pass (J2)
  • ascii::short::is_ascii_whitespace (stage 1): pass -> [missing] (J2)
  • fs::tests::file_test_io_read_write_at (stage 1): pass -> [missing] (J2)
  • hash::sip::bench_bytes_c_128 (stage 1): pass -> [missing] (J2)
  • hash::sip::bench_u32_keyed (stage 1): pass -> [missing] (J2)
  • net::socket_addr::tests::compare (stage 1): pass -> [missing] (J2)
  • net::tcp::tests::read_vectored (stage 2): [missing] -> pass (J2)
  • net::tcp::tests::write_close (stage 1): pass -> [missing] (J2)
  • num::bench_i32_from_str_radix_16 (stage 2): [missing] -> pass (J2)
  • os::unix::net::tests::test_unix_stream_timeout_zero_duration (stage 1): pass -> [missing] (J2)
  • process::tests::test_interior_nul_in_arg_is_error (stage 2): [missing] -> pass (J2)
  • slice::rotate_huge_by1234577_bytes (stage 1): pass -> [missing] (J2)
  • slice::rotate_usize (stage 2): [missing] -> pass (J2)
  • sort::tests::stable::observable_is_less_saw_mixed (stage 1): pass -> [missing] (J2)
  • str::char_count::emoji_medium::case03_manual_char_len (stage 2): [missing] -> pass (J2)
  • str::debug::mostly_unicode (stage 2): [missing] -> pass (J2)
  • str::ends_with_ascii_char::short_pile_of_poo (stage 2): [missing] -> pass (J2)
  • str::find_zzz_char::short_pile_of_poo (stage 2): [missing] -> pass (J2)
  • str::starts_with_str::short_mixed (stage 1): pass -> [missing] (J2)
  • vec::bench_from_slice_0010 (stage 1): pass -> [missing] (J2)
  • doctest::tests::make_test_with_main (stage 1): pass -> [missing] (J3)
  • errors::verify_builtin_macros_env_not_defined_54 (stage 2): [missing] -> pass (J3)
  • errors::verify_const_eval_unallowed_inline_asm_22 (stage 2): [missing] -> pass (J3)
  • errors::verify_expand_invalid_cfg_no_predicate_23 (stage 1): pass -> [missing] (J3)
  • errors::verify_expand_trace_macro_33 (stage 2): [missing] -> pass (J3)
  • errors::verify_incremental_undefined_clean_dirty_assertions_item_6 (stage 2): [missing] -> pass (J3)
  • errors::verify_interface_cant_emit_mir_11 (stage 2): [missing] -> pass (J3)
  • errors::verify_metadata_no_link_mod_override_37 (stage 2): [missing] -> pass (J3)
  • errors::verify_metadata_wasm_c_abi_75 (stage 1): pass -> [missing] (J3)
  • errors::verify_mir_build_could_not_eval_const_pattern_4 (stage 2): [missing] -> pass (J3)
  • errors::verify_mir_build_lower_range_bound_must_be_less_than_or_equal_to_upper_5 (stage 1): pass -> [missing] (J3)
  • errors::verify_passes_break_inside_closure_128 (stage 1): pass -> [missing] (J3)
  • errors::verify_passes_doc_attr_not_crate_level_39 (stage 2): [missing] -> pass (J3)
  • errors::verify_passes_missing_const_err_161 (stage 2): [missing] -> pass (J3)
  • errors::verify_passes_naked_functions_must_naked_asm_135 (stage 2): [missing] -> pass (J3)
  • errors::verify_trait_selection_lf_bound_not_satisfied_17 (stage 2): [missing] -> pass (J3)
  • errors::verify_trait_selection_unable_to_construct_constant_value_7 (stage 1): pass -> [missing] (J3)
  • graph::implementation::tests::each_adjacent_from_c (stage 1): pass -> [missing] (J3)
  • lints::verify_lint_variant_size_differences_85 (stage 2): [missing] -> pass (J3)
  • source_map::tests::t6 (stage 1): pass -> [missing] (J3)
  • spec::tests::thumbv7a_pc_windows_msvc (stage 1): pass -> [missing] (J3)
  • spec::tests::x86_64h_apple_darwin (stage 2): [missing] -> pass (J3)
  • tests::bench_noncopy (stage 2): [missing] -> pass (J3)
  • tests::invalid06 (stage 1): pass -> [missing] (J3)
  • tests::test_externs_tracking_hash_different_construction_order (stage 1): pass -> [missing] (J3)

(and 16356 additional test diffs)

Additionally, 16432 doctest diffs were found. These are ignored, as they are noisy.

Job group index

  • J0: aarch64-apple, test-various, x86_64-apple-1, x86_64-gnu-aux
  • J1: x86_64-gnu-aux
  • J2: aarch64-apple, test-various, x86_64-apple-1
  • J3: aarch64-apple, x86_64-apple-1

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (01dc45c): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary 3.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.8% [3.8%, 3.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (secondary 2.4%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.4% [1.4%, 3.1%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 774.102s -> 774.81s (0.09%)
Artifact size: 365.52 MiB -> 365.53 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustc-dev-guide Area: rustc-dev-guide merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants