Repository: rust
Issue: Crashed running hello world. 
Labels: I-ICE,T-compiler,C-bug

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.

http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/

-->

### Code

fn main(){
    println!("Hello, world!");
}


### Meta
<!--

-->

`rustc --version --verbose`:
rustc 1.64.0 (a55dd71d5 2022-09-19)
binary: rustc
commit-hash: a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52
commit-date: 2022-09-19
host: aarch64-apple-darwin
release: 1.64.0
LLVM version: 14.0.6
```

### Error output






r: internal compiler error: unexpected panic

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.64.0 (a55dd71d5 2022-09-19) running on aarch64-apple-darwin

query stack during panic:
end of query stack
DELL@MacBook-Pro lib % ./ma
in
zsh: no such file or directory: ./main
DELL@MacBook-Pro lib % rustc main.rs
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: JoinPathsError { inner: JoinPathsError }', compiler/rustc_codegen_ssa/src/back/linker.rs:123:47
stack backtrace:
   0:        0x103c5f978 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1543c132bc4e188c
   1:        0x103cac828 - core::fmt::write::hda8e8eb84b49cbfc
   2:        0x103c52c74 - std::io::Write::write_fmt::hb84c8996aec7120c
   3:        0x103c625d0 - std::panicking::default_hook::{{closure}}::hdf06011cb093de6a
   4:        0x103c62334 - std::panicking::default_hook::hd7ceb942fff7b170
   5:        0x10b2acd9c - rustc_driver[8f8caae8abf9e6c7]::DEFAULT_HOOK::{closure#0}::{closure#0}
   6:        0x103c62ba4 - std::panicking::rust_panic_with_hook::h053d4067a63a6fcb
   7:        0x103c62a3c - std::panicking::begin_panic_handler::{{closure}}::hea9e6c546a23e8ff
   8:        0x103c5fe54 - std::sys_common::backtrace::__rust_end_short_backtrace::hd64e012cf32134c6
   9:        0x103c62794 - _rust_begin_unwind
  10:        0x103cd7808 - core::panicking::panic_fmt::hbfde5533e1c0592e
  11:        0x103cd78f4 - core::result::unwrap_failed::h68832e989a8867c1
  12:        0x10e4b2c3c - rustc_codegen_ssa[fc45fc3b282c156f]::back::linker::get_linker
  13:        0x10e4dd5e8 - rustc_codegen_ssa[fc45fc3b282c156f]::back::link::linker_with_args
  14:        0x10e4d6c7c - rustc_codegen_ssa[fc45fc3b282c156f]::back::link::link_natively
  15:        0x10e4d45e8 - rustc_codegen_ssa[fc45fc3b282c156f]::back::link::link_binary
  16:        0x10b4435cc - <rustc_codegen_llvm[36fb5462eaa6e900]::LlvmCodegenBackend as rustc_codegen_ssa[fc45fc3b282c156f]::traits::backend::CodegenBackend>::link
  17:        0x10b3a9418 - <rustc_interface[efe2b5ffa23206d6]::queries::Linker>::link
  18:        0x10b297334 - rustc_span[a44dd0315ec95fe3]::with_source_map::<core[470b050f2b764c47]::result::Result<(), rustc_errors[b30f6c19c09b5d30]::ErrorGuaranteed>, rustc_interface[efe2b5ffa23206d6]::interface::create_compiler_and_run<core[470b050f2b764c47]::result::Result<(), rustc_errors[b30f6c19c09b5d30]::ErrorGuaranteed>, rustc_driver[8f8caae8abf9e6c7]::run_compiler::{closure#1}>::{closure#1}>
  19:        0x10b24afd0 - <scoped_tls[438d350ce76b615a]::ScopedKey<rustc_span[a44dd0315ec95fe3]::SessionGlobals>>::set::<rustc_interface[efe2b5ffa23206d6]::interface::run_compiler<core[470b050f2b764c47]::result::Result<(), rustc_errors[b30f6c19c09b5d30]::ErrorGuaranteed>, rustc_driver[8f8caae8abf9e6c7]::run_compiler::{closure#1}>::{closure#0}, core[470b050f2b764c47]::result::Result<(), rustc_errors[b30f6c19c09b5d30]::ErrorGuaranteed>>
  20:        0x10b26a43c - std[dfd41530add96b74]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[efe2b5ffa23206d6]::util::run_in_thread_pool_with_globals<rustc_interface[efe2b5ffa23206d6]::interface::run_compiler<core[470b050f2b764c47]::result::Result<(), rustc_errors[b30f6c19c09b5d30]::ErrorGuaranteed>, rustc_driver[8f8caae8abf9e6c7]::run_compiler::{closure#1}>::{closure#0}, core[470b050f2b764c47]::result::Result<(), rustc_errors[b30f6c19c09b5d30]::ErrorGuaranteed>>::{closure#0}, core[470b050f2b764c47]::result::Result<(), rustc_errors[b30f6c19c09b5d30]::ErrorGuaranteed>>
  21:        0x10b26aaf8 - <<std[dfd41530add96b74]::thread::Builder>::spawn_unchecked_<rustc_interface[efe2b5ffa23206d6]::util::run_in_thread_pool_with_globals<rustc_interface[efe2b5ffa23206d6]::interface::run_compiler<core[470b050f2b764c47]::result::Result<(), rustc_errors[b30f6c19c09b5d30]::ErrorGuaranteed>, rustc_driver[8f8caae8abf9e6c7]::run_compiler::{closure#1}>::{closure#0}, core[470b050f2b764c47]::result::Result<(), rustc_errors[b30f6c19c09b5d30]::ErrorGuaranteed>>::{closure#0}, core[470b050f2b764c47]::result::Result<(), rustc_errors[b30f6c19c09b5d30]::ErrorGuaranteed>>::{closure#1} as core[470b050f2b764c47]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  22:        0x103c6b3dc - std::sys::unix::thread::Thread::new::thread_start::h403ab16d5f453cd4
  23:        0x1bc9f826c - __pthread_deallocate

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary><strong>Backtrace</strong></summary>
<p>

```
<backtrace>
```

</p>
</details>