Landing: 81cd356d43f9

Project / Subsystem

gcc / gccrs

Date

2026-07-31

Author

Utkarsh Bahuguna

Commit

81cd356d43f97ee04fa90300745a07ef188bb7be

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gccrs
patch_id
—
commit_hash
81cd356d43f97ee04fa90300745a07ef188bb7be
source_type
github
headline
gccrs: Mark types used as generic arguments as live
tldr
gccrs: Fixes dead code linting for types used only in generic arguments.
author
Utkarsh Bahuguna
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gccrs
  • • dead code
  • • liveness analysis
  • • bugfix
discussion_id_link
—
bugzilla_pr
—
date
2026-07-31T00:00:00.000Z

This commit resolves a bug in gccrs’ dead code detection where types used solely as generic arguments were incorrectly flagged as never constructed. The MarkLive::visit_path_segment function has been updated to also mark these generic type arguments as ‘live’. This ensures that the compiler correctly identifies types that are in use, preventing false positives in the dead code lint. Three existing tests had their false positive warnings removed.