# What are all the steps to add a warning?

**URL:** <https://internals.rust-lang.org/t/what-are-all-the-steps-to-add-a-warning/4795>\
**Category:** Uncategorized\
**Created:** [February 14, 2017, 5:26pm UTC](https://internals.rust-lang.org/t/what-are-all-the-steps-to-add-a-warning/4795 "2017-02-14T17:26:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vityafx](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/vityafx/32/2146_2.png) [@vityafx](https://internals.rust-lang.org/u/vityafx)\
**Post date:** [February 14, 2017, 5:26pm UTC](https://internals.rust-lang.org/t/what-are-all-the-steps-to-add-a-warning/4795/1 "2017-02-14T17:26:26Z")

</div>

I am new to rustc and i want to make it throw a warning on some circumstances in the code. How to do that?

---

<div class="post-metadata">

**Author:** ![jer](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/jer/32/1009_2.png) [@jer](https://internals.rust-lang.org/u/jer)\
**Post date:** [February 14, 2017, 5:31pm UTC](https://internals.rust-lang.org/t/what-are-all-the-steps-to-add-a-warning/4795/2 "2017-02-14T17:31:12Z")

</div>

It would probably a good idea to get a lint into [Clippy](https://github.com/Manishearth/rust-clippy) first. Clippy is a collection of lints to catch common mistakes and currently implements nearly 200 different lints for a lot of different things.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [March 25, 2019, 8:27am UTC](https://internals.rust-lang.org/t/what-are-all-the-steps-to-add-a-warning/4795/3 "2019-03-25T08:27:57Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
