Skip to content

Slow to produce "cannot find function name in this scope" errors with lots of ??? #105244

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
jruderman opened this issue Dec 4, 2022 · 0 comments · Fixed by #106055
Closed

Slow to produce "cannot find function name in this scope" errors with lots of ??? #105244

jruderman opened this issue Dec 4, 2022 · 0 comments · Fixed by #106055
Labels
C-bug Category: This is a bug. I-compiletime Issue: Problems and improvements with respect to compile times. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jruderman
Copy link
Contributor

Found with a modified fuzz-rustc

Code

fn main() -> Result<(), ()> {
    a(b(c(d(e(
    z???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
    )))))
}

Where it's slow

From -Z time-passes:

  • item_bodies_checking

From sample-head.txt:

  • Deep recursion involving check_call?

Regression

Regression in nightly-2022-10-07, apparently in rollup 4bd3078. I suspect #102694 (@compiler-errors)

Version

rustc 1.67.0-nightly (32e613bba 2022-12-02)
binary: rustc
commit-hash: 32e613bbaafee1bcabba48a2257b838f8d1c03d3
commit-date: 2022-12-02
host: x86_64-apple-darwin
release: 1.67.0-nightly
LLVM version: 15.0.4
@jruderman jruderman added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 4, 2022
@matthiaskrgr matthiaskrgr added I-slow Issue: Problems and improvements with respect to performance of generated code. and removed I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Dec 4, 2022
@nikic nikic added I-compiletime Issue: Problems and improvements with respect to compile times. and removed I-slow Issue: Problems and improvements with respect to performance of generated code. labels Dec 9, 2022
Noratrieb added a commit to Noratrieb/rust that referenced this issue Dec 23, 2022
…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: rust-lang#105973 (comment)

Fixes rust-lang#106030
Fixes rust-lang#105244
@bors bors closed this as completed in de99a87 Dec 23, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. I-compiletime Issue: Problems and improvements with respect to compile times. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
3 participants