Add test case for same_item_push
This commit is contained in:
parent
1e8ada3cab
commit
161f475100
@ -1114,6 +1114,7 @@ impl<'a, 'tcx> Visitor<'tcx> for ForPatternVisitor<'a, 'tcx> {
|
||||
| ExprKind::Cast(expr, _)
|
||||
| ExprKind::Type(expr, _)
|
||||
| ExprKind::AddrOf(_, _, expr)
|
||||
| ExprKind::Field(expr, _)
|
||||
| ExprKind::Struct(_, _, Some(expr)) => self.visit_expr(expr),
|
||||
_ => {
|
||||
// Exploration cannot continue ... calculate the hir_id of the current
|
||||
|
@ -74,4 +74,16 @@ fn main() {
|
||||
for _ in 0..5 {
|
||||
println!("Same Item Push");
|
||||
}
|
||||
|
||||
struct A {
|
||||
kind: u32,
|
||||
}
|
||||
let mut vec_a: Vec<A> = Vec::new();
|
||||
for i in 0..30 {
|
||||
vec_a.push(A{kind: i});
|
||||
}
|
||||
let mut vec12: Vec<u8> = Vec::new();
|
||||
for a in vec_a {
|
||||
vec12.push(2u8.pow(a.kind));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user