diff options
| author | Michael Goulet <michael@errs.io> | 2024-09-11 17:23:56 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-09-11 17:24:01 -0400 |
| commit | af8d911d63d6b38ea2da36a330b035dd2e6f89a7 (patch) | |
| tree | ad39949e1071a021f16e808ecf00f6148dd0d488 /compiler/rustc_resolve/src/rustdoc.rs | |
| parent | 954419aab01264707f116899e77be682b02764ea (diff) | |
| download | rust-af8d911d63d6b38ea2da36a330b035dd2e6f89a7.tar.gz rust-af8d911d63d6b38ea2da36a330b035dd2e6f89a7.zip | |
Also fix if in else
Diffstat (limited to 'compiler/rustc_resolve/src/rustdoc.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/rustdoc.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_resolve/src/rustdoc.rs b/compiler/rustc_resolve/src/rustdoc.rs index 976c4acb212..bed3baa30fb 100644 --- a/compiler/rustc_resolve/src/rustdoc.rs +++ b/compiler/rustc_resolve/src/rustdoc.rs @@ -270,12 +270,10 @@ fn strip_generics_from_path_segment(segment: Vec<char>) -> Result<String, Malfor // Give a helpful error message instead of completely ignoring the angle brackets. return Err(MalformedGenerics::HasFullyQualifiedSyntax); } + } else if param_depth == 0 { + stripped_segment.push(c); } else { - if param_depth == 0 { - stripped_segment.push(c); - } else { - latest_generics_chunk.push(c); - } + latest_generics_chunk.push(c); } } |
