Skip to content

Rust upgrade to rustc 1.22.0-nightly (14039a42a 2017-09-22) #2082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log
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
* Update to *rustc 1.22.0-nightly (0701b37d9 2017-09-18)*
* New lint: [`chars_last_cmp`]
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clippy"
version = "0.0.162"
version = "0.0.163"
authors = [
"Manish Goregaokar <[email protected]>",
"Andre Bogus <[email protected]>",
Expand Down Expand Up @@ -31,7 +31,7 @@ path = "src/main.rs"

[dependencies]
# begin automatic update
clippy_lints = { version = "0.0.162", path = "clippy_lints" }
clippy_lints = { version = "0.0.163", path = "clippy_lints" }
# end automatic update
cargo_metadata = "0.2"

Expand Down
2 changes: 1 addition & 1 deletion PUBLISH.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Steps to publish a new clippy version
- `git push`
- Wait for Travis's approval.
- Merge.
- `cargo publish` in `./clippy_clints`.
- `cargo publish` in `./clippy_lints`.
- `cargo publish` in the root directory.
- `git pull`.
- `git tag -s v0.0.X -m "v0.0.X"`.
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "clippy_lints"
# begin automatic update
version = "0.0.162"
version = "0.0.163"
# end automatic update
authors = [
"Manish Goregaokar <[email protected]>",
Expand Down
18 changes: 9 additions & 9 deletions clippy_lints/src/lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ fn check_fn_inner<'a, 'tcx>(
.parameters
.lifetimes;
for bound in bounds {
if bound.name != "'static" && !bound.is_elided() {
if bound.name.name() != "'static" && !bound.is_elided() {
return;
}
bounds_lts.push(bound);
Expand Down Expand Up @@ -225,7 +225,7 @@ fn allowed_lts_from(named_lts: &[LifetimeDef]) -> HashSet<RefLt> {
let mut allowed_lts = HashSet::new();
for lt in named_lts {
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);
Expand All @@ -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> {
for lt in bounds_lts {
if lt.name != "'static" {
vec.push(RefLt::Named(lt.name));
if lt.name.name() != "'static" {
vec.push(RefLt::Named(lt.name.name()));
}
}

Expand Down Expand Up @@ -266,12 +266,12 @@ impl<'v, 't> RefVisitor<'v, 't> {

fn record(&mut self, lifetime: &Option<Lifetime>) {
if let Some(ref lt) = *lifetime {
if lt.name == "'static" {
if lt.name.name() == "'static" {
self.lts.push(RefLt::Static);
} else if lt.is_elided() {
self.lts.push(RefLt::Unnamed);
} else {
self.lts.push(RefLt::Named(lt.name));
self.lts.push(RefLt::Named(lt.name.name()));
}
} else {
self.lts.push(RefLt::Unnamed);
Expand Down Expand Up @@ -396,7 +396,7 @@ struct LifetimeChecker {
impl<'tcx> Visitor<'tcx> for LifetimeChecker {
// for lifetimes as parameters of generics
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) {
Expand All @@ -415,7 +415,7 @@ fn report_extra_lifetimes<'a, 'tcx: 'a>(cx: &LateContext<'a, 'tcx>, func: &'tcx
let hs = generics
.lifetimes
.iter()
.map(|lt| (lt.lifetime.name, lt.lifetime.span))
.map(|lt| (lt.lifetime.name.name(), lt.lifetime.span))
.collect();
let mut checker = LifetimeChecker { map: hs };

Expand All @@ -434,7 +434,7 @@ struct BodyLifetimeChecker {
impl<'tcx> Visitor<'tcx> for BodyLifetimeChecker {
// for lifetimes as parameters of generics
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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ fn check_ty(cx: &LateContext, ast_ty: &hir::Ty, is_local: bool) {
let ltopt = if lt.is_elided() {
"".to_owned()
} else {
format!("{} ", lt.name.as_str())
format!("{} ", lt.name.name().as_str())
};
let mutopt = if *mutbl == Mutability::MutMutable {
"mut "
Expand Down
20 changes: 10 additions & 10 deletions tests/ui/mut_mut.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ error: this expression mutably borrows a mutable reference. Consider reborrowing
| ^^^^^^

error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:30:17
--> $DIR/mut_mut.rs:30:33
|
30 | let y : &mut &mut u32 = &mut &mut 2;
| ^^^^^^^^^^^^^
| ^^^^^^^^^^^

error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:30:33
--> $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:30:17
Expand All @@ -46,22 +46,22 @@ 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:38
|
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:22
--> $DIR/mut_mut.rs:35:17
|
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
--> $DIR/mut_mut.rs:35:22
|
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:17
Expand Down