Skip to content

Commit 596fd82

Browse files
committed
made lifetimes more explicit, fixed clippy lint
1 parent a9651dc commit 596fd82

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/pair.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ impl<O: Owner + ?Sized> Pair<O> {
247247
/// [`Dependent`]: crate::HasDependent::Dependent
248248
pub fn with_dependent<'self_borrow, F, T>(&'self_borrow self, f: F) -> T
249249
where
250-
F: for<'any> FnOnce(&'self_borrow Dependent<'_, O>) -> T,
250+
F: for<'any> FnOnce(&'self_borrow Dependent<'any, O>) -> T,
251251
{
252252
// SAFETY: `self.dependent` was originally converted from a valid
253253
// Box<Dependent<'_, O>>, and type-erased to a NonNull<()>. As such, it
@@ -276,7 +276,7 @@ impl<O: Owner + ?Sized> Pair<O> {
276276
/// [`Dependent`]: crate::HasDependent::Dependent
277277
pub fn with_dependent_mut<'self_borrow, F, T>(&'self_borrow mut self, f: F) -> T
278278
where
279-
F: for<'any> FnOnce(&'self_borrow mut Dependent<'_, O>) -> T,
279+
F: for<'any> FnOnce(&'self_borrow mut Dependent<'any, O>) -> T,
280280
{
281281
self.with_both_mut(|_, dependent| f(dependent))
282282
}
@@ -292,7 +292,7 @@ impl<O: Owner + ?Sized> Pair<O> {
292292
/// [`Dependent`]: crate::HasDependent::Dependent
293293
pub fn with_both<'self_borrow, F, T>(&'self_borrow self, f: F) -> T
294294
where
295-
F: for<'any> FnOnce(&'self_borrow O, &'self_borrow Dependent<'_, O>) -> T,
295+
F: for<'any> FnOnce(&'self_borrow O, &'self_borrow Dependent<'any, O>) -> T,
296296
{
297297
self.with_dependent(|dependent| f(self.owner(), dependent))
298298
}
@@ -309,7 +309,7 @@ impl<O: Owner + ?Sized> Pair<O> {
309309
/// [`Dependent`]: crate::HasDependent::Dependent
310310
pub fn with_both_mut<'self_borrow, F, T>(&'self_borrow mut self, f: F) -> T
311311
where
312-
F: for<'any> FnOnce(&'self_borrow O, &'self_borrow mut Dependent<'_, O>) -> T,
312+
F: for<'any> FnOnce(&'self_borrow O, &'self_borrow mut Dependent<'any, O>) -> T,
313313
{
314314
let owner: &O = self.owner();
315315

tests/compile_fails.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ fn get_compiler_err(target_dir: &Path, test_file_path: &Path) -> String {
4848

4949
assert!(
5050
!output.status.success(),
51-
"test compiled, but was expected not to: {test_file_path:?}"
51+
"test compiled, but was expected not to: {}",
52+
test_file_path.display()
5253
);
5354

5455
String::from_utf8(output.stderr).expect("rustc output was not UTF-8")

0 commit comments

Comments
 (0)