Skip to content

Rollup of 11 pull requests #144860

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

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f4b7735
Rename hir const arg walking functions
BoxyUwU Jun 17, 2025
c9264a1
Don't double visit `HirId`s of inferred const/types
BoxyUwU Jun 17, 2025
2411fba
Link to dev-guide docs
BoxyUwU Jun 18, 2025
fa5895e
Reviews
BoxyUwU Jun 25, 2025
19c6815
Multiple bounds checking elision failures
lucarlig Aug 1, 2025
ae2f8d9
Remove the omit_gdb_pretty_printer_section attribute
bjorn3 Jul 31, 2025
2f60cef
`Interner` arg to `EarlyBinder` does not affect auto traits
Veykril Aug 2, 2025
870b58f
Update E0562 to account for the new impl trait positions
Noratrieb Aug 2, 2025
40f587a
Flatten `hash_owner_nodes` with an early-return
Zalathar Aug 2, 2025
d3e597a
Return a struct with named fields from `hash_owner_nodes`
Zalathar Aug 2, 2025
f87e829
update flags for consistency
Kivooeo Aug 2, 2025
8ca7986
update links
Kivooeo Aug 2, 2025
9743573
cargo update
invalid-email-address Aug 3, 2025
2ddf0ca
Change `ProcRes::print_info` to `format_info`
Zalathar Aug 2, 2025
d1d44d4
Consolidate all `ProcRes` unwinds into one code path
Zalathar Aug 2, 2025
1063b0f
Change `TestCx::error` to `error_prefix`, which returns a string
Zalathar Aug 2, 2025
caa3cf1
explicit tail call tests with indirect operands in LLVM, small test f…
Borgerr Aug 3, 2025
f6dcf30
Rollup merge of #142678 - BoxyUwU:gai_cleanup, r=nnethercote
samueltardieu Aug 3, 2025
4010404
Rollup merge of #144650 - Borgerr:additional-tce-tests, r=WaffleLapkin
samueltardieu Aug 3, 2025
e4985b1
Rollup merge of #144738 - bjorn3:remove_omit_gdb_pretty_printer_secti…
samueltardieu Aug 3, 2025
930a31f
Rollup merge of #144790 - lucarlig:pr-bounds-elision, r=compiler-errors
samueltardieu Aug 3, 2025
04463db
Rollup merge of #144805 - Zalathar:proc-res, r=jieyouxu
samueltardieu Aug 3, 2025
d4fa2b1
Rollup merge of #144808 - Veykril:push-uttkuyswqnzt, r=compiler-errors
samueltardieu Aug 3, 2025
1b08e83
Rollup merge of #144816 - Noratrieb:e0562-impl-trait, r=WaffleLapkin
samueltardieu Aug 3, 2025
4a4c157
Rollup merge of #144822 - Zalathar:hash-owner-nodes, r=compiler-errors
samueltardieu Aug 3, 2025
dc961ce
Rollup merge of #144824 - Kivooeo:update-links, r=Noratrieb
samueltardieu Aug 3, 2025
9a04f64
Rollup merge of #144829 - Kivooeo:strip-flag, r=WaffleLapkin
samueltardieu Aug 3, 2025
ba2c7ba
Rollup merge of #144843 - rust-lang:cargo_update, r=clubby789
samueltardieu Aug 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 39 additions & 38 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,9 @@ dependencies = [

[[package]]
name = "clap"
version = "4.5.41"
version = "4.5.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9"
checksum = "ed87a9d530bb41a67537289bafcac159cb3ee28460e0a4571123d2a778a6a882"
dependencies = [
"clap_builder",
"clap_derive",
Expand All @@ -538,9 +538,9 @@ dependencies = [

[[package]]
name = "clap_builder"
version = "4.5.41"
version = "4.5.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d"
checksum = "64f4f3f3c77c94aff3c7e9aac9a2ca1974a5adf392a8bb751e827d6d127ab966"
dependencies = [
"anstream",
"anstyle",
Expand Down Expand Up @@ -1171,7 +1171,7 @@ checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"
dependencies = [
"libc",
"option-ext",
"redox_users 0.5.0",
"redox_users 0.5.2",
"windows-sys 0.60.2",
]

Expand Down Expand Up @@ -2094,9 +2094,9 @@ dependencies = [

[[package]]
name = "jsonpath-rust"
version = "1.0.3"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d057f8fd19e20c3f14d3663983397155739b6bc1148dc5cd4c4a1a5b3130eb0"
checksum = "633a7320c4bb672863a3782e89b9094ad70285e097ff6832cddd0ec615beadfa"
dependencies = [
"pest",
"pest_derive",
Expand Down Expand Up @@ -2190,7 +2190,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
dependencies = [
"cfg-if",
"windows-targets 0.53.2",
"windows-targets 0.53.3",
]

[[package]]
Expand All @@ -2201,9 +2201,9 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de"

[[package]]
name = "libredox"
version = "0.1.6"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4488594b9328dee448adb906d8b126d9b7deb7cf5c22161ee591610bb1be83c0"
checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3"
dependencies = [
"bitflags",
"libc",
Expand Down Expand Up @@ -2643,17 +2643,17 @@ dependencies = [

[[package]]
name = "object"
version = "0.37.1"
version = "0.37.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03fd943161069e1768b4b3d050890ba48730e590f57e56d4aa04e7e090e61b4a"
checksum = "b3e3d0a7419f081f4a808147e845310313a39f322d7ae1f996b7f001d6cbed04"
dependencies = [
"crc32fast",
"flate2",
"hashbrown",
"indexmap",
"memchr",
"ruzstd 0.8.1",
"wasmparser 0.234.0",
"wasmparser 0.236.0",
]

[[package]]
Expand Down Expand Up @@ -3167,9 +3167,9 @@ dependencies = [

[[package]]
name = "redox_syscall"
version = "0.5.16"
version = "0.5.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7251471db004e509f4e75a62cca9435365b5ec7bcdff530d612ac7c87c44a792"
checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77"
dependencies = [
"bitflags",
]
Expand All @@ -3187,9 +3187,9 @@ dependencies = [

[[package]]
name = "redox_users"
version = "0.5.0"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b"
checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
dependencies = [
"getrandom 0.2.16",
"libredox",
Expand Down Expand Up @@ -3279,7 +3279,7 @@ dependencies = [
"build_helper",
"gimli 0.32.0",
"libc",
"object 0.37.1",
"object 0.37.2",
"regex",
"serde_json",
"similar",
Expand All @@ -3301,9 +3301,9 @@ dependencies = [

[[package]]
name = "rustc-demangle"
version = "0.1.25"
version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f"
checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace"

[[package]]
name = "rustc-hash"
Expand Down Expand Up @@ -3569,7 +3569,7 @@ dependencies = [
"itertools",
"libc",
"measureme",
"object 0.37.1",
"object 0.37.2",
"rustc-demangle",
"rustc_abi",
"rustc_ast",
Expand Down Expand Up @@ -3607,7 +3607,7 @@ dependencies = [
"cc",
"itertools",
"libc",
"object 0.37.1",
"object 0.37.2",
"pathdiff",
"regex",
"rustc_abi",
Expand Down Expand Up @@ -4642,7 +4642,7 @@ name = "rustc_target"
version = "0.0.0"
dependencies = [
"bitflags",
"object 0.37.1",
"object 0.37.2",
"rustc_abi",
"rustc_data_structures",
"rustc_fs_util",
Expand Down Expand Up @@ -5039,9 +5039,9 @@ dependencies = [

[[package]]
name = "serde_json"
version = "1.0.141"
version = "1.0.142"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3"
checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7"
dependencies = [
"itoa",
"memchr",
Expand Down Expand Up @@ -6099,12 +6099,12 @@ dependencies = [

[[package]]
name = "wasm-encoder"
version = "0.235.0"
version = "0.236.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3bc393c395cb621367ff02d854179882b9a351b4e0c93d1397e6090b53a5c2a"
checksum = "3108979166ab0d3c7262d2e16a2190ffe784b2a5beb963edef154b5e8e07680b"
dependencies = [
"leb128fmt",
"wasmparser 0.235.0",
"wasmparser 0.236.0",
]

[[package]]
Expand Down Expand Up @@ -6144,9 +6144,9 @@ dependencies = [

[[package]]
name = "wasmparser"
version = "0.235.0"
version = "0.236.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "161296c618fa2d63f6ed5fffd1112937e803cb9ec71b32b01a76321555660917"
checksum = "16d1eee846a705f6f3cb9d7b9f79b54583810f1fb57a1e3aea76d1742db2e3d2"
dependencies = [
"bitflags",
"indexmap",
Expand All @@ -6155,22 +6155,22 @@ dependencies = [

[[package]]
name = "wast"
version = "235.0.0"
version = "236.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1eda4293f626c99021bb3a6fbe4fbbe90c0e31a5ace89b5f620af8925de72e13"
checksum = "11d6b6faeab519ba6fbf9b26add41617ca6f5553f99ebc33d876e591d2f4f3c6"
dependencies = [
"bumpalo",
"leb128fmt",
"memchr",
"unicode-width 0.2.1",
"wasm-encoder 0.235.0",
"wasm-encoder 0.236.0",
]

[[package]]
name = "wat"
version = "1.235.0"
version = "1.236.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e777e0327115793cb96ab220b98f85327ec3d11f34ec9e8d723264522ef206aa"
checksum = "cc31704322400f461f7f31a5f9190d5488aaeafb63ae69ad2b5888d2704dcb08"
dependencies = [
"wast",
]
Expand Down Expand Up @@ -6426,7 +6426,7 @@ version = "0.60.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
dependencies = [
"windows-targets 0.53.2",
"windows-targets 0.53.3",
]

[[package]]
Expand Down Expand Up @@ -6462,10 +6462,11 @@ dependencies = [

[[package]]
name = "windows-targets"
version = "0.53.2"
version = "0.53.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef"
checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91"
dependencies = [
"windows-link",
"windows_aarch64_gnullvm 0.53.0",
"windows_aarch64_msvc 0.53.0",
"windows_i686_gnu 0.53.0",
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
);

self.with_parent(const_arg.hir_id, |this| {
intravisit::walk_ambig_const_arg(this, const_arg);
intravisit::walk_const_arg(this, const_arg);
});
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
let bodies = SortedMap::from_presorted_elements(bodies);

// Don't hash unless necessary, because it's expensive.
let (opt_hash_including_bodies, attrs_hash, delayed_lints_hash) =
let rustc_middle::hir::Hashes { opt_hash_including_bodies, attrs_hash, delayed_lints_hash } =
self.tcx.hash_owner_nodes(node, &bodies, &attrs, &delayed_lints, define_opaque);
let num_nodes = self.item_local_id_counter.as_usize();
let (nodes, parenting) = index::index_hir(self.tcx, node, &bodies, num_nodes);
Expand Down
8 changes: 0 additions & 8 deletions compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,3 @@ impl<S: Stage> CombineAttributeParser<S> for TargetFeatureParser {
features
}
}

pub(crate) struct OmitGdbPrettyPrinterSectionParser;

impl<S: Stage> NoArgsAttributeParser<S> for OmitGdbPrettyPrinterSectionParser {
const PATH: &[Symbol] = &[sym::omit_gdb_pretty_printer_section];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::OmitGdbPrettyPrinterSection;
}
6 changes: 2 additions & 4 deletions compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ use crate::attributes::allow_unstable::{
AllowConstFnUnstableParser, AllowInternalUnstableParser, UnstableFeatureBoundParser,
};
use crate::attributes::codegen_attrs::{
ColdParser, CoverageParser, ExportNameParser, NakedParser, NoMangleParser,
OmitGdbPrettyPrinterSectionParser, OptimizeParser, TargetFeatureParser, TrackCallerParser,
UsedParser,
ColdParser, CoverageParser, ExportNameParser, NakedParser, NoMangleParser, OptimizeParser,
TargetFeatureParser, TrackCallerParser, UsedParser,
};
use crate::attributes::confusables::ConfusablesParser;
use crate::attributes::deprecation::DeprecationParser;
Expand Down Expand Up @@ -198,7 +197,6 @@ attribute_parsers!(
Single<WithoutArgs<NoImplicitPreludeParser>>,
Single<WithoutArgs<NoMangleParser>>,
Single<WithoutArgs<NonExhaustiveParser>>,
Single<WithoutArgs<OmitGdbPrettyPrinterSectionParser>>,
Single<WithoutArgs<ParenSugarParser>>,
Single<WithoutArgs<PassByValueParser>>,
Single<WithoutArgs<PointeeParser>>,
Expand Down
8 changes: 1 addition & 7 deletions compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

use rustc_codegen_ssa::base::collect_debugger_visualizers_transitive;
use rustc_codegen_ssa::traits::*;
use rustc_hir::attrs::AttributeKind;
use rustc_hir::def_id::LOCAL_CRATE;
use rustc_hir::find_attr;
use rustc_middle::bug;
use rustc_middle::middle::debugger_visualizer::DebuggerVisualizerType;
use rustc_session::config::{CrateType, DebugInfo};
Expand Down Expand Up @@ -86,9 +84,6 @@ pub(crate) fn get_or_insert_gdb_debug_scripts_section_global<'ll>(
}

pub(crate) fn needs_gdb_debug_scripts_section(cx: &CodegenCx<'_, '_>) -> bool {
let omit_gdb_pretty_printer_section =
find_attr!(cx.tcx.hir_krate_attrs(), AttributeKind::OmitGdbPrettyPrinterSection);

// To ensure the section `__rustc_debug_gdb_scripts_section__` will not create
// ODR violations at link time, this section will not be emitted for rlibs since
// each rlib could produce a different set of visualizers that would be embedded
Expand Down Expand Up @@ -117,8 +112,7 @@ pub(crate) fn needs_gdb_debug_scripts_section(cx: &CodegenCx<'_, '_>) -> bool {
}
});

!omit_gdb_pretty_printer_section
&& cx.sess().opts.debuginfo != DebugInfo::None
cx.sess().opts.debuginfo != DebugInfo::None
&& cx.sess().target.emit_debug_gdb_scripts
&& embed_visualizers
}
5 changes: 3 additions & 2 deletions compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1011,11 +1011,12 @@ fn link_natively(
(Strip::Debuginfo, _) => {
strip_with_external_utility(sess, stripcmd, out_filename, &["--strip-debug"])
}
// Per the manpage, `-x` is the maximum safe strip level for dynamic libraries. (#93988)

// Per the manpage, --discard-all is the maximum safe strip level for dynamic libraries. (#93988)
(
Strip::Symbols,
CrateType::Dylib | CrateType::Cdylib | CrateType::ProcMacro | CrateType::Sdylib,
) => strip_with_external_utility(sess, stripcmd, out_filename, &["-x"]),
) => strip_with_external_utility(sess, stripcmd, out_filename, &["--discard-all"]),
(Strip::Symbols, _) => {
strip_with_external_utility(sess, stripcmd, out_filename, &["--strip-all"])
}
Expand Down
9 changes: 4 additions & 5 deletions compiler/rustc_error_codes/src/error_codes/E0562.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Abstract return types (written `impl Trait` for some trait `Trait`) are only
allowed as function and inherent impl return types.
`impl Trait` is only allowed as a function return and argument type.

Erroneous code example:

Expand All @@ -14,7 +13,7 @@ fn main() {
}
```

Make sure `impl Trait` only appears in return-type position.
Make sure `impl Trait` appears in a function signature.

```
fn count_to_n(n: usize) -> impl Iterator<Item=usize> {
Expand All @@ -28,6 +27,6 @@ fn main() {
}
```

See [RFC 1522] for more details.
See the [reference] for more details on `impl Trait`.

[RFC 1522]: https://github.com/rust-lang/rfcs/blob/master/text/1522-conservative-impl-trait.md
[reference]: https://doc.rust-lang.org/stable/reference/types/impl-trait.html
5 changes: 0 additions & 5 deletions compiler/rustc_feature/src/builtin_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1257,11 +1257,6 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
TEST, rustc_dummy, Normal, template!(Word /* doesn't matter*/),
DuplicatesOk, EncodeCrossCrate::No
),
gated!(
omit_gdb_pretty_printer_section, Normal, template!(Word),
WarnFollowing, EncodeCrossCrate::No,
"the `#[omit_gdb_pretty_printer_section]` attribute is just used for the Rust test suite",
),
rustc_attr!(
TEST, pattern_complexity_limit, CrateLevel, template!(NameValueStr: "N"),
ErrorFollowing, EncodeCrossCrate::No,
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/removed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ declare_features! (
/// Renamed to `dyn_compatible_for_dispatch`.
(removed, object_safe_for_dispatch, "1.83.0", Some(43561),
Some("renamed to `dyn_compatible_for_dispatch`"), 131511),
/// Allows using `#[omit_gdb_pretty_printer_section]`.
(removed, omit_gdb_pretty_printer_section, "CURRENT_RUSTC_VERSION", None, None, 144738),
/// Allows using `#[on_unimplemented(..)]` on traits.
/// (Moved to `rustc_attrs`.)
(removed, on_unimplemented, "1.40.0", None, None, 65794),
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@ declare_features! (
(unstable, multiple_supertrait_upcastable, "1.69.0", None),
/// Allow negative trait bounds. This is an internal-only feature for testing the trait solver!
(internal, negative_bounds, "1.71.0", None),
/// Allows using `#[omit_gdb_pretty_printer_section]`.
(internal, omit_gdb_pretty_printer_section, "1.5.0", None),
/// Set the maximum pattern complexity allowed (not limited by default).
(internal, pattern_complexity_limit, "1.78.0", None),
/// Allows using pattern types.
Expand Down
Loading
Loading