-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
missing-copy-implementations warning only triggers on externally-reachable types. #19712
Comments
I believe this is intentional. |
This might be a problem though, if we had a private
And use that inside of a public struct:
|
Triage: this compiles today. Closing. |
What compiles today? The examples give me
without a |
Whoops! I don't know what I did wrong, but when I had typed that, the example verbatim compiled. Trying again, I get the same error as you. I must have screwed up a filename or something. |
This is a legitimate bug, |
Fixed by #31641, needs a test. |
The topmost example still fails. Tested on |
@topecongiro #![deny(missing_copy_implementations)]
mod inner {
pub struct Foo {
pub field: i32
}
}
pub fn foo() -> inner::Foo {
inner::Foo { field: 42 }
}
fn main() {} Result:
|
I see. I should have searched other issues before commenting. Thank you for you reply! |
example,
foo.rs
:bar.rs
:foo
compiles cleanly,bar
doesn't compile because oh no! I've forgotten to makefoo::inner::Foo
Copy
able.The text was updated successfully, but these errors were encountered: