Skip to content

Commit 051c5bd

Browse files
committed
Auto merge of #117924 - estebank:issue-53841, r=petrochenkov
When a local binding shadows a fn, point at fn def in call failure When a local binding shadows a function that is then called, this local binding will cause an E0618 error. We now point not only at the binding definition, but also at the locally defined function of the same name. ``` error[E0618]: expected function, found `&str` --> $DIR/issue-22468.rs:3:13 | LL | let foo = "bar"; | --- `foo` has type `&str` LL | let x = foo("baz"); | ^^^------- | | | call expression requires function ... LL | fn foo(file: &str) -> bool { | -------------------------- this function of the same name is available here, but it shadowed by the local binding of the same name ``` Fix #53841
2 parents 2b6683d + 6797c1f commit 051c5bd

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)