Repository navigation
declare_tool_lint: allow use without default_field_values feature
#164990
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You will need to write a cross-crate test to test the behavior of using In #![feature(default_field_values)]
#![feature(allow_internal_unstable)]
#[allow_internal_unstable(default_field_values)]
#[macro_export]
macro_rules! foo {
() => { fn foo() { struct Foo {x: usize = 0, } Foo {..}; } };
}In //@ aux-build:aux.rs
//@check-pass
extern crate aux;
use aux::foo;
foo!();
fn main(){You will see different behavior in downstream crate when |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| //@check-pass | ||
|
|
||
| #![allow(internal_features)] | ||
| #![feature(allow_internal_unstable)] | ||
| #[allow_internal_unstable(default_field_values)] | ||
| macro_rules! foo { | ||
| () => { fn foo() { struct Foo {x: usize = 0, } Foo {..}; } }; | ||
| } | ||
|
|
||
| foo!(); | ||
|
|
||
| fn main(){} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea that I get from this diff is whenever we use
#[allow_internal_unstable(default_field_values)]], we always execute theifpath below that suggests adding#![feature(default_field_values)]? I feel I am missing something 🤔