Skip to content

tests: fix compilation with --no-default-features#319

Merged
dtolnay merged 1 commit intodtolnay:masterfrom
tamird:fix-tests
Jan 5, 2026
Merged

tests: fix compilation with --no-default-features#319
dtolnay merged 1 commit intodtolnay:masterfrom
tamird:fix-tests

Conversation

@tamird
Copy link
Contributor

@tamird tamird commented Jan 5, 2026

Before this change:

% cargo hack clippy --feature-powerset --all-targets
[...]
info: running `cargo clippy --all-targets --no-default-features` on quote (2/4)
    Checking quote v1.0.42 (/Users/tamird/src/quote)
error[E0277]: the trait bound `proc_macro2::Span: std::convert::From<proc_macro::Span>` is not satisfied
   --> tests/test.rs:566:48
    |
566 |         let _ = quote_spanned!(proc_macro_span.into()=> ...);
    |                                                ^^^^ the trait `std::convert::From<proc_macro::Span>` is not implemented for `proc_macro2::Span`
    |
    = note: required for `proc_macro::Span` to implement `std::convert::Into<proc_macro2::Span>`

Before this change:
```
% cargo hack clippy --feature-powerset --all-targets
[...]
info: running `cargo clippy --all-targets --no-default-features` on quote (2/4)
    Checking quote v1.0.42 (/Users/tamird/src/quote)
error[E0277]: the trait bound `proc_macro2::Span: std::convert::From<proc_macro::Span>` is not satisfied
   --> tests/test.rs:566:48
    |
566 |         let _ = quote_spanned!(proc_macro_span.into()=> ...);
    |                                                ^^^^ the trait `std::convert::From<proc_macro::Span>` is not implemented for `proc_macro2::Span`
    |
    = note: required for `proc_macro::Span` to implement `std::convert::Into<proc_macro2::Span>`
```
Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am accepting this because it is a small change, but in general, when a crate has additive features, it is not a goal that the integration tests would be buildable with anything less than all features enabled.

@dtolnay dtolnay merged commit fc59136 into dtolnay:master Jan 5, 2026
11 checks passed
@tamird tamird deleted the fix-tests branch January 5, 2026 22:17
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

Successfully merging this pull request may close these issues.

2 participants