Merge pull request #2082 from rust-lang-nursery/rustup

Rust upgrade to rustc 1.22.0-nightly (14039a42a 2017-09-22)
This commit is contained in:
Manish Goregaokar 2017-09-23 13:47:07 -07:00 committed by GitHub
commit 3509b0b40c
7 changed files with 29 additions and 26 deletions

View file

@ -1,6 +1,9 @@
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## 0.0.163
* Update to *rustc 1.22.0-nightly (14039a42a 2017-09-22)*
## 0.0.162 ## 0.0.162
* Update to *rustc 1.22.0-nightly (0701b37d9 2017-09-18)* * Update to *rustc 1.22.0-nightly (0701b37d9 2017-09-18)*
* New lint: [`chars_last_cmp`] * New lint: [`chars_last_cmp`]

View file

@ -1,6 +1,6 @@
[package] [package]
name = "clippy" name = "clippy"
version = "0.0.162" version = "0.0.163"
authors = [ authors = [
"Manish Goregaokar <manishsmail@gmail.com>", "Manish Goregaokar <manishsmail@gmail.com>",
"Andre Bogus <bogusandre@gmail.com>", "Andre Bogus <bogusandre@gmail.com>",
@ -31,7 +31,7 @@ path = "src/main.rs"
[dependencies] [dependencies]
# begin automatic update # begin automatic update
clippy_lints = { version = "0.0.162", path = "clippy_lints" } clippy_lints = { version = "0.0.163", path = "clippy_lints" }
# end automatic update # end automatic update
cargo_metadata = "0.2" cargo_metadata = "0.2"

View file

@ -7,7 +7,7 @@ Steps to publish a new clippy version
- `git push` - `git push`
- Wait for Travis's approval. - Wait for Travis's approval.
- Merge. - Merge.
- `cargo publish` in `./clippy_clints`. - `cargo publish` in `./clippy_lints`.
- `cargo publish` in the root directory. - `cargo publish` in the root directory.
- `git pull`. - `git pull`.
- `git tag -s v0.0.X -m "v0.0.X"`. - `git tag -s v0.0.X -m "v0.0.X"`.

View file

@ -1,7 +1,7 @@
[package] [package]
name = "clippy_lints" name = "clippy_lints"
# begin automatic update # begin automatic update
version = "0.0.162" version = "0.0.163"
# end automatic update # end automatic update
authors = [ authors = [
"Manish Goregaokar <manishsmail@gmail.com>", "Manish Goregaokar <manishsmail@gmail.com>",

View file

@ -113,7 +113,7 @@ fn check_fn_inner<'a, 'tcx>(
.parameters .parameters
.lifetimes; .lifetimes;
for bound in bounds { for bound in bounds {
if bound.name != "'static" && !bound.is_elided() { if bound.name.name() != "'static" && !bound.is_elided() {
return; return;
} }
bounds_lts.push(bound); bounds_lts.push(bound);
@ -225,7 +225,7 @@ fn allowed_lts_from(named_lts: &[LifetimeDef]) -> HashSet<RefLt> {
let mut allowed_lts = HashSet::new(); let mut allowed_lts = HashSet::new();
for lt in named_lts { for lt in named_lts {
if lt.bounds.is_empty() { if lt.bounds.is_empty() {
allowed_lts.insert(RefLt::Named(lt.lifetime.name)); allowed_lts.insert(RefLt::Named(lt.lifetime.name.name()));
} }
} }
allowed_lts.insert(RefLt::Unnamed); allowed_lts.insert(RefLt::Unnamed);
@ -235,8 +235,8 @@ fn allowed_lts_from(named_lts: &[LifetimeDef]) -> HashSet<RefLt> {
fn lts_from_bounds<'a, T: Iterator<Item = &'a Lifetime>>(mut vec: Vec<RefLt>, bounds_lts: T) -> Vec<RefLt> { fn lts_from_bounds<'a, T: Iterator<Item = &'a Lifetime>>(mut vec: Vec<RefLt>, bounds_lts: T) -> Vec<RefLt> {
for lt in bounds_lts { for lt in bounds_lts {
if lt.name != "'static" { if lt.name.name() != "'static" {
vec.push(RefLt::Named(lt.name)); vec.push(RefLt::Named(lt.name.name()));
} }
} }
@ -266,12 +266,12 @@ impl<'v, 't> RefVisitor<'v, 't> {
fn record(&mut self, lifetime: &Option<Lifetime>) { fn record(&mut self, lifetime: &Option<Lifetime>) {
if let Some(ref lt) = *lifetime { if let Some(ref lt) = *lifetime {
if lt.name == "'static" { if lt.name.name() == "'static" {
self.lts.push(RefLt::Static); self.lts.push(RefLt::Static);
} else if lt.is_elided() { } else if lt.is_elided() {
self.lts.push(RefLt::Unnamed); self.lts.push(RefLt::Unnamed);
} else { } else {
self.lts.push(RefLt::Named(lt.name)); self.lts.push(RefLt::Named(lt.name.name()));
} }
} else { } else {
self.lts.push(RefLt::Unnamed); self.lts.push(RefLt::Unnamed);
@ -396,7 +396,7 @@ struct LifetimeChecker {
impl<'tcx> Visitor<'tcx> for LifetimeChecker { impl<'tcx> Visitor<'tcx> for LifetimeChecker {
// for lifetimes as parameters of generics // for lifetimes as parameters of generics
fn visit_lifetime(&mut self, lifetime: &'tcx Lifetime) { fn visit_lifetime(&mut self, lifetime: &'tcx Lifetime) {
self.map.remove(&lifetime.name); self.map.remove(&lifetime.name.name());
} }
fn visit_lifetime_def(&mut self, _: &'tcx LifetimeDef) { fn visit_lifetime_def(&mut self, _: &'tcx LifetimeDef) {
@ -415,7 +415,7 @@ fn report_extra_lifetimes<'a, 'tcx: 'a>(cx: &LateContext<'a, 'tcx>, func: &'tcx
let hs = generics let hs = generics
.lifetimes .lifetimes
.iter() .iter()
.map(|lt| (lt.lifetime.name, lt.lifetime.span)) .map(|lt| (lt.lifetime.name.name(), lt.lifetime.span))
.collect(); .collect();
let mut checker = LifetimeChecker { map: hs }; let mut checker = LifetimeChecker { map: hs };
@ -434,7 +434,7 @@ struct BodyLifetimeChecker {
impl<'tcx> Visitor<'tcx> for BodyLifetimeChecker { impl<'tcx> Visitor<'tcx> for BodyLifetimeChecker {
// for lifetimes as parameters of generics // for lifetimes as parameters of generics
fn visit_lifetime(&mut self, lifetime: &'tcx Lifetime) { fn visit_lifetime(&mut self, lifetime: &'tcx Lifetime) {
if lifetime.name != keywords::Invalid.name() && lifetime.name != "'static" { if lifetime.name.name() != keywords::Invalid.name() && lifetime.name.name() != "'static" {
self.lifetimes_used_in_body = true; self.lifetimes_used_in_body = true;
} }
} }

View file

@ -223,7 +223,7 @@ fn check_ty(cx: &LateContext, ast_ty: &hir::Ty, is_local: bool) {
let ltopt = if lt.is_elided() { let ltopt = if lt.is_elided() {
"".to_owned() "".to_owned()
} else { } else {
format!("{} ", lt.name.as_str()) format!("{} ", lt.name.name().as_str())
}; };
let mutopt = if *mutbl == Mutability::MutMutable { let mutopt = if *mutbl == Mutability::MutMutable {
"mut " "mut "

View file

@ -27,12 +27,6 @@ error: this expression mutably borrows a mutable reference. Consider reborrowing
26 | let mut y = &mut x; 26 | let mut y = &mut x;
| ^^^^^^ | ^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:30:17
|
30 | let y : &mut &mut u32 = &mut &mut 2;
| ^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:30:33 --> $DIR/mut_mut.rs:30:33
| |
@ -45,6 +39,18 @@ error: generally you want to avoid `&mut &mut _` if possible
30 | let y : &mut &mut u32 = &mut &mut 2; 30 | let y : &mut &mut u32 = &mut &mut 2;
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:30:17
|
30 | let y : &mut &mut u32 = &mut &mut 2;
| ^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:35:38
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
| ^^^^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:35:17 --> $DIR/mut_mut.rs:35:17
| |
@ -57,12 +63,6 @@ error: generally you want to avoid `&mut &mut _` if possible
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2; 35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:35:38
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
| ^^^^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:35:17 --> $DIR/mut_mut.rs:35:17
| |