Skip to content

Commit 345ac82

Browse files
committed
Auto merge of #4132 - phansch:rollup-0vxoimc, r=phansch
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
2 parents c984f77 + 89962ae commit 345ac82

File tree

7 files changed

+15
-10
lines changed

7 files changed

+15
-10
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ clippy_lints = { version = "0.0.212", path = "clippy_lints" }
4242
# end automatic update
4343
regex = "1"
4444
semver = "0.9"
45-
rustc_tools_util = { version = "0.1.1", path = "rustc_tools_util"}
45+
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
4646

4747
[dev-dependencies]
4848
cargo_metadata = "0.7.1"
@@ -58,7 +58,7 @@ derive-new = "0.5"
5858
rustc-workspace-hack = "1.0.0"
5959

6060
[build-dependencies]
61-
rustc_tools_util = { version = "0.1.1", path = "rustc_tools_util"}
61+
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
6262

6363
[features]
6464
debugging = []

build.rs

+4
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ fn main() {
1212
"cargo:rustc-env=COMMIT_DATE={}",
1313
rustc_tools_util::get_commit_date().unwrap_or_default()
1414
);
15+
println!(
16+
"cargo:rustc-env=RUSTC_RELEASE_CHANNEL={}",
17+
rustc_tools_util::get_channel().unwrap_or_default()
18+
);
1519
}

clippy_lints/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ toml = "0.5"
2929
unicode-normalization = "0.1"
3030
pulldown-cmark = "0.5.0"
3131
url = "1.7.0"
32-
if_chain = "0.1.3"
32+
if_chain = "1.0.0"
3333
smallvec = { version = "0.6.5", features = ["union"] }
3434

3535
[features]

clippy_lints/src/consts.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
251251
if let ExprKind::Path(qpath) = &callee.node;
252252
let res = self.tables.qpath_res(qpath, callee.hir_id);
253253
if let Some(def_id) = res.opt_def_id();
254-
let def_path = self.lcx.get_def_path(def_id)
254+
let get_def_path = self.lcx.get_def_path(def_id);
255+
let def_path = get_def_path
255256
.iter()
256257
.map(LocalInternedString::get)
257258
.collect::<Vec<_>>();

rustc_tools_util/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rustc_tools_util"
3-
version = "0.1.1"
3+
version = "0.2.0"
44
authors = ["Matthias Krüger <[email protected]>"]
55
description = "small helper to generate version information for git packages"
66
repository = "https://github.com/rust-lang/rust-clippy"

rustc_tools_util/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn main() {
3232
);
3333
println!(
3434
"cargo:rustc-env=RUSTC_RELEASE_CHANNEL={}",
35-
rustc_tools_util::get_channel_from_compiler_output().unwrap_or_default()
35+
rustc_tools_util::get_channel().unwrap_or_default()
3636
);
3737
}
3838

rustc_tools_util/src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ mod test {
131131
fn test_struct_local() {
132132
let vi = get_version_info!();
133133
assert_eq!(vi.major, 0);
134-
assert_eq!(vi.minor, 1);
135-
assert_eq!(vi.patch, 1);
134+
assert_eq!(vi.minor, 2);
135+
assert_eq!(vi.patch, 0);
136136
assert_eq!(vi.crate_name, "rustc_tools_util");
137137
// hard to make positive tests for these since they will always change
138138
assert!(vi.commit_hash.is_none());
@@ -142,7 +142,7 @@ mod test {
142142
#[test]
143143
fn test_display_local() {
144144
let vi = get_version_info!();
145-
assert_eq!(vi.to_string(), "rustc_tools_util 0.1.1");
145+
assert_eq!(vi.to_string(), "rustc_tools_util 0.2.0");
146146
}
147147

148148
#[test]
@@ -151,7 +151,7 @@ mod test {
151151
let s = format!("{:?}", vi);
152152
assert_eq!(
153153
s,
154-
"VersionInfo { crate_name: \"rustc_tools_util\", major: 0, minor: 1, patch: 1 }"
154+
"VersionInfo { crate_name: \"rustc_tools_util\", major: 0, minor: 2, patch: 0 }"
155155
);
156156
}
157157

0 commit comments

Comments
 (0)