-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
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
Metadata
Metadata
Assignees
Labels
regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
bluss commentedon Dec 12, 2016
Ah, this is from SliceIndex;
<[T]>::get
is generic in the index type now. Added in #36340Arvamer commentedon 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.
Fix for type inference error on nightly rustc