Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo test --no-default-features fails: no longer possible to disable alloc feature? #79

Open
dancerj opened this issue Jan 11, 2023 · 1 comment

Comments

@dancerj
Copy link
Contributor

dancerj commented Jan 11, 2023

I've tried with multiple versions and it seems like test doesn't pass with out 'alloc' feature ? spot checked
4ce4dd3 and 185d613 and it seems like never passed.
CI config suggests this case wasn't covered?
Does anybody use non-alloc since alloc is no longer nightly?

$ rustc --version
rustc 1.63.0

$ rustc --version
rustc 1.48.0

$ cargo test --no-default-features

some snippets:

error[E0277]: the trait bound Arc<dyn Debug>: IntrusivePointer<_> is not satisfied
--> src/intrusive_pointer.rs:224:48
|
224 | let r = IntrusivePointer::into_raw(p);
| -------------------------- ^ expected an implementor of trait IntrusivePointer<_>
| |
| required by a bound introduced by this call
|
help: consider borrowing here
|
224 | let r = IntrusivePointer::into_raw(&p);
| +

error[E0277]: the trait bound Arc<dyn Debug>: IntrusivePointer<dyn Debug> is not satisfied
--> src/intrusive_pointer.rs:227:34
|
227 | let p2: Arc = IntrusivePointer::from_raw(r);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait IntrusivePointer<dyn Debug> is not implemented for Arc<dyn Debug>
|
= help: the following other types implement trait IntrusivePointer<T>:
&'a T
UnsafeRef

error[E0277]: the trait bound Rc<dyn Debug>: IntrusivePointer<_> is not satisfied
--> src/intrusive_pointer.rs:208:48
|
208 | let r = IntrusivePointer::into_raw(p);
| -------------------------- ^ expected an implementor of trait IntrusivePointer<_>
| |
| required by a bound introduced by this call
|
help: consider borrowing here
|
208 | let r = IntrusivePointer::into_raw(&p);
| +

error[E0277]: the trait bound Rc<dyn Debug>: IntrusivePointer<dyn Debug> is not satisfied
--> src/intrusive_pointer.rs:211:33
|
211 | let p2: Rc = IntrusivePointer::from_raw(r);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait IntrusivePointer<dyn Debug> is not implemented for Rc<dyn Debug>
|
= help: the following other types implement trait IntrusivePointer<T>:
&'a T
UnsafeRef

error[E0277]: the trait bound Box<dyn Debug>: IntrusivePointer<_> is not satisfied
--> src/intrusive_pointer.rs:192:48
|
192 | let r = IntrusivePointer::into_raw(p);
| -------------------------- ^ expected an implementor of trait IntrusivePointer<_>
| |
| required by a bound introduced by this call
|
help: consider borrowing here
|
192 | let r = IntrusivePointer::into_raw(&p);
| +

error[E0277]: the trait bound Box<dyn Debug>: IntrusivePointer<dyn Debug> is not satisfied
--> src/intrusive_pointer.rs:195:34
|
195 | let p2: Box = IntrusivePointer::from_raw(r);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait IntrusivePointer<dyn Debug> is not implemented for Box<dyn Debug>
|
= help: the following other types implement trait IntrusivePointer<T>:
&'a T
UnsafeRef

@Amanieu
Copy link
Owner

Amanieu commented Jan 11, 2023

The tests were never designed to work without the alloc feature. We could add a check in CI that the crate builds (cargo check --no-default-features) though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants