diff options
| author | Lukas Markeffsky <@> | 2024-01-05 21:55:09 +0100 |
|---|---|---|
| committer | Lukas Markeffsky <@> | 2024-01-05 21:56:32 +0100 |
| commit | 339fa311ad8140cfb98a1c6080ea7e002b9ce3fa (patch) | |
| tree | b4a2a3c2a3fa122a8761bcc03be10ca79f52920b /tests/ui/resolve | |
| parent | 274674819c3c37e09f5fe0e3276d3921068dbb95 (diff) | |
| download | rust-339fa311ad8140cfb98a1c6080ea7e002b9ce3fa.tar.gz rust-339fa311ad8140cfb98a1c6080ea7e002b9ce3fa.zip | |
fix cycle error for "use constructor" suggestion
Diffstat (limited to 'tests/ui/resolve')
| -rw-r--r-- | tests/ui/resolve/suggest-constructor-cycle-error.rs | 2 | ||||
| -rw-r--r-- | tests/ui/resolve/suggest-constructor-cycle-error.stderr | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/ui/resolve/suggest-constructor-cycle-error.rs b/tests/ui/resolve/suggest-constructor-cycle-error.rs index 2336cd92f4d..e36fffd97d1 100644 --- a/tests/ui/resolve/suggest-constructor-cycle-error.rs +++ b/tests/ui/resolve/suggest-constructor-cycle-error.rs @@ -1,10 +1,10 @@ // aux-build:suggest-constructor-cycle-error.rs -//~^ cycle detected when getting the resolver for lowering [E0391] // Regression test for https://github.com/rust-lang/rust/issues/119625 extern crate suggest_constructor_cycle_error as a; const CONST_NAME: a::Uuid = a::Uuid(()); +//~^ ERROR: cannot initialize a tuple struct which contains private fields [E0423] fn main() {} diff --git a/tests/ui/resolve/suggest-constructor-cycle-error.stderr b/tests/ui/resolve/suggest-constructor-cycle-error.stderr index ae139619c69..c6ec2465a43 100644 --- a/tests/ui/resolve/suggest-constructor-cycle-error.stderr +++ b/tests/ui/resolve/suggest-constructor-cycle-error.stderr @@ -1,15 +1,15 @@ -error[E0391]: cycle detected when getting the resolver for lowering +error[E0423]: cannot initialize a tuple struct which contains private fields + --> $DIR/suggest-constructor-cycle-error.rs:7:29 | - = note: ...which requires normalizing `[u8; suggest_constructor_cycle_error::::m::{impl#0}::encode_buffer::{constant#0}]`... -note: ...which requires resolving instance `suggest_constructor_cycle_error::m::Uuid::encode_buffer::{constant#0}`... - --> $DIR/auxiliary/suggest-constructor-cycle-error.rs:5:40 +LL | const CONST_NAME: a::Uuid = a::Uuid(()); + | ^^^^^^^ | -LL | pub fn encode_buffer() -> [u8; LENGTH] { - | ^^^^^^ - = note: ...which requires calculating the lang items map... - = note: ...which again requires getting the resolver for lowering, completing the cycle - = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information +note: constructor is not visible here due to private fields + --> $DIR/auxiliary/suggest-constructor-cycle-error.rs:2:21 + | +LL | pub struct Uuid(()); + | ^^ private field error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0391`. +For more information about this error, try `rustc --explain E0423`. |
