Closed
Description
const VV: Vec<&'static str> =
vec!("A" , "B").drain().map(|s| s).collect::<Vec<&'static str>>();
Obviously it is intended that this code produce a compiler error, but it also causes the compiler to panic with this message:
thread 'rustc' panicked at 'assertion failed: self.mode == Mode::Var',
/home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc/middle/check_const.rs:232