Skip to content

Commit 3509b0b

Browse files
authored
Merge pull request #2082 from rust-lang-nursery/rustup
Rust upgrade to rustc 1.22.0-nightly (14039a4 2017-09-22)
2 parents c3df3bc + a822cab commit 3509b0b

File tree

7 files changed

+27
-24
lines changed

7 files changed

+27
-24
lines changed

CHANGELOG.md

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

4+
## 0.0.163
5+
* Update to *rustc 1.22.0-nightly (14039a42a 2017-09-22)*
6+
47
## 0.0.162
58
* Update to *rustc 1.22.0-nightly (0701b37d9 2017-09-18)*
69
* New lint: [`chars_last_cmp`]

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.162"
3+
version = "0.0.163"
44
authors = [
55
"Manish Goregaokar <[email protected]>",
66
"Andre Bogus <[email protected]>",
@@ -31,7 +31,7 @@ path = "src/main.rs"
3131

3232
[dependencies]
3333
# begin automatic update
34-
clippy_lints = { version = "0.0.162", path = "clippy_lints" }
34+
clippy_lints = { version = "0.0.163", path = "clippy_lints" }
3535
# end automatic update
3636
cargo_metadata = "0.2"
3737

PUBLISH.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Steps to publish a new clippy version
77
- `git push`
88
- Wait for Travis's approval.
99
- Merge.
10-
- `cargo publish` in `./clippy_clints`.
10+
- `cargo publish` in `./clippy_lints`.
1111
- `cargo publish` in the root directory.
1212
- `git pull`.
1313
- `git tag -s v0.0.X -m "v0.0.X"`.

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.162"
4+
version = "0.0.163"
55
# end automatic update
66
authors = [
77
"Manish Goregaokar <[email protected]>",

clippy_lints/src/lifetimes.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ fn check_fn_inner<'a, 'tcx>(
113113
.parameters
114114
.lifetimes;
115115
for bound in bounds {
116-
if bound.name != "'static" && !bound.is_elided() {
116+
if bound.name.name() != "'static" && !bound.is_elided() {
117117
return;
118118
}
119119
bounds_lts.push(bound);
@@ -225,7 +225,7 @@ fn allowed_lts_from(named_lts: &[LifetimeDef]) -> HashSet<RefLt> {
225225
let mut allowed_lts = HashSet::new();
226226
for lt in named_lts {
227227
if lt.bounds.is_empty() {
228-
allowed_lts.insert(RefLt::Named(lt.lifetime.name));
228+
allowed_lts.insert(RefLt::Named(lt.lifetime.name.name()));
229229
}
230230
}
231231
allowed_lts.insert(RefLt::Unnamed);
@@ -235,8 +235,8 @@ fn allowed_lts_from(named_lts: &[LifetimeDef]) -> HashSet<RefLt> {
235235

236236
fn lts_from_bounds<'a, T: Iterator<Item = &'a Lifetime>>(mut vec: Vec<RefLt>, bounds_lts: T) -> Vec<RefLt> {
237237
for lt in bounds_lts {
238-
if lt.name != "'static" {
239-
vec.push(RefLt::Named(lt.name));
238+
if lt.name.name() != "'static" {
239+
vec.push(RefLt::Named(lt.name.name()));
240240
}
241241
}
242242

@@ -266,12 +266,12 @@ impl<'v, 't> RefVisitor<'v, 't> {
266266

267267
fn record(&mut self, lifetime: &Option<Lifetime>) {
268268
if let Some(ref lt) = *lifetime {
269-
if lt.name == "'static" {
269+
if lt.name.name() == "'static" {
270270
self.lts.push(RefLt::Static);
271271
} else if lt.is_elided() {
272272
self.lts.push(RefLt::Unnamed);
273273
} else {
274-
self.lts.push(RefLt::Named(lt.name));
274+
self.lts.push(RefLt::Named(lt.name.name()));
275275
}
276276
} else {
277277
self.lts.push(RefLt::Unnamed);
@@ -396,7 +396,7 @@ struct LifetimeChecker {
396396
impl<'tcx> Visitor<'tcx> for LifetimeChecker {
397397
// for lifetimes as parameters of generics
398398
fn visit_lifetime(&mut self, lifetime: &'tcx Lifetime) {
399-
self.map.remove(&lifetime.name);
399+
self.map.remove(&lifetime.name.name());
400400
}
401401

402402
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
415415
let hs = generics
416416
.lifetimes
417417
.iter()
418-
.map(|lt| (lt.lifetime.name, lt.lifetime.span))
418+
.map(|lt| (lt.lifetime.name.name(), lt.lifetime.span))
419419
.collect();
420420
let mut checker = LifetimeChecker { map: hs };
421421

@@ -434,7 +434,7 @@ struct BodyLifetimeChecker {
434434
impl<'tcx> Visitor<'tcx> for BodyLifetimeChecker {
435435
// for lifetimes as parameters of generics
436436
fn visit_lifetime(&mut self, lifetime: &'tcx Lifetime) {
437-
if lifetime.name != keywords::Invalid.name() && lifetime.name != "'static" {
437+
if lifetime.name.name() != keywords::Invalid.name() && lifetime.name.name() != "'static" {
438438
self.lifetimes_used_in_body = true;
439439
}
440440
}

clippy_lints/src/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ fn check_ty(cx: &LateContext, ast_ty: &hir::Ty, is_local: bool) {
223223
let ltopt = if lt.is_elided() {
224224
"".to_owned()
225225
} else {
226-
format!("{} ", lt.name.as_str())
226+
format!("{} ", lt.name.name().as_str())
227227
};
228228
let mutopt = if *mutbl == Mutability::MutMutable {
229229
"mut "

tests/ui/mut_mut.stderr

+10-10
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ error: this expression mutably borrows a mutable reference. Consider reborrowing
2828
| ^^^^^^
2929

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

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

4242
error: generally you want to avoid `&mut &mut _` if possible
4343
--> $DIR/mut_mut.rs:30:17
@@ -46,22 +46,22 @@ error: generally you want to avoid `&mut &mut _` if possible
4646
| ^^^^^^^^^^^^^
4747

4848
error: generally you want to avoid `&mut &mut _` if possible
49-
--> $DIR/mut_mut.rs:35:17
49+
--> $DIR/mut_mut.rs:35:38
5050
|
5151
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
52-
| ^^^^^^^^^^^^^^^^^^
52+
| ^^^^^^^^^^^^^^^^
5353

5454
error: generally you want to avoid `&mut &mut _` if possible
55-
--> $DIR/mut_mut.rs:35:22
55+
--> $DIR/mut_mut.rs:35:17
5656
|
5757
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
58-
| ^^^^^^^^^^^^^
58+
| ^^^^^^^^^^^^^^^^^^
5959

6060
error: generally you want to avoid `&mut &mut _` if possible
61-
--> $DIR/mut_mut.rs:35:38
61+
--> $DIR/mut_mut.rs:35:22
6262
|
6363
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
64-
| ^^^^^^^^^^^^^^^^
64+
| ^^^^^^^^^^^^^
6565

6666
error: generally you want to avoid `&mut &mut _` if possible
6767
--> $DIR/mut_mut.rs:35:17

0 commit comments

Comments
 (0)