analysis/special_functions: Import glib::translate for mut_override
analysis/functions was cleaned up in the commit before to not emit
`glib::translate::*` imports for special functions; those are
responsible to provide the right imports themselves. Fortunately `copy`
was recently improved to specify whether it needs `mut_override`, which
can now also be used to conditionally provide this import.
@@ -252,6 +252,9 @@ pub fn analyze_imports(specials: &Infos, imports: &mut Imports) {
for (type_, info) in specials.traits() {
use self::Type::*;
match *type_ {
+ Copy if info.first_parameter_mut => {
+ imports.add_with_version("glib::translate::*", info.version)
+ }
Compare => imports.add_with_version("std::cmp", info.version),
Display => imports.add_with_version("std::fmt", info.version),
Hash => imports.add_with_version("std::hash", info.version),
