Skip to content

Commit 657cd62

Browse files
committed
Update unseparated_literal_suffix tests
1 parent 3ff4243 commit 657cd62

10 files changed

+35
-148
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
literal-suffix-style = "separated"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#![warn(clippy::unseparated_literal_suffix)]
2+
3+
fn main() {
4+
let _ = 123i32; // warns
5+
let _ = 123_i32;
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: integer type suffix should be separated by an underscore
2+
--> $DIR/literal_suffix.rs:4:13
3+
|
4+
LL | let _ = 123i32; // warns
5+
| ^^^^^^ help: add an underscore: `123_i32`
6+
|
7+
= note: `-D clippy::unseparated-literal-suffix` implied by `-D warnings`
8+
9+
error: aborting due to previous error
10+
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: error reading Clippy's configuration file `$DIR/clippy.toml`: unknown field `foobar`, expected one of `avoid-breaking-exported-api`, `msrv`, `blacklisted-names`, `cognitive-complexity-threshold`, `cyclomatic-complexity-threshold`, `doc-valid-idents`, `too-many-arguments-threshold`, `type-complexity-threshold`, `single-char-binding-names-threshold`, `too-large-for-stack`, `enum-variant-name-threshold`, `enum-variant-size-threshold`, `verbose-bit-mask-threshold`, `literal-representation-threshold`, `trivial-copy-size-limit`, `pass-by-value-size-limit`, `too-many-lines-threshold`, `array-size-threshold`, `vec-box-size-threshold`, `max-trait-bounds`, `max-struct-bools`, `max-fn-params-bools`, `warn-on-all-wildcard-imports`, `disallowed-methods`, `disallowed-types`, `unreadable-literal-lint-fractions`, `upper-case-acronyms-aggressive`, `cargo-ignore-publish`, `standard-macro-braces`, `enforced-import-renames`, `allowed-scripts`, `third-party` at line 5 column 1
1+
error: error reading Clippy's configuration file `$DIR/clippy.toml`: unknown field `foobar`, expected one of `avoid-breaking-exported-api`, `msrv`, `blacklisted-names`, `cognitive-complexity-threshold`, `cyclomatic-complexity-threshold`, `doc-valid-idents`, `too-many-arguments-threshold`, `type-complexity-threshold`, `single-char-binding-names-threshold`, `too-large-for-stack`, `enum-variant-name-threshold`, `enum-variant-size-threshold`, `verbose-bit-mask-threshold`, `literal-representation-threshold`, `trivial-copy-size-limit`, `pass-by-value-size-limit`, `too-many-lines-threshold`, `array-size-threshold`, `vec-box-size-threshold`, `max-trait-bounds`, `max-struct-bools`, `max-fn-params-bools`, `warn-on-all-wildcard-imports`, `disallowed-methods`, `disallowed-types`, `unreadable-literal-lint-fractions`, `upper-case-acronyms-aggressive`, `cargo-ignore-publish`, `standard-macro-braces`, `enforced-import-renames`, `allowed-scripts`, `literal-suffix-style`, `third-party` at line 5 column 1
22

33
error: aborting due to previous error
44

Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
literal-suffix-style = "unseparated"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#![warn(clippy::unseparated_literal_suffix)]
2+
3+
fn main() {
4+
let _ = 123i32;
5+
let _ = 123_i32; // warns
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: integer type suffix should not be separated by an underscore
2+
--> $DIR/literal_suffix.rs:5:13
3+
|
4+
LL | let _ = 123_i32; // warns
5+
| ^^^^^^^ help: remove the underscore: `123_`
6+
|
7+
= note: `-D clippy::unseparated-literal-suffix` implied by `-D warnings`
8+
9+
error: aborting due to previous error
10+

tests/ui/unseparated_prefix_literals.fixed

-42
This file was deleted.

tests/ui/unseparated_prefix_literals.rs

-42
This file was deleted.

tests/ui/unseparated_prefix_literals.stderr

-63
This file was deleted.

0 commit comments

Comments
 (0)