summaryrefslogtreecommitdiffstats
path: root/src/test/ui/resolve/issue-2356.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/resolve/issue-2356.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/resolve/issue-2356.rs')
-rw-r--r--src/test/ui/resolve/issue-2356.rs94
1 files changed, 0 insertions, 94 deletions
diff --git a/src/test/ui/resolve/issue-2356.rs b/src/test/ui/resolve/issue-2356.rs
deleted file mode 100644
index fe9bf4d44..000000000
--- a/src/test/ui/resolve/issue-2356.rs
+++ /dev/null
@@ -1,94 +0,0 @@
-trait Groom {
- fn shave(other: usize);
-}
-
-pub struct Cat {
- whiskers: isize,
-}
-
-pub enum MaybeDog {
- Dog,
- NoDog
-}
-
-impl MaybeDog {
- fn bark() {
- // If this provides a suggestion, it's a bug as MaybeDog doesn't impl Groom
- shave();
- //~^ ERROR cannot find function `shave`
- }
-}
-
-impl Clone for Cat {
- fn clone(&self) -> Self {
- clone();
- //~^ ERROR cannot find function `clone`
- loop {}
- }
-}
-impl Default for Cat {
- fn default() -> Self {
- default();
- //~^ ERROR cannot find function `default` in this scope [E0425]
- loop {}
- }
-}
-
-impl Groom for Cat {
- fn shave(other: usize) {
- whiskers -= other;
- //~^ ERROR cannot find value `whiskers`
- shave(4);
- //~^ ERROR cannot find function `shave`
- purr();
- //~^ ERROR cannot find function `purr`
- }
-}
-
-impl Cat {
- fn static_method() {}
-
- fn purr_louder() {
- static_method();
- //~^ ERROR cannot find function `static_method`
- purr();
- //~^ ERROR cannot find function `purr`
- purr();
- //~^ ERROR cannot find function `purr`
- purr();
- //~^ ERROR cannot find function `purr`
- }
-}
-
-impl Cat {
- fn meow() {
- if self.whiskers > 3 {
- //~^ ERROR expected value, found module `self`
- println!("MEOW");
- }
- }
-
- fn purr(&self) {
- grow_older();
- //~^ ERROR cannot find function `grow_older`
- shave();
- //~^ ERROR cannot find function `shave`
- }
-
- fn burn_whiskers(&mut self) {
- whiskers = 0;
- //~^ ERROR cannot find value `whiskers`
- }
-
- pub fn grow_older(other:usize) {
- whiskers = 4;
- //~^ ERROR cannot find value `whiskers`
- purr_louder();
- //~^ ERROR cannot find function `purr_louder`
- }
-}
-
-fn main() {
- self += 1;
- //~^ ERROR expected value, found module `self`
-}