Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions crates/flux-desugar/locales/en-US.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,16 @@ desugar_duplicate_definition =
.label = `{$name}` redefined here
.previous_definition = previous definition of `{$name}`

desugar_ambiguous_name =
the name `{$name}` is ambiguous
.label = ambiguous name
.note = two different items named `{$name}` are in scope through glob imports
.first_candidate = `{$name}` could refer to the item imported here
.second_candidate = `{$name}` could also refer to the item imported here

desugar_duplicate_param =
the name `{$name}` is already used as a parameter
.label = already used
identifier `{$name}` is bound more than once in this parameter list
.label = used as a parameter more than once
.first_use = first use of `{$name}`

desugar_unsupported_signature =
Expand All @@ -60,6 +67,10 @@ desugar_unresolved_name =
cannot find {$kind} `{$name}` in this scope
.label = not found in this scope

desugar_unresolved_import =
unresolved import `{$name}`
.label = {$reason}

desugar_invalid_unrefined_param =
invalid use of refinement parameter
.label = parameter `{$var}` refers to a type with no indices
Expand Down
1 change: 1 addition & 0 deletions crates/flux-desugar/src/desugar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,7 @@ impl<'genv, 'tcx> FluxItemCtxt<'genv, 'tcx> {
let sort_decl = self.desugar_sort_decl(sort_decl);
fhir::FluxItem::SortDecl(self.genv.alloc(sort_decl))
}
surface::FluxItem::Use(..) => bug!("unexpected use item"),
}
}

Expand Down
3 changes: 2 additions & 1 deletion crates/flux-desugar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ fn try_desugar_crate<'genv>(genv: GlobalEnv<'genv, '_>) -> Result<fhir::FluxItem
let mut err: Option<ErrorGuaranteed> = None;
for (parent, items) in &specs.flux_items_by_parent {
for item in items {
let def_id = FluxLocalDefId::new(parent.def_id, item.name().name);
let Some(ident) = item.name() else { continue };
let def_id = FluxLocalDefId::new(parent.def_id, ident.name);
FluxItemCtxt::with(genv, resolver_output, def_id, |cx| {
fhir.items.insert(def_id, cx.desugar_flux_item(item));
})
Expand Down
Loading
Loading