2025-01-28 19:22:55 +01:00
|
|
|
#![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>> = core::iter::repeat_with(|| Vec::with_capacity(42)).take(123).collect();
|
2025-02-28 23:20:48 +01:00
|
|
|
//~^ repeat_vec_with_capacity
|
2025-01-28 19:22:55 +01:00
|
|
|
}
|