diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-04-15 11:20:33 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-06-13 10:41:52 +0000 |
| commit | c75f7283bf52c6e2ec6a178f2b7717a4daddacf4 (patch) | |
| tree | 05d2c77ddb1ba67d34880c15d0a271b7af1cb9dc /tests/ui/impl-trait/method-resolution.current.stderr | |
| parent | b28221e74f5f05d0f7a6212f99c9d5af868c0ed3 (diff) | |
| download | rust-c75f7283bf52c6e2ec6a178f2b7717a4daddacf4.tar.gz rust-c75f7283bf52c6e2ec6a178f2b7717a4daddacf4.zip | |
Add some tests
Diffstat (limited to 'tests/ui/impl-trait/method-resolution.current.stderr')
| -rw-r--r-- | tests/ui/impl-trait/method-resolution.current.stderr | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/method-resolution.current.stderr b/tests/ui/impl-trait/method-resolution.current.stderr new file mode 100644 index 00000000000..6d10693c893 --- /dev/null +++ b/tests/ui/impl-trait/method-resolution.current.stderr @@ -0,0 +1,36 @@ +error[E0599]: no method named `bar` found for struct `Bar<impl Sized>` in the current scope + --> $DIR/method-resolution.rs:23:11 + | +LL | struct Bar<T>(T); + | ------------- method `bar` not found for this struct +... +LL | x.bar(); + | ^^^ method not found in `Bar<impl Sized>` + | + = note: the method was found for + - `Bar<u32>` + +error[E0391]: cycle detected when computing type of opaque `foo::{opaque#0}` + --> $DIR/method-resolution.rs:19:24 + | +LL | fn foo(x: bool) -> Bar<impl Sized> { + | ^^^^^^^^^^ + | +note: ...which requires type-checking `foo`... + --> $DIR/method-resolution.rs:23:9 + | +LL | x.bar(); + | ^ + = note: ...which requires evaluating trait selection obligation `Bar<foo::{opaque#0}>: core::marker::Unpin`... + = note: ...which again requires computing type of opaque `foo::{opaque#0}`, completing the cycle +note: cycle used when computing type of `foo::{opaque#0}` + --> $DIR/method-resolution.rs:19:24 + | +LL | fn foo(x: bool) -> Bar<impl Sized> { + | ^^^^^^^^^^ + = 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 + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0391, E0599. +For more information about an error, try `rustc --explain E0391`. |
