-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #106055 - compiler-errors:too-many-calls, r=estebank
Check arg expressions properly on error in `confirm_builtin_call` Makes sure we don't regress diagnostic output when we have an expr error nested inside of a bad fn call: #105973 (comment) Fixes #106030 Fixes #105244
- Loading branch information
Showing
7 changed files
with
101 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
fn main() -> Result<(), ()> { | ||
a(b(c(d(e( | ||
//~^ ERROR cannot find function `a` in this scope | ||
//~| ERROR cannot find function `b` in this scope | ||
//~| ERROR cannot find function `c` in this scope | ||
//~| ERROR cannot find function `d` in this scope | ||
//~| ERROR cannot find function `e` in this scope | ||
z???????????????????????????????????????????????????????????????????????????????????????? | ||
????????????????????????????????????????????????????????????????????????????????????????? | ||
?????????????????????????????????????????????????????????????????? | ||
//~^^^ ERROR cannot find value `z` in this scope | ||
))))) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
error[E0425]: cannot find value `z` in this scope | ||
--> $DIR/fn-to-method-deeply-nested.rs:8:9 | ||
| | ||
LL | z???????????????????????????????????????????????????????????????????????????????????????? | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find function `e` in this scope | ||
--> $DIR/fn-to-method-deeply-nested.rs:2:13 | ||
| | ||
LL | a(b(c(d(e( | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find function `d` in this scope | ||
--> $DIR/fn-to-method-deeply-nested.rs:2:11 | ||
| | ||
LL | a(b(c(d(e( | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find function `c` in this scope | ||
--> $DIR/fn-to-method-deeply-nested.rs:2:9 | ||
| | ||
LL | a(b(c(d(e( | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find function `b` in this scope | ||
--> $DIR/fn-to-method-deeply-nested.rs:2:7 | ||
| | ||
LL | a(b(c(d(e( | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find function `a` in this scope | ||
--> $DIR/fn-to-method-deeply-nested.rs:2:5 | ||
| | ||
LL | a(b(c(d(e( | ||
| ^ not found in this scope | ||
|
||
error: aborting due to 6 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0425`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fn main() { | ||
a((), 1i32 == 2u32); | ||
//~^ ERROR cannot find function `a` in this scope | ||
//~| ERROR mismatched types | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/check-args-on-fn-err-2.rs:2:19 | ||
| | ||
LL | a((), 1i32 == 2u32); | ||
| ---- ^^^^ expected `i32`, found `u32` | ||
| | | ||
| expected because this is `i32` | ||
| | ||
help: change the type of the numeric literal from `u32` to `i32` | ||
| | ||
LL | a((), 1i32 == 2i32); | ||
| ~~~ | ||
|
||
error[E0425]: cannot find function `a` in this scope | ||
--> $DIR/check-args-on-fn-err-2.rs:2:5 | ||
| | ||
LL | a((), 1i32 == 2u32); | ||
| ^ not found in this scope | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0308, E0425. | ||
For more information about an error, try `rustc --explain E0308`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fn main() { | ||
unknown(1, |glyf| { | ||
//~^ ERROR: cannot find function `unknown` in this scope | ||
let actual = glyf; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0425]: cannot find function `unknown` in this scope | ||
--> $DIR/check-args-on-fn-err.rs:2:5 | ||
| | ||
LL | unknown(1, |glyf| { | ||
| ^^^^^^^ not found in this scope | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0425`. |