More let_else adoptions
This commit is contained in:
parent
d5f9c40e6a
commit
670f5c6ef3
10 changed files with 210 additions and 228 deletions
|
@ -47,11 +47,10 @@ use rls_data::{
|
|||
|
||||
use tracing::{debug, error};
|
||||
|
||||
#[rustfmt::skip] // https://github.com/rust-lang/rustfmt/issues/5213
|
||||
macro_rules! down_cast_data {
|
||||
($id:ident, $kind:ident, $sp:expr) => {
|
||||
let $id = if let super::Data::$kind(data) = $id {
|
||||
data
|
||||
} else {
|
||||
let super::Data::$kind($id) = $id else {
|
||||
span_bug!($sp, "unexpected data kind: {:?}", $id);
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||
#![feature(if_let_guard)]
|
||||
#![feature(nll)]
|
||||
#![feature(let_else)]
|
||||
#![recursion_limit = "256"]
|
||||
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue