From 4516ba7004bfb06468a56636d2e170aaaa82c27a Mon Sep 17 00:00:00 2001 From: csmoe <35686186+csmoe@users.noreply.github.com> Date: Sun, 23 Sep 2018 22:58:47 +0800 Subject: [PATCH] deny overflow literals --- src/librustc_lint/types.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/librustc_lint/types.rs b/src/librustc_lint/types.rs index 2bec9203e9ee..01d4d0f8cdb6 100644 --- a/src/librustc_lint/types.rs +++ b/src/librustc_lint/types.rs @@ -24,6 +24,7 @@ use std::{i8, i16, i32, i64, u8, u16, u32, u64, f32, f64}; use syntax::{ast, attr}; use syntax::errors::Applicability; use rustc_target::spec::abi::Abi; +use syntax::edition::Edition; use syntax_pos::Span; use syntax::source_map; @@ -38,7 +39,8 @@ declare_lint! { declare_lint! { OVERFLOWING_LITERALS, Warn, - "literal out of range for its type" + "literal out of range for its type", + Edition::Edition2018 => Deny } declare_lint! {