summaryrefslogtreecommitdiffstats
path: root/tests/ui/indexing-requires-a-uint.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:24 +0000
commit023939b627b7dc93b01471f7d41fb8553ddb4ffa (patch)
tree60fc59477c605c72b0a1051409062ddecc43f877 /tests/ui/indexing-requires-a-uint.stderr
parentAdding debian version 1.72.1+dfsg1-1. (diff)
downloadrustc-023939b627b7dc93b01471f7d41fb8553ddb4ffa.tar.xz
rustc-023939b627b7dc93b01471f7d41fb8553ddb4ffa.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/indexing-requires-a-uint.stderr')
-rw-r--r--tests/ui/indexing-requires-a-uint.stderr32
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/ui/indexing-requires-a-uint.stderr b/tests/ui/indexing-requires-a-uint.stderr
deleted file mode 100644
index 7a741cfc7..000000000
--- a/tests/ui/indexing-requires-a-uint.stderr
+++ /dev/null
@@ -1,32 +0,0 @@
-error[E0277]: the type `[{integer}]` cannot be indexed by `u8`
- --> $DIR/indexing-requires-a-uint.rs:6:9
- |
-LL | [0][0u8];
- | ^^^ slice indices are of type `usize` or ranges of `usize`
- |
- = help: the trait `SliceIndex<[{integer}]>` is not implemented for `u8`
- = help: the trait `SliceIndex<[T]>` is implemented for `usize`
- = note: required for `[{integer}]` to implement `Index<u8>`
-
-error[E0308]: mismatched types
- --> $DIR/indexing-requires-a-uint.rs:12:18
- |
-LL | bar::<isize>(i); // i should not be re-coerced back to an isize
- | ------------ ^ expected `isize`, found `usize`
- | |
- | arguments to this function are incorrect
- |
-note: function defined here
- --> $DIR/indexing-requires-a-uint.rs:5:8
- |
-LL | fn bar<T>(_: T) {}
- | ^^^ ----
-help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit
- |
-LL | bar::<isize>(i.try_into().unwrap()); // i should not be re-coerced back to an isize
- | ++++++++++++++++++++
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0277, E0308.
-For more information about an error, try `rustc --explain E0277`.