You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Configurations.md
+12-15Lines changed: 12 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -2405,10 +2405,16 @@ required_version="1.0.*" # matches any version with the same major and minor ver
2405
2405
2406
2406
#### Multiple versions to match:
2407
2407
2408
-
Except by `*`, can be used by any of the semver operators can be combined, being split with commas. The comparison is done using `&&` operator.
2408
+
Except by `*`, any of the semver operators can be combined, being split with commas. The comparison is done using `&&` operator.
2409
+
2410
+
`*` can't be used with other comparators.
2411
+
2412
+
Since `*` has range restrictions, any comparator will override the wildcard operator. When `*` is used alone, the comparison always fails, as that's an invalid config. `*, <1.0.0` for example is invalid.
2413
+
2414
+
Versions can't contradict themselves, otherwise they'll always fail. Some examples are `"1.*, <2.0.0"` and `1.0.*, <2.0.0`, since both versions can't be true at the same time.
2415
+
2416
+
By now, `&&` (using comma `,`) is the only way to declare `required_version`. `||` Operator is not valid. Valid examples are `1.0.0, 1.1.0` and `1.0.0, 1.1.0, 1.1.*` but not `1.0.0 || 1.1.0` or `1.0.0, 2.0.0`.
2409
2417
2410
-
`*` has range restrictions as any comparator will override the wildcard operator. When `*` is used within a range, the comparison always fails.
2411
-
2412
2418
```toml
2413
2419
required_version=">=1.0.0, <2.0.0"
2414
2420
```
@@ -2740,17 +2746,6 @@ By default this option is set as a percentage of [`max_width`](#max_width) provi
2740
2746
2741
2747
See also [`max_width`](#max_width) and [`use_small_heuristics`](#use_small_heuristics)
2742
2748
2743
-
## `style_edition`
2744
-
2745
-
Controls the edition of the [Rust Style Guide] to use for formatting ([RFC 3338])
0 commit comments