From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/did_you_mean/issue-40006.stderr | 98 ++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 tests/ui/did_you_mean/issue-40006.stderr (limited to 'tests/ui/did_you_mean/issue-40006.stderr') diff --git a/tests/ui/did_you_mean/issue-40006.stderr b/tests/ui/did_you_mean/issue-40006.stderr new file mode 100644 index 000000000..bdbfa4dd7 --- /dev/null +++ b/tests/ui/did_you_mean/issue-40006.stderr @@ -0,0 +1,98 @@ +error: expected one of `!` or `::`, found `}` + --> $DIR/issue-40006.rs:3:1 + | +LL | impl dyn A { + | - while parsing this item list starting here +LL | Y + | - expected one of `!` or `::` +LL | } + | ^ + | | + | unexpected token + | the item list ends here + +error: expected one of `!` or `::`, found `(` + --> $DIR/issue-40006.rs:8:6 + | +LL | trait X { + | - while parsing this item list starting here +LL | X() {} + | ^ expected one of `!` or `::` +... +LL | } + | - the item list ends here + +error: expected one of `!` or `::`, found `(` + --> $DIR/issue-40006.rs:16:6 + | +LL | trait A { + | - while parsing this item list starting here +LL | X() {} + | ^ expected one of `!` or `::` +LL | } + | - the item list ends here + +error: expected one of `!` or `[`, found `#` + --> $DIR/issue-40006.rs:19:17 + | +LL | fn xxx() { ### } + | ^ expected one of `!` or `[` + +error: expected one of `!` or `::`, found `=` + --> $DIR/issue-40006.rs:22:7 + | +LL | trait C { + | - while parsing this item list starting here +LL | L = M; + | ^ expected one of `!` or `::` +LL | } + | - the item list ends here + +error: expected one of `!` or `::`, found `=` + --> $DIR/issue-40006.rs:25:7 + | +LL | trait D { + | - while parsing this item list starting here +LL | Z = { 2 + 3 }; + | ^ expected one of `!` or `::` +LL | } + | - the item list ends here + +error: expected one of `!` or `::`, found `(` + --> $DIR/issue-40006.rs:28:9 + | +LL | trait E { + | - while parsing this item list starting here +LL | ::Y (); + | ^ expected one of `!` or `::` +LL | } + | - the item list ends here + +error: missing `fn` for method definition + --> $DIR/issue-40006.rs:32:8 + | +LL | impl S { + | - while parsing this item list starting here +LL | pub hello_method(&self) { + | ^ +... +LL | } + | - the item list ends here + | +help: add `fn` here to parse `hello_method` as a public method + | +LL | pub fn hello_method(&self) { + | ++ + +error[E0599]: no method named `hello_method` found for struct `S` in the current scope + --> $DIR/issue-40006.rs:38:7 + | +LL | struct S; + | -------- method `hello_method` not found for this struct +... +LL | S.hello_method(); + | ^^^^^^^^^^^^ method not found in `S` + +error: aborting due to 9 previous errors + +For more information about this error, try `rustc --explain E0599`. -- cgit v1.2.3