Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/hir-def/src/expr_store/lower.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/hir-def/src/expr_store/lower.rs b/crates/hir-def/src/expr_store/lower.rs
index b86fad0420..0de980bdf0 100644
--- a/crates/hir-def/src/expr_store/lower.rs
+++ b/crates/hir-def/src/expr_store/lower.rs
@@ -1806,7 +1806,9 @@ impl<'db> ExprCollector<'db> {
};
let record_field_list = e.record_expr_field_list()?;
let ellipsis = record_field_list.dotdot_token().is_some();
- // FIXME: Report an error here if `record_field_list.spread().is_some()`.
+ // We wanted to emit an error here if `record_field_list.spread().is_some()`,
+ // but that's already a syntax error in rustc, so we decided not to.
+ // See https://github.com/rust-lang/rust-analyzer/pull/22206#discussion_r3156097370
let args = record_field_list
.fields()
.filter_map(|f| {
@@ -2819,7 +2821,7 @@ impl<'db> ExprCollector<'db> {
// endregion: patterns
- /// Returns `None` (and emits diagnostics) when `owner` if `#[cfg]`d out, and `Some(())` when
+ /// Returns `false` (and emits diagnostics) when `owner` if `#[cfg]`d out, and `true` when
/// not.
fn check_cfg(&mut self, owner: &dyn ast::HasAttrs) -> bool {
let enabled = self.expander.is_cfg_enabled(owner, self.cfg_options);