Affine types mismatch error

I need spot type error in this function

  fn memory_regions(&self) -> Result<Self::MemoryRegions<'_>, &'static str> {
        Ok(MemoryRegions {
            inner: self
		.memory_map_tag()
		.ok_or("no memory map tag")?
		.memory_areas(),
	})
    }

It's impossible. You have provided way too little information and context.

What is this code supposed to do? What is the error? What is the definition of the type of Self and of MemoryRegions?

2 Likes

Also, it is helpful to include the full compiler output on questions (e.g. when you run cargo check). This shows the error message, details of the type mismatch (found/expected) and usually labeled parts of code that rustc identified as causing the error. This info is crucial for reaching a solution.

my bad . It was my 1st post here.
I ve moved further in rust and this was resolved somehow, hence I don't have the deets atm.
Next time I ll keep that in mind

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.