Skip to content

Fix ICE related to tupled arguments #19638

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2014

Conversation

barosl
Copy link
Contributor

@barosl barosl commented Dec 8, 2014

When a type error occurs, check_method_argument_types() tries to provide arguments filled with ty::mk_err(). However, if a function takes the parameters as a tuple, the arguments should be converted to a tuple before passing it to check_argument_types().

Fixes #19521.

@barosl barosl changed the title Fix ICE related to tupled arguments [WIP] Fix ICE related to tupled arguments Dec 8, 2014
@barosl barosl force-pushed the typeck-tupled-arguments-ice branch from 3c1c1b4 to 1912c35 Compare December 8, 2014 07:50
@ghost
Copy link

ghost commented Dec 8, 2014

@barosl Thanks! Could you also add a regression test? See src/test/compile-fail for some examples.

@barosl barosl force-pushed the typeck-tupled-arguments-ice branch from 1912c35 to 1d5aabd Compare December 8, 2014 14:09
@ghost ghost changed the title [WIP] Fix ICE related to tupled arguments Fix ICE related to tupled arguments Dec 9, 2014
When a type error occurs, check_method_argument_types() tries to provide
arguments filled with ty::mk_err(). However, if a function takes the
parameters as a tuple, the arguments should be converted to a tuple
before being passed to check_argument_types().

Fixes rust-lang#19521.
@barosl barosl force-pushed the typeck-tupled-arguments-ice branch from 1d5aabd to 21d12c0 Compare December 10, 2014 03:33
bors added a commit that referenced this pull request Dec 10, 2014
When a type error occurs, `check_method_argument_types()` tries to provide arguments filled with `ty::mk_err()`. However, if a function takes the parameters as a tuple, the arguments should be converted to a tuple before passing it to `check_argument_types()`.

Fixes #19521.
@bors bors closed this Dec 10, 2014
@bors bors merged commit 21d12c0 into rust-lang:master Dec 10, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Apr 28, 2025
doc: Rework generated configuration to have anchors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE with 'index out of bounds: the len is 0 but the index is 0' in librustc/middle/typeck/check/mod.rs:2678
3 participants