diff options
| author | est31 <MTest31@outlook.com> | 2022-02-02 12:45:20 +0100 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2022-02-02 17:11:01 +0100 |
| commit | 670f5c6ef385f251df5cd7bcba9e8039a80bdb4d (patch) | |
| tree | cdf352502795e4fb84b125e3a9c6f4162f6f4d24 /compiler/rustc_save_analysis/src | |
| parent | d5f9c40e6a9ecc62432e71e886cef83a4c2c9b98 (diff) | |
| download | rust-670f5c6ef385f251df5cd7bcba9e8039a80bdb4d.tar.gz rust-670f5c6ef385f251df5cd7bcba9e8039a80bdb4d.zip | |
More let_else adoptions
Diffstat (limited to 'compiler/rustc_save_analysis/src')
| -rw-r--r-- | compiler/rustc_save_analysis/src/dump_visitor.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_save_analysis/src/lib.rs | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_save_analysis/src/dump_visitor.rs b/compiler/rustc_save_analysis/src/dump_visitor.rs index 8b4ab77dffb..a3f7e84b1d5 100644 --- a/compiler/rustc_save_analysis/src/dump_visitor.rs +++ b/compiler/rustc_save_analysis/src/dump_visitor.rs @@ -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); }; }; diff --git a/compiler/rustc_save_analysis/src/lib.rs b/compiler/rustc_save_analysis/src/lib.rs index c14b459570f..2eebddb47df 100644 --- a/compiler/rustc_save_analysis/src/lib.rs +++ b/compiler/rustc_save_analysis/src/lib.rs @@ -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))] |
