diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/typeck/issue-13853.stderr | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/typeck/issue-13853.stderr | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/test/ui/typeck/issue-13853.stderr b/src/test/ui/typeck/issue-13853.stderr new file mode 100644 index 000000000..657bda5f6 --- /dev/null +++ b/src/test/ui/typeck/issue-13853.stderr @@ -0,0 +1,40 @@ +error[E0308]: mismatched types + --> $DIR/issue-13853.rs:14:9 + | +LL | fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I + | - this type parameter - expected `I` because of return type +... +LL | self.iter() + | ^^^^^^^^^^^ expected type parameter `I`, found struct `std::slice::Iter` + | + = note: expected type parameter `I` + found struct `std::slice::Iter<'_, N>` + +error[E0599]: no method named `iter` found for reference `&G` in the current scope + --> $DIR/issue-13853.rs:27:23 + | +LL | for node in graph.iter() { + | ^^^^ method not found in `&G` + +error[E0308]: mismatched types + --> $DIR/issue-13853.rs:37:13 + | +LL | iterate(graph); + | ------- ^^^^^ + | | | + | | expected reference, found struct `Vec` + | | help: consider borrowing here: `&graph` + | arguments to this function are incorrect + | + = note: expected reference `&_` + found struct `Vec<Stuff>` +note: function defined here + --> $DIR/issue-13853.rs:26:4 + | +LL | fn iterate<N: Node, G: Graph<N>>(graph: &G) { + | ^^^^^^^ --------- + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0308, E0599. +For more information about an error, try `rustc --explain E0308`. |