Skip to content

Commit fc008aa

Browse files
committed
Rustup
1 parent 6f9b3ca commit fc008aa

File tree

10 files changed

+21
-17
lines changed

10 files changed

+21
-17
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## 0.0.205
5+
* Rustup to *rustc 1.28.0-nightly (990d8aa74 2018-05-25)*
6+
* Rename `unused_lifetimes` to `extra_unused_lifetimes` because of naming conflict with new rustc lint
7+
48
## 0.0.204
59
* Rustup to *rustc 1.28.0-nightly (71e87be38 2018-05-22)*
610

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy"
3-
version = "0.0.204"
3+
version = "0.0.205"
44
authors = [
55
"Manish Goregaokar <[email protected]>",
66
"Andre Bogus <[email protected]>",
@@ -37,7 +37,7 @@ path = "src/driver.rs"
3737

3838
[dependencies]
3939
# begin automatic update
40-
clippy_lints = { version = "0.0.204", path = "clippy_lints" }
40+
clippy_lints = { version = "0.0.205", path = "clippy_lints" }
4141
# end automatic update
4242
regex = "1"
4343
semver = "0.9"

clippy_lints/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "clippy_lints"
33
# begin automatic update
4-
version = "0.0.204"
4+
version = "0.0.205"
55
# end automatic update
66
authors = [
77
"Manish Goregaokar <[email protected]>",

clippy_lints/src/consts.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -415,17 +415,17 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
415415
}
416416

417417
pub fn miri_to_const<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, result: &ty::Const<'tcx>) -> Option<Constant> {
418-
use rustc::mir::interpret::{PrimVal, ConstValue};
418+
use rustc::mir::interpret::{Scalar, ConstValue};
419419
match result.val {
420-
ConstVal::Value(ConstValue::ByVal(PrimVal::Bytes(b))) => match result.ty.sty {
420+
ConstVal::Value(ConstValue::Scalar(Scalar::Bits{ bits: b, ..})) => match result.ty.sty {
421421
ty::TyBool => Some(Constant::Bool(b == 1)),
422422
ty::TyUint(_) | ty::TyInt(_) => Some(Constant::Int(b)),
423423
ty::TyFloat(FloatTy::F32) => Some(Constant::F32(f32::from_bits(b as u32))),
424424
ty::TyFloat(FloatTy::F64) => Some(Constant::F64(f64::from_bits(b as u64))),
425425
// FIXME: implement other conversion
426426
_ => None,
427427
},
428-
ConstVal::Value(ConstValue::ByValPair(PrimVal::Ptr(ptr), PrimVal::Bytes(n))) => match result.ty.sty {
428+
ConstVal::Value(ConstValue::ScalarPair(Scalar::Ptr(ptr), Scalar::Bits { bits: n, .. })) => match result.ty.sty {
429429
ty::TyRef(_, tam, _) => match tam.sty {
430430
ty::TyStr => {
431431
let alloc = tcx

clippy_lints/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
543543
len_zero::LEN_ZERO,
544544
let_if_seq::USELESS_LET_IF_SEQ,
545545
lifetimes::NEEDLESS_LIFETIMES,
546-
lifetimes::UNUSED_LIFETIMES,
546+
lifetimes::EXTRA_UNUSED_LIFETIMES,
547547
literal_representation::INCONSISTENT_DIGIT_GROUPING,
548548
literal_representation::LARGE_DIGIT_GROUPS,
549549
literal_representation::UNREADABLE_LITERAL,
@@ -786,7 +786,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
786786
identity_op::IDENTITY_OP,
787787
int_plus_one::INT_PLUS_ONE,
788788
lifetimes::NEEDLESS_LIFETIMES,
789-
lifetimes::UNUSED_LIFETIMES,
789+
lifetimes::EXTRA_UNUSED_LIFETIMES,
790790
loops::EXPLICIT_COUNTER_LOOP,
791791
loops::MUT_RANGE_BOUND,
792792
loops::WHILE_LET_LOOP,

clippy_lints/src/lifetimes.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ declare_clippy_lint! {
4343
/// fn unused_lifetime<'a>(x: u8) { .. }
4444
/// ```
4545
declare_clippy_lint! {
46-
pub UNUSED_LIFETIMES,
46+
pub EXTRA_UNUSED_LIFETIMES,
4747
complexity,
4848
"unused lifetimes in function definitions"
4949
}
@@ -53,7 +53,7 @@ pub struct LifetimePass;
5353

5454
impl LintPass for LifetimePass {
5555
fn get_lints(&self) -> LintArray {
56-
lint_array!(NEEDLESS_LIFETIMES, UNUSED_LIFETIMES)
56+
lint_array!(NEEDLESS_LIFETIMES, EXTRA_UNUSED_LIFETIMES)
5757
}
5858
}
5959

@@ -431,7 +431,7 @@ fn report_extra_lifetimes<'a, 'tcx: 'a>(cx: &LateContext<'a, 'tcx>, func: &'tcx
431431
walk_fn_decl(&mut checker, func);
432432

433433
for &v in checker.map.values() {
434-
span_lint(cx, UNUSED_LIFETIMES, v, "this lifetime isn't used in the function definition");
434+
span_lint(cx, EXTRA_UNUSED_LIFETIMES, v, "this lifetime isn't used in the function definition");
435435
}
436436
}
437437

min_version.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
rustc 1.28.0-nightly (71e87be38 2018-05-22)
1+
rustc 1.28.0-nightly (990d8aa74 2018-05-25)
22
binary: rustc
3-
commit-hash: 71e87be381bd6020645d925c579fa7367167d3d8
4-
commit-date: 2018-05-22
3+
commit-hash: 990d8aa743b1dda3cc0f68fe09524486261812c6
4+
commit-date: 2018-05-25
55
host: x86_64-unknown-linux-gnu
66
release: 1.28.0-nightly
77
LLVM version: 6.0

tests/ui/lifetimes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33

4-
#![warn(needless_lifetimes, unused_lifetimes)]
4+
#![warn(needless_lifetimes, extra_unused_lifetimes)]
55
#![allow(dead_code, needless_pass_by_value)]
66

77
fn distinct_lifetimes<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: u8) { }

tests/ui/unused_lt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33
#![allow(unused, dead_code, needless_lifetimes, needless_pass_by_value)]
4-
#![warn(unused_lifetimes)]
4+
#![warn(extra_unused_lifetimes)]
55

66
fn empty() {
77

tests/ui/unused_lt.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: this lifetime isn't used in the function definition
44
16 | fn unused_lt<'a>(x: u8) {
55
| ^^
66
|
7-
= note: `-D unused-lifetimes` implied by `-D warnings`
7+
= note: `-D extra-unused-lifetimes` implied by `-D warnings`
88

99
error: this lifetime isn't used in the function definition
1010
--> $DIR/unused_lt.rs:20:25

0 commit comments

Comments
 (0)