Skip to content

Commit 278ad5e

Browse files
authored
Make unsafe_await ghost location. (#6452)
So it does not cover the rest on hover. rescript-lang/rescript-vscode#838
1 parent fbbb84b commit 278ad5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jscomp/ml/ast_await.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ let is_await : Parsetree.attribute -> bool =
22
fun ({txt}, _) -> txt = "await" || txt = "res.await"
33

44
let create_await_expression (e : Parsetree.expression) =
5-
let loc = e.pexp_loc in
5+
let loc = {e.pexp_loc with loc_ghost = true} in
66
let unsafe_await =
77
Ast_helper.Exp.ident ~loc
88
{txt = Ldot (Ldot (Lident "Js", "Promise"), "unsafe_await"); loc}

0 commit comments

Comments
 (0)