Rust error on pre_upgrade and post_upgrade attributes

Hi @rem.codes!

Could you please clarify what you mean by that? Does the canister build when you run cargo?

My guess that it might be purely an IDE problem. I wonder if replacing #[pre_upgrade] with #[export_name = "canister_pre_upgrade"] and #[post_upgrade] with #[export_name = "canister_post_upgrade"] could help your IDE figure out what’s going on.

1 Like