You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm upgrading a 2015 project to 2018 and ran into a wall of errors. I started with the E0423 (as seen in the example), but couldn't figure out why Rust thought this struct had private fields.
error[E0423]: expected function, found struct `Sequence`
--> src/main.rs:7:19
|
7 | let payload = Sequence(data.iter());
| ^^^^^^^^ constructor is not visible here due to private fields
help: possible better candidates are found in other modules, you can import them into scope
|
1 | use ring::io::der::Tag::Sequence;
|
1 | use serde_yaml::Value::Sequence;
|
1 | use weedle::term::Sequence;
|
1 | use weedle::types::NonAnyType::Sequence;
pub T is pub. Since I was getting nowhere with that error, I moved on to the missing serde imports, which fixed the E0423 error.
I'm reporting this, because the error is unexpected to a perpetual newbie such as myself. If Rust cannot make sense of the attributes, I would expect Rust to ignore them as if they weren't there, and recognize the pub T, so the E0423 wasn't erroneously reported.
The text was updated successfully, but these errors were encountered:
I'm not sure I follow what a "nightly-only regression" is. The playground example reports E0423 on stable.
That aside, I thought I tested the nightly compiler on the playground example, but apparently I misclicked, because the nightly compiler doesn't report E0423. Looks like #66669 will fix this issue. My apologies for the noise.
Example at https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=0a4268fac37b445aada5d32934c465ae.
I'm upgrading a 2015 project to 2018 and ran into a wall of errors. I started with the E0423 (as seen in the example), but couldn't figure out why Rust thought this
struct
had private fields.pub T
ispub
. Since I was getting nowhere with that error, I moved on to the missingserde
imports, which fixed the E0423 error.I'm reporting this, because the error is unexpected to a perpetual newbie such as myself. If Rust cannot make sense of the attributes, I would expect Rust to ignore them as if they weren't there, and recognize the
pub T
, so the E0423 wasn't erroneously reported.The text was updated successfully, but these errors were encountered: