Skip to content

Commit

Permalink
Auto merge of #4132 - phansch:rollup-0vxoimc, r=phansch
Browse files Browse the repository at this point in the history
Rollup of 2 pull requests

Successful merges:

 - #4129 (update if_chain to 1.0.0)
 - #4130 (bump rustc_tools_util to 0.2.0 )

Failed merges:

r? @ghost
  • Loading branch information
bors committed May 23, 2019
2 parents c984f77 + 89962ae commit 345ac82
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ clippy_lints = { version = "0.0.212", path = "clippy_lints" }
# end automatic update
regex = "1"
semver = "0.9"
rustc_tools_util = { version = "0.1.1", path = "rustc_tools_util"}
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}

[dev-dependencies]
cargo_metadata = "0.7.1"
Expand All @@ -58,7 +58,7 @@ derive-new = "0.5"
rustc-workspace-hack = "1.0.0"

[build-dependencies]
rustc_tools_util = { version = "0.1.1", path = "rustc_tools_util"}
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}

[features]
debugging = []
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ fn main() {
"cargo:rustc-env=COMMIT_DATE={}",
rustc_tools_util::get_commit_date().unwrap_or_default()
);
println!(
"cargo:rustc-env=RUSTC_RELEASE_CHANNEL={}",
rustc_tools_util::get_channel().unwrap_or_default()
);
}
2 changes: 1 addition & 1 deletion clippy_lints/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ toml = "0.5"
unicode-normalization = "0.1"
pulldown-cmark = "0.5.0"
url = "1.7.0"
if_chain = "0.1.3"
if_chain = "1.0.0"
smallvec = { version = "0.6.5", features = ["union"] }

[features]
Expand Down
3 changes: 2 additions & 1 deletion clippy_lints/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
if let ExprKind::Path(qpath) = &callee.node;
let res = self.tables.qpath_res(qpath, callee.hir_id);
if let Some(def_id) = res.opt_def_id();
let def_path = self.lcx.get_def_path(def_id)
let get_def_path = self.lcx.get_def_path(def_id);
let def_path = get_def_path
.iter()
.map(LocalInternedString::get)
.collect::<Vec<_>>();
Expand Down
2 changes: 1 addition & 1 deletion rustc_tools_util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustc_tools_util"
version = "0.1.1"
version = "0.2.0"
authors = ["Matthias Krüger <matthias.krueger@famsik.de>"]
description = "small helper to generate version information for git packages"
repository = "https://github.com/rust-lang/rust-clippy"
Expand Down
2 changes: 1 addition & 1 deletion rustc_tools_util/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn main() {
);
println!(
"cargo:rustc-env=RUSTC_RELEASE_CHANNEL={}",
rustc_tools_util::get_channel_from_compiler_output().unwrap_or_default()
rustc_tools_util::get_channel().unwrap_or_default()
);
}

Expand Down
8 changes: 4 additions & 4 deletions rustc_tools_util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ mod test {
fn test_struct_local() {
let vi = get_version_info!();
assert_eq!(vi.major, 0);
assert_eq!(vi.minor, 1);
assert_eq!(vi.patch, 1);
assert_eq!(vi.minor, 2);
assert_eq!(vi.patch, 0);
assert_eq!(vi.crate_name, "rustc_tools_util");
// hard to make positive tests for these since they will always change
assert!(vi.commit_hash.is_none());
Expand All @@ -142,7 +142,7 @@ mod test {
#[test]
fn test_display_local() {
let vi = get_version_info!();
assert_eq!(vi.to_string(), "rustc_tools_util 0.1.1");
assert_eq!(vi.to_string(), "rustc_tools_util 0.2.0");
}

#[test]
Expand All @@ -151,7 +151,7 @@ mod test {
let s = format!("{:?}", vi);
assert_eq!(
s,
"VersionInfo { crate_name: \"rustc_tools_util\", major: 0, minor: 1, patch: 1 }"
"VersionInfo { crate_name: \"rustc_tools_util\", major: 0, minor: 2, patch: 0 }"
);
}

Expand Down

0 comments on commit 345ac82

Please sign in to comment.