about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-10-01 20:01:42 +0000
committerGitHub <noreply@github.com>2021-10-01 20:01:42 +0000
commit237ea0d34dced3444486931f68e87cd07f52b6a8 (patch)
tree8d538b742385398e78051a011fcfb43d39b555f3 /src/test/codegen/src-hash-algorithm
parent6b10decb209ca753bb1e623b94ded0e0ff79892f (diff)
parenta3661b3900a393b45004a7877d355ef6c7654b25 (diff)
downloadrust-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