diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-28 09:11:03 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-28 09:42:07 +1100 |
| commit | 684c4bfef156e5c0243ca70906db5cc9179fc0ca (patch) | |
| tree | 90ad89984b875fc22576508d45a3b8f8647a3d1f /compiler/rustc_hir_analysis/src/structured_errors.rs | |
| parent | bf86fe130c41c0506c703b551b22f955277d8e4b (diff) | |
| download | rust-684c4bfef156e5c0243ca70906db5cc9179fc0ca.tar.gz rust-684c4bfef156e5c0243ca70906db5cc9179fc0ca.zip | |
Rework `ast::BinOpKind::to_string` and `ast::UnOp::to_string`.
- Rename them both `as_str`, which is the typical name for a function that returns a `&str`. (`to_string` is appropriate for functions returning `String` or maybe `Cow<'a, str>`.) - Change `UnOp::as_str` from an associated function (weird!) to a method. - Avoid needless `self` dereferences.
Diffstat (limited to 'compiler/rustc_hir_analysis/src/structured_errors.rs')
0 files changed, 0 insertions, 0 deletions
