Stuart Cook 216be29176
Rollup merge of #147467 - JonathanBrouwer:double_warnings, r=JonathanBrouwer
Fix double warnings on `#[no_mangle]`

Fixes 2 out of 3 cases in https://github.com/rust-lang/rust/issues/147417
The fix on closures removes the old error and marks closures as an error target.
The fix on consts adds `AllowSilent` to to ignore a target, and uses the old error because that one has a nice suggestion.

r? ````@jdonszelmann````
2025-10-09 18:43:23 +11:00
..