mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 10:39:45 +00:00
Merge from rust-lang/rust
This commit is contained in:
commit
6225bb9c44
15 changed files with 69 additions and 219 deletions
|
|
@ -3789,35 +3789,6 @@ The tracking issue for this feature is: [#64797]
|
|||
[#64797]: https://github.com/rust-lang/rust/issues/64797
|
||||
|
||||
------------------------
|
||||
"##,
|
||||
default_severity: Severity::Allow,
|
||||
warn_since: None,
|
||||
deny_since: None,
|
||||
},
|
||||
Lint {
|
||||
label: "cfg_boolean_literals",
|
||||
description: r##"# `cfg_boolean_literals`
|
||||
|
||||
The tracking issue for this feature is: [#131204]
|
||||
|
||||
[#131204]: https://github.com/rust-lang/rust/issues/131204
|
||||
|
||||
------------------------
|
||||
|
||||
The `cfg_boolean_literals` feature makes it possible to use the `true`/`false`
|
||||
literal as cfg predicate. They always evaluate to true/false respectively.
|
||||
|
||||
## Examples
|
||||
|
||||
```rust
|
||||
#![feature(cfg_boolean_literals)]
|
||||
|
||||
#[cfg(true)]
|
||||
const A: i32 = 5;
|
||||
|
||||
#[cfg(all(false))]
|
||||
const A: i32 = 58 * 89;
|
||||
```
|
||||
"##,
|
||||
default_severity: Severity::Allow,
|
||||
warn_since: None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue