Files
rust/tests/ui/repeat_vec_with_capacity_nostd.rs
Guillaume Gomez f666fd6417 Update UI tests
2025-02-15 13:38:16 +01:00

12 lines
280 B
Rust

#![warn(clippy::repeat_vec_with_capacity)]
#![allow(clippy::manual_repeat_n)]
#![no_std]
use core::iter;
extern crate alloc;
use alloc::vec::Vec;
fn nostd() {
let _: Vec<Vec<u8>> = iter::repeat(Vec::with_capacity(42)).take(123).collect();
//~^ repeat_vec_with_capacity
}