Landing: a5c5ccc0607d

Project / Subsystem

gcc / gccrs

Date

2026-06-26

Author

Lucas Ly Ba

Commit

a5c5ccc0607dc67dfab331118c9bed0c8223dc41

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gccrs
patch_id
—
commit_hash
a5c5ccc0607dc67dfab331118c9bed0c8223dc41
source_type
github
headline
gccrs: Add unused unsafe lint
tldr
gccrs now warns about 'unsafe' blocks that don't perform operations requiring 'unsafe'.
author
Lucas Ly Ba
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gccrs
  • • lint
  • • unsafe
  • • rust
  • • security
discussion_id_link
—
bugzilla_pr
—
date
2026-06-26T00:00:00.000Z

A new lint has been added to gccrs to detect and warn about ‘unsafe’ blocks that do not contain any operations necessitating an unsafe context. The unsafe checker now tracks which ‘unsafe’ blocks are actually utilized by such operations, flagging any that are not. This feature, gated by -frust-unused-check-2.0, aims to improve code quality by identifying potentially unnecessary or dead ‘unsafe’ code.