about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorSean Klein <seanmarionklein@gmail.com>2020-04-19 10:49:12 -0400
committerSean Klein <seanmarionklein@gmail.com>2020-04-19 10:56:15 -0400
commit0ef5dee3b8c8e564676faab09039cb8efd7b7e9c (patch)
tree10f6555779b6205366229c61b935dfbddd8240d3 /src/test/codegen/src-hash-algorithm
parentf6b07db3859650b8189af7cce566c93716d97cdc (diff)
downloadrust-0ef5dee3b8c8e564676faab09039cb8efd7b7e9c.tar.gz
rust-0ef5dee3b8c8e564676faab09039cb8efd7b7e9c.zip
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.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions