Bad ambigous error typechecking
Open
Nobody has claimed this yet.
question
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 231
- Avg merge
- 19h 55m
- Merged PRs (30d)
- 67
Description
we're also running into this with this code example - I suspect the fix would be the same and there is something wrong when it comes to references/pointers and mutability:
#![feature(intrinsics)]
#[lang = "sized"]
trait Sized {}
pub struct VaListImpl<'f>;
mod sealed_trait {
pub trait VaArgSafe {}
}
impl<T> sealed_trait::VaArgSafe for *mut T {}
impl<T> sealed_trait::VaArgSafe for *const T {}
impl<'f> VaListImpl<'f> {
/// Advance to the next arg.
#[inline]
pub unsafe fn arg<T: sealed_trait::VaArgSafe>(&mut self) {
va_arg2(self);
}
}
fn va_arg2<T: sealed_trait::VaArgSafe>(ap: &mut VaListImpl<'_>) {}
Originally posted by @CohenArthur in https://github.com/Rust-GCC/gccrs/issues/3032#issuecomment-2127439140
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.