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