rust/compiler
ia0 db0b491258 Fix short linker error output
This PR does 2 things:

- It removes the braces when there's a single element. This is required since brace expansion (at
  least in bash and zsh) only triggers if there's at least 2 elements.

- It removes the extra `.rlib` suffixes of the elements. See
  https://github.com/rust-lang/rust/pull/135707#discussion_r2185212393 for context.

Running `cargo +stage1 build` on the following program:

```rust
unsafe extern "C" {
    fn foo() -> libc::c_int;
}

fn main() {
    let x = unsafe { foo() } as u32;
    // println!("{}", data_encoding::BASE64.encode(&x.to_le_bytes()));
}
```

Gives the following diff before and after the PR:

```diff
-/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib}.rlib
+/tmp/foo/target/debug/deps/liblibc-faf416f178830595.rlib
```

Running on the same program with the additional dependency, we get the following diff:

```diff
-/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib,libdata_encoding-84bb5aadfa9e8839.rlib}.rlib
+/tmp/foo/target/debug/deps/{liblibc-faf416f178830595,libdata_encoding-84bb5aadfa9e8839}.rlib
```

Do we want to add a UI test?
2025-07-05 11:07:03 +02:00
..
rustc Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_abi Remove PointerLike trait 2025-07-03 20:03:49 +00:00
rustc_arena Introduce Arena::try_alloc_from_iter. 2025-04-19 01:13:18 +00:00
rustc_ast Rollup merge of #143380 - cjgillot:kw_span, r=compiler-errors 2025-07-04 05:47:27 +02:00
rustc_ast_ir Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_ast_lowering Rollup merge of #143380 - cjgillot:kw_span, r=compiler-errors 2025-07-04 05:47:27 +02:00
rustc_ast_passes Rollup merge of #143380 - cjgillot:kw_span, r=compiler-errors 2025-07-04 05:47:27 +02:00
rustc_ast_pretty Remove support for dyn* 2025-07-01 19:00:21 +00:00
rustc_attr_data_structures Port #[non_exhaustive] to the new attribute parsing infrastructure 2025-07-04 20:30:42 +02:00
rustc_attr_parsing Port #[non_exhaustive] to the new attribute parsing infrastructure 2025-07-04 20:30:42 +02:00
rustc_baked_icu_data Add unreachable_pub to RUSTC_LINT_FLAGS for compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_borrowck Auto merge of #143036 - compiler-errors:no-dyn-star, r=oli-obk 2025-07-01 21:50:21 +00:00
rustc_builtin_macros Rollup merge of #143380 - cjgillot:kw_span, r=compiler-errors 2025-07-04 05:47:27 +02:00
rustc_codegen_cranelift Make __rust_alloc_error_handler_should_panic a function 2025-07-03 10:52:21 -07:00
rustc_codegen_gcc Make __rust_alloc_error_handler_should_panic a function 2025-07-03 10:52:21 -07:00
rustc_codegen_llvm Rollup merge of #143387 - dpaoliello:shouldpanicfn, r=bjorn3 2025-07-04 16:22:36 +02:00
rustc_codegen_ssa Fix short linker error output 2025-07-05 11:07:03 +02:00
rustc_const_eval Rollup merge of #142876 - JonathanBrouwer:target_feature_parser, r=oli-obk 2025-07-03 13:29:36 +02:00
rustc_data_structures Rollup merge of #143406 - scottmcm:did-we-need-that-unsafe, r=compiler-errors 2025-07-05 00:12:10 +02:00
rustc_driver Remove recursion_limit increases. 2025-04-02 16:25:27 +11:00
rustc_driver_impl Rollup merge of #143019 - danielframpton:codegen-backend-parse, r=bjorn3 2025-06-30 20:49:40 +02:00
rustc_error_codes compiler: Trim the misleading C of C-cmse from errors 2025-06-25 00:52:10 -07:00
rustc_error_messages Remove unused feature gates 2025-06-28 23:36:46 +00:00
rustc_errors Rollup merge of #143417 - klensy:termize, r=jieyouxu 2025-07-04 16:22:37 +02:00
rustc_expand Rollup merge of #143408 - joshtriplett:fix-mbe-parser, r=compiler-errors 2025-07-05 00:12:11 +02:00
rustc_feature Auto merge of #143214 - camsteffen:remove-let-chains-feature, r=est31 2025-07-02 17:18:47 +00:00
rustc_fluent_macro Remove all unused feature gates from the compiler 2025-06-08 14:50:42 +00:00
rustc_fs_util Retry if creating temp fails with access denied 2025-04-25 11:28:36 +00:00
rustc_graphviz Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_hashes Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_hir Remove PointerLike trait 2025-07-03 20:03:49 +00:00
rustc_hir_analysis Port #[non_exhaustive] to the new attribute parsing infrastructure 2025-07-04 20:30:42 +02:00
rustc_hir_pretty Remove support for dyn* 2025-07-01 19:00:21 +00:00
rustc_hir_typeck Rollup merge of #143394 - workingjubilee:reorganize-hir-analysis-provide-fn, r=compiler-errors 2025-07-04 05:47:28 +02:00
rustc_incremental Auto merge of #139758 - Zoxc:thread-local-graph, r=oli-obk 2025-05-07 12:39:54 +00:00
rustc_index index: add method for checking range on DenseBitSet 2025-06-04 00:47:12 +02:00
rustc_index_macros In rustc_mir_tranform, iterate over index newtypes instead of ints 2025-04-12 11:53:07 +00:00
rustc_infer Update cfg(bootstrap) 2025-07-01 10:55:49 -07:00
rustc_interface Save metadata among work products. 2025-07-04 14:02:17 +00:00
rustc_lexer setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
rustc_lint Port #[rustc_pass_by_value] to the new attribute system 2025-07-04 00:07:56 +03:00
rustc_lint_defs setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
rustc_llvm rustc_llvm: add Windows system libs only when cross-compiling from Windows 2025-05-31 15:47:14 +02:00
rustc_log Add documentation for init_logger_with_additional_layer 2025-06-12 12:11:15 +02:00
rustc_macros Rollup merge of #134006 - klensy:typos, r=nnethercote 2025-07-03 13:29:35 +02:00
rustc_metadata Add comment and move assertion. 2025-07-04 14:02:18 +00:00
rustc_middle Rollup merge of #143372 - cjgillot:bare-glob-map, r=petrochenkov 2025-07-05 00:12:09 +02:00
rustc_mir_build treat box patterns as deref patterns in THIR and usefulness analysis 2025-07-04 01:28:35 -07:00
rustc_mir_dataflow mir: Use the new method for BasicBlockData 2025-06-29 20:39:13 +08:00
rustc_mir_transform Auto merge of #142890 - kornelski:unused-var-debug, r=saethlin 2025-07-03 23:17:03 +00:00
rustc_monomorphize setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
rustc_next_trait_solver setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
rustc_parse Port #[non_exhaustive] to the new attribute parsing infrastructure 2025-07-04 20:30:42 +02:00
rustc_parse_format update to literal-escaper 0.0.4 for better API without unreachable and faster string parsing 2025-06-23 06:36:22 +00:00
rustc_passes Port #[non_exhaustive] to the new attribute parsing infrastructure 2025-07-04 20:30:42 +02:00
rustc_pattern_analysis treat box patterns as deref patterns in THIR and usefulness analysis 2025-07-04 01:28:35 -07:00
rustc_privacy Reorder fields in hir::ItemKind variants. 2025-05-30 02:23:20 +10:00
rustc_proc_macro update to literal-escaper 0.0.4 for better API without unreachable and faster string parsing 2025-06-23 06:36:22 +00:00
rustc_query_impl Reuse metadata file from work products. 2025-07-04 14:02:17 +00:00
rustc_query_system setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
rustc_resolve Port #[non_exhaustive] to the new attribute parsing infrastructure 2025-07-04 20:30:42 +02:00
rustc_sanitizers Remove support for dyn* 2025-07-01 19:00:21 +00:00
rustc_serialize setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
rustc_session Rollup merge of #143417 - klensy:termize, r=jieyouxu 2025-07-04 16:22:37 +02:00
rustc_smir refactor: implement a new bridge trait Allocation 2025-07-04 01:57:47 +00:00
rustc_span Remove PointerLike trait 2025-07-03 20:03:49 +00:00
rustc_symbol_mangling Remove support for dyn* 2025-07-01 19:00:21 +00:00
rustc_target Rollup merge of #134006 - klensy:typos, r=nnethercote 2025-07-03 13:29:35 +02:00
rustc_thread_pool Apply suggestions from code review 2025-06-16 12:27:47 -07:00
rustc_trait_selection Rollup merge of #143308 - compiler-errors:no-pointer-like, r=oli-obk 2025-07-04 16:22:35 +02:00
rustc_traits Remove fast path from codegen_select, since Sized has no methods 2025-07-02 00:33:06 +00:00
rustc_transmute tag_for_variant: properly pass TypingEnv 2025-06-27 17:04:33 +02:00
rustc_ty_utils Rollup merge of #134006 - klensy:typos, r=nnethercote 2025-07-03 13:29:35 +02:00
rustc_type_ir setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
rustc_type_ir_macros Split TypeFolder and FallibleTypeFolder 2025-04-15 18:30:35 +00:00
stable_mir Change rustc_driver dependency on stable_mir crate 2025-04-30 15:39:52 -07:00