|
113 | 113 | //! More documentation can be found in each respective module below, and you can |
114 | 114 | //! also check out the `src/bootstrap/README.md` file for more information. |
115 | 115 |
|
| 116 | +#![deny(bare_trait_objects)] |
116 | 117 | #![deny(warnings)] |
117 | 118 | #![feature(core_intrinsics)] |
118 | 119 | #![feature(drain_filter)] |
@@ -1174,13 +1175,13 @@ impl Build { |
1174 | 1175 | /// Copies the `src` directory recursively to `dst`. Both are assumed to exist |
1175 | 1176 | /// when this function is called. Unwanted files or directories can be skipped |
1176 | 1177 | /// by returning `false` from the filter function. |
1177 | | - pub fn cp_filtered(&self, src: &Path, dst: &Path, filter: &Fn(&Path) -> bool) { |
| 1178 | + pub fn cp_filtered(&self, src: &Path, dst: &Path, filter: &dyn Fn(&Path) -> bool) { |
1178 | 1179 | // Immediately recurse with an empty relative path |
1179 | 1180 | self.recurse_(src, dst, Path::new(""), filter) |
1180 | 1181 | } |
1181 | 1182 |
|
1182 | 1183 | // Inner function does the actual work |
1183 | | - fn recurse_(&self, src: &Path, dst: &Path, relative: &Path, filter: &Fn(&Path) -> bool) { |
| 1184 | + fn recurse_(&self, src: &Path, dst: &Path, relative: &Path, filter: &dyn Fn(&Path) -> bool) { |
1184 | 1185 | for f in self.read_dir(src) { |
1185 | 1186 | let path = f.path(); |
1186 | 1187 | let name = path.file_name().unwrap(); |
|
0 commit comments