diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-29 10:17:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-29 10:17:13 +0100 |
| commit | 949769cf3bb3f81293fbdaaac64d38bd97942158 (patch) | |
| tree | a61535921a61cb8141bd300c3cfe5632e0ce32af /src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs | |
| parent | 558301034741d52ea37eba8957d16291d507e015 (diff) | |
| parent | ad29c177f463f1c4af5bc0dfc36d0bd262198067 (diff) | |
| download | rust-949769cf3bb3f81293fbdaaac64d38bd97942158.tar.gz rust-949769cf3bb3f81293fbdaaac64d38bd97942158.zip | |
Rollup merge of #92372 - dtolnay:fntype, r=jackh726
Print space after formal generic params in fn type
Follow-up to #92238 fixing one of the FIXMEs.
```rust
macro_rules! repro {
($ty:ty) => {
stringify!($ty)
};
}
fn main() {
println!("{}", repro!(for<'a> fn(&'a u8)));
}
```
Before: `for<'a>fn(&'a u8)`
After: `for<'a> fn(&'a u8)`
The pretty printer's `print_formal_generic_params` already prints formal generic params correctly with a space, we just need to call it when printing BareFn types instead of reimplementing the printing incorrectly without a space.
https://github.com/rust-lang/rust/blob/83b15bfe1c15f325bc186ebfe3691b729ed59f2b/compiler/rustc_ast_pretty/src/pprust/state.rs#L1394-L1400
Diffstat (limited to 'src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs')
0 files changed, 0 insertions, 0 deletions
