diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-10-01 20:01:42 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-01 20:01:42 +0000 |
| commit | 237ea0d34dced3444486931f68e87cd07f52b6a8 (patch) | |
| tree | 8d538b742385398e78051a011fcfb43d39b555f3 /src/test/codegen/src-hash-algorithm | |
| parent | 6b10decb209ca753bb1e623b94ded0e0ff79892f (diff) | |
| parent | a3661b3900a393b45004a7877d355ef6c7654b25 (diff) | |
| download | rust-237ea0d34dced3444486931f68e87cd07f52b6a8.tar.gz rust-237ea0d34dced3444486931f68e87cd07f52b6a8.zip | |
Merge #10418
10418: Add whitespace between lifetime and mut keyword in "expand macro" command r=lnicola a=nathanwhit
Before, we were only adding whitespace between a lifetime and the following ident, which produced invalid code for mutable references.
Before this PR:
```rust
macro_rules! foo {
() => {
pub struct Foo<'a> {
foo: &'a mut str,
}
};
}
foo!(); // <- expand macro here
```
expanded to
```rust
pub struct Foo< 'a>{
foo: & 'amut str,
}
```
with this PR, it expands to
```rust
pub struct Foo< 'a>{
foo: & 'a mut str,
}
```
Co-authored-by: nathan.whitaker <nathan.whitaker01@gmail.com>
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions
