Cannot get rustfmt to ignore files when depending on crate

I'm building some code generation and using the rustfmt crate in my tests to make sure the code I generate matches a golden file.

I also have some code generated files in the library that needs to be skipped, and before adding the new tests I simple had #[rustfmt::skip], which of course now doesn't work because there's no proc_macro in rustfmt that matches skip. I tried to add a rustfmt.toml file to ignore the file itself, but when I run rustfmt I get

Warning: can't set `ignore = IgnoreList { path_set: {"...."}, rustfmt_toml_path: "" }`, unstable features are only available in nightly channel.

And the file is still formatted.

Any help would be welcome. I'm also sorry if this isn't the right discourse and I'll happily delete it.

The "Warning" message implies that it may work in the nightly channel. Have you tested under nightly to see whether the feature you need is available there, but not yet in stable?

It seems the feature was stabilized 4 days ago;

The documentation says that it is stable though. I guess the documentation is not versioned?

Stabilization does not instantly progress the code from nightly through beta to stable. That progression occurs once every six weeks, late on a Thursday U.S. time. Rust 1.43.0 was released on 23 April 2020. Thus I would expect this feature to become available in beta on 4 June with the release of Rust 1.44.0, and in stable on 16 July with the release of Rust 1.45.0.

You can also find the projected dates here:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.