Skip to content

gccrs: Register the Drop lang item#4559

Merged
CohenArthur merged 1 commit into
Rust-GCC:masterfrom
Lishin1215:register-drop-trait
May 27, 2026
Merged

gccrs: Register the Drop lang item#4559
CohenArthur merged 1 commit into
Rust-GCC:masterfrom
Lishin1215:register-drop-trait

Conversation

@Lishin1215
Copy link
Copy Markdown
Contributor

@Lishin1215 Lishin1215 commented May 26, 2026

Add and register the drop lang item.

gcc/rust/ChangeLog:

* util/rust-lang-item.h (Rust::LangItem::Kind): Add DROP.
* util/rust-lang-item.cc (Rust::LangItem::lang_items): Add drop lang item.

gcc/testsuite/ChangeLog:

* rust/compile/drop-lang-item.rs: New test.

@dkm
Copy link
Copy Markdown
Member

dkm commented May 27, 2026

In the changelog, you could use:

* lang....h (Rust::LangItem::lang_items)<DROP>: Add.

or

* lang....h (Rust::LangItem::lang_items): Add DROP.

Whenever possible, when you modify something that you can clearly identify (a function, a variable, etc), you should have it in the changelog explicitly :)

gcc/rust/ChangeLog:

	* util/rust-lang-item.h (Rust::LangItem::Kind): Add DROP.
	* util/rust-lang-item.cc (Rust::LangItem::lang_items): Add drop lang item.

gcc/testsuite/ChangeLog:

	* rust/compile/drop-lang-item.rs: New test.

Signed-off-by: lishin <lishin1008@gmail.com>
@Lishin1215 Lishin1215 force-pushed the register-drop-trait branch from 2c6ee9d to 25a11e2 Compare May 27, 2026 08:12
@Lishin1215
Copy link
Copy Markdown
Contributor Author

Thanks for reminding me, and sorry for missing this.
I'll be sure to include this next time.

Copy link
Copy Markdown
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CohenArthur CohenArthur added this pull request to the merge queue May 27, 2026
Merged via the queue into Rust-GCC:master with commit 954e079 May 27, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants