You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compiler panics in ambiguous arrayvec type situation #65611
The compiler correctly errors about the ambiguous types, but also panics on this code:
use arrayvec::ArrayVec;
fn main() {
let mut buffer = ArrayVec::new();
let x = buffer.last().unwrap().0.clone();
buffer.reverse();
}
error[E0282]: type annotations needed
--> src/main.rs:5:13
|
5 | let x = buffer.last().unwrap().0.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for `T`
|
= note: type must be known at this point
error[E0609]: no field `0` on type `&_`
--> src/main.rs:5:36
|
5 | let x = buffer.last().unwrap().0.clone();
| ^
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:378:21
Activity
jonas-schievink commentedon Oct 19, 2019
Also reproduces on nightly. Panic happens here:
pnkfelix commentedon Oct 24, 2019
triage: P-medium. removing nomination label.
reasoning: has a PR. tagging as P-medium (since it does produce useful error message before ICE'ing), and removing nomination label.
Rollup merge of rust-lang#65755 - estebank:icicle, r=davidtwco
Rollup merge of rust-lang#65755 - estebank:icicle, r=davidtwco
Rollup merge of rust-lang#83289 - c410-f3r:tests-tests-tests, r=petro…