about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-04-19 18:59:23 +0000
committerbors <bors@rust-lang.org>2020-04-19 18:59:23 +0000
commit2efc2d63662dac89cca4431f62d037fa56940bdc (patch)
treed13142062d23d9e06d73ff6d4382ca1951707350 /src/test/codegen/src-hash-algorithm
parente5fe56de7f0647be59b7f9b082dfec6411a83c52 (diff)
parent0ef5dee3b8c8e564676faab09039cb8efd7b7e9c (diff)
downloadrust-2efc2d63662dac89cca4431f62d037fa56940bdc.tar.gz
rust-2efc2d63662dac89cca4431f62d037fa56940bdc.zip
Auto merge of #5491 - smklein:borrowed_box, r=flip1995
Fix issue #2907.

Update the "borrow box" lint to avoid recommending the following
conversion:

```
  // Old
  pub fn f(&mut Box<T>) {...}

  // New
  pub fn f(&mut T) {...}
```

Given a mutable reference to a box, functions may want to change
"which" object the Box is pointing at.

This change avoids recommending removing the "Box" parameter
for mutable references.

changelog: Don't trigger [`borrow_box`] lint on `&mut Box` references
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions