Skip to content
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

Type inference regression #38323

Closed
Arvamer opened this issue Dec 12, 2016 · 2 comments
Closed

Type inference regression #38323

Arvamer opened this issue Dec 12, 2016 · 2 comments
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.

Comments

@Arvamer
Copy link

Arvamer commented Dec 12, 2016

Following code compiles on stable but fails on nightly:

fn main() {
    let v = [1u16, 2, 3, 4];
    let idx = "1".parse().unwrap();
    println!("{:?}", v.get(idx));
}

rustc version:

rustc 1.15.0-nightly (daf8c1dfc 2016-12-05)
binary: rustc
commit-hash: daf8c1dfce3b448fc581cc319f64632ec22bd0e1
commit-date: 2016-12-05
host: x86_64-unknown-linux-gnu
release: 1.15.0-nightly
LLVM version: 3.9
@bluss bluss added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Dec 12, 2016
@bluss
Copy link
Member

bluss commented Dec 12, 2016

Ah, this is from SliceIndex; <[T]>::get is generic in the index type now. Added in #36340

@Arvamer
Copy link
Author

Arvamer commented Dec 12, 2016

So that's why rustc can't infer type… It's not a big deal and it looks like it's know regression so I will just fix it in my crate, gilrs.

@Arvamer Arvamer closed this as completed Dec 12, 2016
Arvamer-mirror pushed a commit to Arvamer/gilrs that referenced this issue Dec 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Projects
None yet
Development

No branches or pull requests

2 participants