about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/structured_errors.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-11-28 09:11:03 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-11-28 09:42:07 +1100
commit684c4bfef156e5c0243ca70906db5cc9179fc0ca (patch)
tree90ad89984b875fc22576508d45a3b8f8647a3d1f /compiler/rustc_hir_analysis/src/structured_errors.rs
parentbf86fe130c41c0506c703b551b22f955277d8e4b (diff)
downloadrust-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