Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

UEFI: fmt::Debug for TcpStream/TcpListener is unimplemented!() and panics

Open Beginner friendly
#164,948 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust

Research direction

Start by reading the fmt::Debug implementations in library/std/src/sys/net/connection/uefi/mod.rs at lines 165–170 and 233–238, then check nearby platform implementations for the expected formatting style. Implement non-panicking debug output for TcpStream and TcpListener; done when formatting either type with {:?} no longer panics on UEFI.

Written by the indexing model from the issue text.

Description

C-bug needs-triage O-UEFI T-libs

On UEFI, the fmt::Debug implementations for TcpStream and TcpListener call
unimplemented!(), so any debug-print or log of these types panics the process
from safe code — including {:?}, .unwrap_err() on a Debug-bound error, or
any logging layer that formats them.

I tried this code:

use std::net::TcpListener;

let listener = TcpListener::bind("0.0.0.0:8080").unwrap();
println!("{listener:?}"); // panics: not yet implemented

I expected to see this happen: a Debug rendering (even a minimal
non-exhaustive one), as on all other platforms.

Instead, this happened: the impl is a stub
(library/std/src/sys/net/connection/uefi/mod.rs:165-170, and 233-238 for TcpListener):

impl fmt::Debug for TcpStream {
    fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
        // FIXME(implement this)
        unimplemented!()
    }
}

Any debug-formatting of these types panics — a crash from safe code on a shipped
platform. The same applies to TcpListener.

Meta

Found by static analysis of main @ dc44e7f. Related: #100499.

rustc --version --verbose:

rustc 1.101.0-dev
binary: rustc
commit-hash: dc44e7f2c436b6041742e138b9c2176f093196d5
commit-date: 2026-10-24
host: x86_64-unknown-linux-gnu
release: 1.101.0-dev
Backtrace

thread 'main' panicked at 'not yet implemented', library/std/src/sys/net/connection/uefi/mod.rs:167
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <std::sys::net::connection::uefi::TcpStream as core::fmt::Debug>::fmt
   3: core::fmt::write
   4: std::io::stdio::_print
(representative; captured on a UEFI target)

@rustbot label +C-bug +T-libs +O-uefi

Dominant language
Rust
Stars
121k
Forks
18.7k
Avg merge
3d 4m
Merged PRs (30d)
536

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-lang/rust

All issues in rust-lang/rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.