rust-lang/rust-clippy
在 GitHub 查看Politely mention that `Box<&T>` is almost the most useless type you can have
Open
#2,394 创建于 2018年1月23日
A-lintT-middlegood first issue
仓库指标
- Star
- (10,406 star)
- PR 合并指标
- (平均合并 19天 22小时) (30 天内合并 113 个 PR)
描述
Found in the wild: https://stackoverflow.com/questions/48406077/mutation-of-a-variable-inside-while-loop
List of types that make no sense that we should be linting about:
Box<&T>Box::new(SomeT)wheresizeof::<T>() <= sizeof::<usize>()- unless there are
Box::into_rawcalls within the function
- unless there are
Rc<Box<T>>Rc<Rc<T>>Rc<&T>- more...?