diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-21 20:26:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-21 20:26:22 +0000 |
commit | 470e5144f65433eaf16ef4bb8540390660c8d877 (patch) | |
tree | bad8467a78f300cc72ca6f9825ca52a0da1a6ae1 /gcc/rust/backend/rust-compile-stmt.h | |
parent | 7d3157eec84ef8620f4648200f54b293e561b8c4 (diff) | |
parent | c14fad231870eebbd1102c1eb86124a53a3e8ac0 (diff) | |
download | gcc-470e5144f65433eaf16ef4bb8540390660c8d877.zip gcc-470e5144f65433eaf16ef4bb8540390660c8d877.tar.gz gcc-470e5144f65433eaf16ef4bb8540390660c8d877.tar.bz2 |
Merge #512
512: Fix various Wformat-diag diagnostics r=philberty a=dkm
Fix warnings mainly coming from ` being used instead of %< and %>.
Also fixing occurences of :
```
../../gcc/rust/lex/rust-token.cc:126:40: warning: unquoted sequence of 2 consecutive punctuation characters ‘',’ in format [-Wformat-diag]
126 | "attempted to get string for '%s', which has no string. "
| ^~
../../gcc/rust/lex/rust-token.cc:127:39: warning: spurious trailing punctuation sequence ‘.’ in format [-Wformat-diag]
127 | "returning empty string instead.",
| ^
../../gcc/rust/lex/rust-token.cc:126:37: warning: unterminated quote character ‘'’ in format [-Wformat-diag]
126 | "attempted to get string for '%s', which has no string. "
| ^
```
and various occurences of :
```
../../gcc/rust/lex/rust-lex.cc:1326:11: warning: unquoted keyword ‘char’ in format [-Wformat-diag]
1326 | "byte char %<%c%> out of range", byte_char);
| ^~~~
```
Also using full word for arguments, integer, character, declaration, variable,
floting-point instead of args, int, char, decl, var, float when applicable.
Co-authored-by: Marc Poulhiès <dkm@kataplop.net>
Diffstat (limited to 'gcc/rust/backend/rust-compile-stmt.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-stmt.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/rust/backend/rust-compile-stmt.h b/gcc/rust/backend/rust-compile-stmt.h index a777df6..5f37e07 100644 --- a/gcc/rust/backend/rust-compile-stmt.h +++ b/gcc/rust/backend/rust-compile-stmt.h @@ -64,7 +64,8 @@ public: if (!ctx->get_tyctx ()->lookup_type (stmt.get_mappings ().get_hirid (), &ty)) { - rust_fatal_error (stmt.get_locus (), "failed to lookup var decl type"); + rust_fatal_error (stmt.get_locus (), + "failed to lookup variable declaration type"); return; } @@ -72,7 +73,7 @@ public: if (!ctx->lookup_var_decl (stmt.get_mappings ().get_hirid (), &var)) { rust_fatal_error (stmt.get_locus (), - "failed to lookup compiled variable decl"); + "failed to lookup compiled variable declaration"); return; } |