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

Fix building with 1.72 #31

Closed
wants to merge 2 commits into from

Conversation

emilk
Copy link
Contributor

@emilk emilk commented Feb 12, 2024

The reported MSRV of this project is 1.72, but rustc 1.72 fails to compile it:

error[E0446]: private type `CommonMarkOptions` in public interface
   --> src/parsers/pulldown.rs:57:5
    |
57  | /     pub fn show(
58  | |         &mut self,
59  | |         ui: &mut egui::Ui,
60  | |         cache: &mut CommonMarkCache,
...   |
63  | |         populate_split_points: bool,
64  | |     ) {
    | |_____^ can't leak private type
    |
   ::: src/lib.rs:240:1
    |
240 |   struct CommonMarkOptions {
    |   ------------------------ `CommonMarkOptions` declared as private

This PR fixes the compilation error, and enforces testing with 1.72 using a rust-toolchain file, which the CI will heed, as will any local cargo check.

This should probably have a patch release.

@lampsitter
Copy link
Owner

The struct is not supposed to be public. Instead the function in the pulldown parser should be pub(crate). The newer compiler must have gotten smart enough to understand that the functions are within a private module. I'll make an alternative fix

@lampsitter
Copy link
Owner

Patch has been released

@lampsitter lampsitter closed this Feb 12, 2024
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