(code: &str, start: usize)
| 3750 | } |
| 3751 | |
| 3752 | fn has_forbidden_prefix(code: &str, start: usize) -> bool { |
| 3753 | if start == 0 { |
| 3754 | return false; |
| 3755 | } |
| 3756 | let prefix = &code[..start]; |
| 3757 | prefix.ends_with("::") || prefix.ends_with('.') |
| 3758 | } |
| 3759 | |
| 3760 | fn suggestion_new() -> &'static str { |
| 3761 | "Use fl::make_unique<T>() or fl::make_shared<T>() instead of bare 'new', or add '// ok bare allocation' to suppress" |
no test coverage detected