Uh oh!
There was an error while loading. Please reload this page.
Emit error for unused target expression in glob and list delegations - #157601
Conversation
This comment has been minimized.
This comment has been minimized.
e6b6c5e to
c967907CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
aerooneqq
commented
Jun 9, 2026
@rustbot ready |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
aerooneqq
commented
Jun 10, 2026
@rustbot ready |
aerooneqq
commented
Jun 10, 2026
Added support for list delegations too, changes are not that big and connected to this PR (I've used |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
aerooneqq
commented
Jun 10, 2026
@rustbot ready |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
petrochenkov
commented
Jun 10, 2026
…target-expr-error, r=petrochenkov Emit error for unused target expression in glob and list delegations This PR emits error if unuse target expression is specified for glob delegation. Second part of rust-lang#156798. Part of rust-lang#118212. r? @petrochenkov
…uwer Rollup of 14 pull requests Successful merges: - #157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty) - #157282 (Fix post-monomorphization error note race in the parallel frontend) - #157352 (Make the retained dep graph deterministic under the parallel frontend) - #157601 (Emit error for unused target expression in glob and list delegations) - #157626 (Autogenerate unstable compiler flag stubs for unstable-book) - #157647 (Start using comptime for reflection intrinsics and their wrapper functions) - #157013 (Ensure inferred let pattern types are well-formed) - #157288 (platform support: add SNaN erratum to MIPS targets) - #157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs) - #157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust …) - #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N)) - #157691 (Move symbol hiding code to a new file) - #157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N)) - #157703 (Fix doc link to Instant sub in saturating caveat) Failed merges: - #157699 (Arg splat experiment - hir FnDecl impl)
…uwer Rollup of 14 pull requests Successful merges: - #157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty) - #157282 (Fix post-monomorphization error note race in the parallel frontend) - #157352 (Make the retained dep graph deterministic under the parallel frontend) - #157601 (Emit error for unused target expression in glob and list delegations) - #157626 (Autogenerate unstable compiler flag stubs for unstable-book) - #157647 (Start using comptime for reflection intrinsics and their wrapper functions) - #157013 (Ensure inferred let pattern types are well-formed) - #157288 (platform support: add SNaN erratum to MIPS targets) - #157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs) - #157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust …) - #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N)) - #157691 (Move symbol hiding code to a new file) - #157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N)) - #157703 (Fix doc link to Instant sub in saturating caveat) Failed merges: - #157699 (Arg splat experiment - hir FnDecl impl)
…target-expr-error, r=petrochenkov Emit error for unused target expression in glob and list delegations This PR emits error if unuse target expression is specified for glob delegation. Second part of rust-lang#156798. Part of rust-lang#118212. r? @petrochenkov
…target-expr-error, r=petrochenkov Emit error for unused target expression in glob and list delegations This PR emits error if unuse target expression is specified for glob delegation. Second part of rust-lang#156798. Part of rust-lang#118212. r? @petrochenkov
Rollup of 23 pull requests Successful merges: - #157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty) - #157282 (Fix post-monomorphization error note race in the parallel frontend) - #157352 (Make the retained dep graph deterministic under the parallel frontend) - #157601 (Emit error for unused target expression in glob and list delegations) - #157611 (Update `browser-ui-test` version to `0.24.0`) - #157620 (Add a strategy FnMut to inject behavior into the flush cycle) - #157645 (Windows TLS - Only register the `atexit` hook when `cleanup` can be unloaded) - #157647 (Start using comptime for reflection intrinsics and their wrapper functions) - #157719 (resolve: Partially revert "Remove a special case for dummy imports") - #156497 (fix-155516: Don't suggest wrong unwrap expect) - #156583 (Support defaults for static EIIs) - #157013 (Ensure inferred let pattern types are well-formed) - #157230 (borrowck: avoid ICE describing fields on generic params) - #157288 (platform support: add SNaN erratum to MIPS targets) - #157350 (compiletest: ignore SVG `y` offset in by-lines comparison) - #157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs) - #157384 (Add `#[rustc_dump_generics]` attribute) - #157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust 2015 when used in `dyn + dyn`) - #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N)) - #157691 (Move symbol hiding code to a new file) - #157697 (Add more tests that exercise the well-formedness checking of lazy type aliases) - #157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N)) - #157703 (Fix doc link to Instant sub in saturating caveat) Failed merges: - #157699 (Arg splat experiment - hir FnDecl impl)
Rollup of 23 pull requests Successful merges: - #157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty) - #157282 (Fix post-monomorphization error note race in the parallel frontend) - #157352 (Make the retained dep graph deterministic under the parallel frontend) - #157601 (Emit error for unused target expression in glob and list delegations) - #157611 (Update `browser-ui-test` version to `0.24.0`) - #157620 (Add a strategy FnMut to inject behavior into the flush cycle) - #157645 (Windows TLS - Only register the `atexit` hook when `cleanup` can be unloaded) - #157647 (Start using comptime for reflection intrinsics and their wrapper functions) - #157719 (resolve: Partially revert "Remove a special case for dummy imports") - #156497 (fix-155516: Don't suggest wrong unwrap expect) - #156583 (Support defaults for static EIIs) - #157013 (Ensure inferred let pattern types are well-formed) - #157230 (borrowck: avoid ICE describing fields on generic params) - #157288 (platform support: add SNaN erratum to MIPS targets) - #157350 (compiletest: ignore SVG `y` offset in by-lines comparison) - #157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs) - #157384 (Add `#[rustc_dump_generics]` attribute) - #157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust 2015 when used in `dyn + dyn`) - #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N)) - #157691 (Move symbol hiding code to a new file) - #157697 (Add more tests that exercise the well-formedness checking of lazy type aliases) - #157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N)) - #157703 (Fix doc link to Instant sub in saturating caveat) Failed merges: - #157699 (Arg splat experiment - hir FnDecl impl)
…target-expr-error, r=petrochenkov Emit error for unused target expression in glob and list delegations This PR emits error if unuse target expression is specified for glob delegation. Second part of rust-lang#156798. Part of rust-lang#118212. r? @petrochenkov
…target-expr-error, r=petrochenkov Emit error for unused target expression in glob and list delegations This PR emits error if unuse target expression is specified for glob delegation. Second part of rust-lang#156798. Part of rust-lang#118212. r? @petrochenkov
…target-expr-error, r=petrochenkov Emit error for unused target expression in glob and list delegations This PR emits error if unuse target expression is specified for glob delegation. Second part of rust-lang#156798. Part of rust-lang#118212. r? @petrochenkov
…target-expr-error, r=petrochenkov Emit error for unused target expression in glob and list delegations This PR emits error if unuse target expression is specified for glob delegation. Second part of rust-lang#156798. Part of rust-lang#118212. r? @petrochenkov
Rollup of 31 pull requests Successful merges: - #141030 (Expand free alias types during variance computation) - #154853 (mgca: Register `ConstArgHasType` when normalizing projection consts) - #155527 (Replace printables table with `unicode_data.rs` tables) - #156629 (Stabilize `core::range::{legacy, RangeFull, RangeTo}`) - #157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty) - #157282 (Fix post-monomorphization error note race in the parallel frontend) - #157352 (Make the retained dep graph deterministic under the parallel frontend) - #157601 (Emit error for unused target expression in glob and list delegations) - #157611 (Update `browser-ui-test` version to `0.24.0`) - #157620 (Add a strategy FnMut to inject behavior into the flush cycle) - #157645 (Windows TLS - Only register the `atexit` hook when `cleanup` can be unloaded) - #157646 (Keep rename-imported main alive in dead-code analysis under `--test`) - #157647 (Start using comptime for reflection intrinsics and their wrapper functions) - #157719 (resolve: Partially revert "Remove a special case for dummy imports") - #155153 (Ensure Send/Sync is not implemented for std::env::Vars{,Os}) - #155198 (fix(mgca): Allow specifying generic args (of enum) on enum itself in unit & tuple variant constructions in (direct) const args) - #155323 (refactor `TypeRelativePath::AssocItem` to use `AliasTerm`) - #156497 (fix-155516: Don't suggest wrong unwrap expect) - #156583 (Support defaults for static EIIs) - #157013 (Ensure inferred let pattern types are well-formed) - #157196 (Only suggest reborrowing a moved value where the reborrow is valid) - #157230 (borrowck: avoid ICE describing fields on generic params) - #157288 (platform support: add SNaN erratum to MIPS targets) - #157330 (remove `IsTypeConst` from `hir::TraitItemKind`) - #157350 (compiletest: ignore SVG `y` offset in by-lines comparison) - #157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs) - #157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust 2015 when used in `dyn + dyn`) - #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N)) - #157691 (Move symbol hiding code to a new file) - #157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N)) - #157703 (Fix doc link to Instant sub in saturating caveat) Failed merges: - #157699 (Arg splat experiment - hir FnDecl impl)
Uh oh!
There was an error while loading. Please reload this page.
Rollup merge of #157601 - aerooneqq:delegation-glob-useless-target-expr-error, r=petrochenkov Emit error for unused target expression in glob and list delegations This PR emits error if unuse target expression is specified for glob delegation. Second part of #156798. Part of #118212. r? @petrochenkov
Rollup of 31 pull requests Successful merges: - rust-lang#141030 (Expand free alias types during variance computation) - rust-lang#154853 (mgca: Register `ConstArgHasType` when normalizing projection consts) - rust-lang#155527 (Replace printables table with `unicode_data.rs` tables) - rust-lang#156629 (Stabilize `core::range::{legacy, RangeFull, RangeTo}`) - rust-lang#157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty) - rust-lang#157282 (Fix post-monomorphization error note race in the parallel frontend) - rust-lang#157352 (Make the retained dep graph deterministic under the parallel frontend) - rust-lang#157601 (Emit error for unused target expression in glob and list delegations) - rust-lang#157611 (Update `browser-ui-test` version to `0.24.0`) - rust-lang#157620 (Add a strategy FnMut to inject behavior into the flush cycle) - rust-lang#157645 (Windows TLS - Only register the `atexit` hook when `cleanup` can be unloaded) - rust-lang#157646 (Keep rename-imported main alive in dead-code analysis under `--test`) - rust-lang#157647 (Start using comptime for reflection intrinsics and their wrapper functions) - rust-lang#157719 (resolve: Partially revert "Remove a special case for dummy imports") - rust-lang#155153 (Ensure Send/Sync is not implemented for std::env::Vars{,Os}) - rust-lang#155198 (fix(mgca): Allow specifying generic args (of enum) on enum itself in unit & tuple variant constructions in (direct) const args) - rust-lang#155323 (refactor `TypeRelativePath::AssocItem` to use `AliasTerm`) - rust-lang#156497 (fix-155516: Don't suggest wrong unwrap expect) - rust-lang#156583 (Support defaults for static EIIs) - rust-lang#157013 (Ensure inferred let pattern types are well-formed) - rust-lang#157196 (Only suggest reborrowing a moved value where the reborrow is valid) - rust-lang#157230 (borrowck: avoid ICE describing fields on generic params) - rust-lang#157288 (platform support: add SNaN erratum to MIPS targets) - rust-lang#157330 (remove `IsTypeConst` from `hir::TraitItemKind`) - rust-lang#157350 (compiletest: ignore SVG `y` offset in by-lines comparison) - rust-lang#157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs) - rust-lang#157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust 2015 when used in `dyn + dyn`) - rust-lang#157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N)) - rust-lang#157691 (Move symbol hiding code to a new file) - rust-lang#157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N)) - rust-lang#157703 (Fix doc link to Instant sub in saturating caveat) Failed merges: - rust-lang#157699 (Arg splat experiment - hir FnDecl impl)
Rollup of 31 pull requests Successful merges: - rust-lang#141030 (Expand free alias types during variance computation) - rust-lang#154853 (mgca: Register `ConstArgHasType` when normalizing projection consts) - rust-lang#155527 (Replace printables table with `unicode_data.rs` tables) - rust-lang#156629 (Stabilize `core::range::{legacy, RangeFull, RangeTo}`) - rust-lang#157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty) - rust-lang#157282 (Fix post-monomorphization error note race in the parallel frontend) - rust-lang#157352 (Make the retained dep graph deterministic under the parallel frontend) - rust-lang#157601 (Emit error for unused target expression in glob and list delegations) - rust-lang#157611 (Update `browser-ui-test` version to `0.24.0`) - rust-lang#157620 (Add a strategy FnMut to inject behavior into the flush cycle) - rust-lang#157645 (Windows TLS - Only register the `atexit` hook when `cleanup` can be unloaded) - rust-lang#157646 (Keep rename-imported main alive in dead-code analysis under `--test`) - rust-lang#157647 (Start using comptime for reflection intrinsics and their wrapper functions) - rust-lang#157719 (resolve: Partially revert "Remove a special case for dummy imports") - rust-lang#155153 (Ensure Send/Sync is not implemented for std::env::Vars{,Os}) - rust-lang#155198 (fix(mgca): Allow specifying generic args (of enum) on enum itself in unit & tuple variant constructions in (direct) const args) - rust-lang#155323 (refactor `TypeRelativePath::AssocItem` to use `AliasTerm`) - rust-lang#156497 (fix-155516: Don't suggest wrong unwrap expect) - rust-lang#156583 (Support defaults for static EIIs) - rust-lang#157013 (Ensure inferred let pattern types are well-formed) - rust-lang#157196 (Only suggest reborrowing a moved value where the reborrow is valid) - rust-lang#157230 (borrowck: avoid ICE describing fields on generic params) - rust-lang#157288 (platform support: add SNaN erratum to MIPS targets) - rust-lang#157330 (remove `IsTypeConst` from `hir::TraitItemKind`) - rust-lang#157350 (compiletest: ignore SVG `y` offset in by-lines comparison) - rust-lang#157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs) - rust-lang#157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust 2015 when used in `dyn + dyn`) - rust-lang#157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N)) - rust-lang#157691 (Move symbol hiding code to a new file) - rust-lang#157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N)) - rust-lang#157703 (Fix doc link to Instant sub in saturating caveat) Failed merges: - rust-lang#157699 (Arg splat experiment - hir FnDecl impl)
…or, r=petrochenkov Move unused target expression error to appropriate place and rename it Small cleanup after rust-lang#157601. r? @petrochenkov
…or, r=petrochenkov Move unused target expression error to appropriate place and rename it Small cleanup after rust-lang#157601. r? @petrochenkov
…or, r=petrochenkov Move unused target expression error to appropriate place and rename it Small cleanup after rust-lang#157601. r? @petrochenkov
Rollup merge of #157763 - aerooneqq:delegation-pass-move-error, r=petrochenkov Move unused target expression error to appropriate place and rename it Small cleanup after #157601. r? @petrochenkov
…rochenkov Move unused target expression error to appropriate place and rename it Small cleanup after rust-lang/rust#157601. r? @petrochenkov
Rollup of 31 pull requests Successful merges: - rust-lang/rust#141030 (Expand free alias types during variance computation) - rust-lang/rust#154853 (mgca: Register `ConstArgHasType` when normalizing projection consts) - rust-lang/rust#155527 (Replace printables table with `unicode_data.rs` tables) - rust-lang/rust#156629 (Stabilize `core::range::{legacy, RangeFull, RangeTo}`) - rust-lang/rust#157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty) - rust-lang/rust#157282 (Fix post-monomorphization error note race in the parallel frontend) - rust-lang/rust#157352 (Make the retained dep graph deterministic under the parallel frontend) - rust-lang/rust#157601 (Emit error for unused target expression in glob and list delegations) - rust-lang/rust#157611 (Update `browser-ui-test` version to `0.24.0`) - rust-lang/rust#157620 (Add a strategy FnMut to inject behavior into the flush cycle) - rust-lang/rust#157645 (Windows TLS - Only register the `atexit` hook when `cleanup` can be unloaded) - rust-lang/rust#157646 (Keep rename-imported main alive in dead-code analysis under `--test`) - rust-lang/rust#157647 (Start using comptime for reflection intrinsics and their wrapper functions) - rust-lang/rust#157719 (resolve: Partially revert "Remove a special case for dummy imports") - rust-lang/rust#155153 (Ensure Send/Sync is not implemented for std::env::Vars{,Os}) - rust-lang/rust#155198 (fix(mgca): Allow specifying generic args (of enum) on enum itself in unit & tuple variant constructions in (direct) const args) - rust-lang/rust#155323 (refactor `TypeRelativePath::AssocItem` to use `AliasTerm`) - rust-lang/rust#156497 (fix-155516: Don't suggest wrong unwrap expect) - rust-lang/rust#156583 (Support defaults for static EIIs) - rust-lang/rust#157013 (Ensure inferred let pattern types are well-formed) - rust-lang/rust#157196 (Only suggest reborrowing a moved value where the reborrow is valid) - rust-lang/rust#157230 (borrowck: avoid ICE describing fields on generic params) - rust-lang/rust#157288 (platform support: add SNaN erratum to MIPS targets) - rust-lang/rust#157330 (remove `IsTypeConst` from `hir::TraitItemKind`) - rust-lang/rust#157350 (compiletest: ignore SVG `y` offset in by-lines comparison) - rust-lang/rust#157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs) - rust-lang/rust#157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust 2015 when used in `dyn + dyn`) - rust-lang/rust#157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N)) - rust-lang/rust#157691 (Move symbol hiding code to a new file) - rust-lang/rust#157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N)) - rust-lang/rust#157703 (Fix doc link to Instant sub in saturating caveat) Failed merges: - rust-lang/rust#157699 (Arg splat experiment - hir FnDecl impl)
View all comments
This PR emits error if unuse target expression is specified for glob delegation. Second part of #156798.
Part of #118212.
r? @petrochenkov