Module clippy_lints::utils::sugg [] [src]

Contains utility functions to generate suggestions.

Enums

Sugg

A helper type to build suggestion correctly handling parenthesis.

Constants

ONE

Literal constant 1, for convenience.

Traits

DiagnosticBuilderExt

Convenience extension trait for DiagnosticBuilder.

Functions

make_assoc

Build the string for <lhs> <op> <rhs> adding parenthesis when necessary.

make_binop

Convinience wrapper arround make_assoc and AssocOp::from_ast_binop.

make_unop

Build the string for <op><expr> adding parenthesis when necessary.