# Forbid -(unsigned integer)

**URL:** <https://internals.rust-lang.org/t/forbid-unsigned-integer/752>\
**Category:** ideas (deprecated)\
**Created:** [November 5, 2014, 5:10pm UTC](https://internals.rust-lang.org/t/forbid-unsigned-integer/752 "2014-11-05T17:10:38Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![nodakai](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/nodakai/32/6161_2.png) [@nodakai](https://internals.rust-lang.org/u/nodakai)\
**Post date:** [November 5, 2014, 5:10pm UTC](https://internals.rust-lang.org/t/forbid-unsigned-integer/752/1 "2014-11-05T17:10:38Z")

</div>

We already have a lint item to find an application of the unary minus on an unsigned machine integer. Shouldn’t we simply forbid it? Rust programmers can always use `0 - x` instead when they know what they are doing (rustc eventually translates `-x` into `0 - x` because [LLVM doesn’t have the unary minus](http://llvm.org/docs/LangRef.html).)

---

_[View the full topic](https://internals.rust-lang.org/t/forbid-unsigned-integer/752)._
