#![warn(clippy::all)] #![allow(unused, clippy::needless_pass_by_value, clippy::vec_box)] #![feature(associated_type_defaults)] type Alias = Vec>>; // no warning here const CST: (u32, (u32, (u32, (u32, u32)))) = (0, (0, (0, (0, 0)))); static ST: (u32, (u32, (u32, (u32, u32)))) = (0, (0, (0, (0, 0)))); struct S { f: Vec>>, } struct Ts(Vec>>); enum E { Tuple(Vec>>), Struct { f: Vec>> }, } impl S { const A: (u32, (u32, (u32, (u32, u32)))) = (0, (0, (0, (0, 0)))); fn impl_method(&self, p: Vec>>) {} } trait T { const A: Vec>>; type B = Vec>>; fn method(&self, p: Vec>>); fn def_method(&self, p: Vec>>) {} } // Should not warn since there is likely no way to simplify this (#1013) impl T for () { const A: Vec>> = vec![]; type B = Vec>>; fn method(&self, p: Vec>>) {} } fn test1() -> Vec>> { vec![] } fn test2(_x: Vec>>) {} fn test3() { let _y: Vec>> = vec![]; } #[repr(C)] struct D { // should not warn, since we don't have control over the signature (#3222) test4: extern "C" fn( itself: &D, a: usize, b: usize, c: usize, d: usize, e: usize, f: usize, g: usize, h: usize, i: usize, ), } fn main() {}