Skip to content

Commit 6689fb0

Browse files
authored
Merge pull request #3906 from felix91gr/compiletest
Fix some test failures in `compiletest` branch
2 parents d020565 + 3cff06a commit 6689fb0

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

clippy_lints/src/ranges.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
161161
.ctxt()
162162
.outer()
163163
.expn_info()
164-
.map(|info| info.call_site)
165-
.unwrap_or(expr.span);
164+
.map_or(expr.span, |info| info.call_site);
166165
span_lint_and_then(
167166
cx,
168167
RANGE_PLUS_ONE,

tests/compile-test.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ fn run_ui_toml_tests(config: &compiletest::Config, mut tests: Vec<TestDescAndFn>
100100
.position(|test| test.desc.name.to_string() == test_name.to_string())
101101
.expect("The test should be in there");
102102
let opts = libtest::TestOpts {
103-
list: opts.list.clone(),
103+
list: opts.list,
104104
filter: opts.filter.clone(),
105-
filter_exact: opts.filter_exact.clone(),
105+
filter_exact: opts.filter_exact,
106106
exclude_should_panic: Default::default(),
107107
run_ignored: libtest::RunIgnored::No,
108-
run_tests: opts.run_tests.clone(),
109-
bench_benchmarks: opts.bench_benchmarks.clone(),
108+
run_tests: opts.run_tests,
109+
bench_benchmarks: opts.bench_benchmarks,
110110
logfile: opts.logfile.clone(),
111111
nocapture: opts.nocapture,
112112
color: libtest::ColorConfig::AutoColor,

0 commit comments

Comments
 (0)