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/numeric/numeric-suffix/numeric-suffix-i32.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 'src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.stderr')
-rw-r--r-- | src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.stderr | 201 |
1 files changed, 201 insertions, 0 deletions
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.stderr b/src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.stderr new file mode 100644 index 000000000..f4fb14e79 --- /dev/null +++ b/src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.stderr @@ -0,0 +1,201 @@ +error[E0308]: mismatched types + --> $DIR/numeric-suffix-i32.rs:28:16 + | +LL | foo::<i32>(42_usize); + | ---------- ^^^^^^^^ expected `i32`, found `usize` + | | + | arguments to this function are incorrect + | +note: function defined here + --> $DIR/numeric-suffix-i32.rs:3:4 + | +LL | fn foo<N>(_x: N) {} + | ^^^ ----- +help: change the type of the numeric literal from `usize` to `i32` + | +LL | foo::<i32>(42_i32); + | ~~~ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix-i32.rs:32:16 + | +LL | foo::<i32>(42_u64); + | ---------- ^^^^^^ expected `i32`, found `u64` + | | + | arguments to this function are incorrect + | +note: function defined here + --> $DIR/numeric-suffix-i32.rs:3:4 + | +LL | fn foo<N>(_x: N) {} + | ^^^ ----- +help: change the type of the numeric literal from `u64` to `i32` + | +LL | foo::<i32>(42_i32); + | ~~~ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix-i32.rs:36:16 + | +LL | foo::<i32>(42_u32); + | ---------- ^^^^^^ expected `i32`, found `u32` + | | + | arguments to this function are incorrect + | +note: function defined here + --> $DIR/numeric-suffix-i32.rs:3:4 + | +LL | fn foo<N>(_x: N) {} + | ^^^ ----- +help: change the type of the numeric literal from `u32` to `i32` + | +LL | foo::<i32>(42_i32); + | ~~~ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix-i32.rs:40:16 + | +LL | foo::<i32>(42_u16); + | ---------- ^^^^^^ expected `i32`, found `u16` + | | + | arguments to this function are incorrect + | +note: function defined here + --> $DIR/numeric-suffix-i32.rs:3:4 + | +LL | fn foo<N>(_x: N) {} + | ^^^ ----- +help: change the type of the numeric literal from `u16` to `i32` + | +LL | foo::<i32>(42_i32); + | ~~~ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix-i32.rs:44:16 + | +LL | foo::<i32>(42_u8); + | ---------- ^^^^^ expected `i32`, found `u8` + | | + | arguments to this function are incorrect + | +note: function defined here + --> $DIR/numeric-suffix-i32.rs:3:4 + | +LL | fn foo<N>(_x: N) {} + | ^^^ ----- +help: change the type of the numeric literal from `u8` to `i32` + | +LL | foo::<i32>(42_i32); + | ~~~ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix-i32.rs:48:16 + | +LL | foo::<i32>(42_isize); + | ---------- ^^^^^^^^ expected `i32`, found `isize` + | | + | arguments to this function are incorrect + | +note: function defined here + --> $DIR/numeric-suffix-i32.rs:3:4 + | +LL | fn foo<N>(_x: N) {} + | ^^^ ----- +help: change the type of the numeric literal from `isize` to `i32` + | +LL | foo::<i32>(42_i32); + | ~~~ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix-i32.rs:52:16 + | +LL | foo::<i32>(42_i64); + | ---------- ^^^^^^ expected `i32`, found `i64` + | | + | arguments to this function are incorrect + | +note: function defined here + --> $DIR/numeric-suffix-i32.rs:3:4 + | +LL | fn foo<N>(_x: N) {} + | ^^^ ----- +help: change the type of the numeric literal from `i64` to `i32` + | +LL | foo::<i32>(42_i32); + | ~~~ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix-i32.rs:57:16 + | +LL | foo::<i32>(42_i16); + | ---------- ^^^^^^ expected `i32`, found `i16` + | | + | arguments to this function are incorrect + | +note: function defined here + --> $DIR/numeric-suffix-i32.rs:3:4 + | +LL | fn foo<N>(_x: N) {} + | ^^^ ----- +help: change the type of the numeric literal from `i16` to `i32` + | +LL | foo::<i32>(42_i32); + | ~~~ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix-i32.rs:61:16 + | +LL | foo::<i32>(42_i8); + | ---------- ^^^^^ expected `i32`, found `i8` + | | + | arguments to this function are incorrect + | +note: function defined here + --> $DIR/numeric-suffix-i32.rs:3:4 + | +LL | fn foo<N>(_x: N) {} + | ^^^ ----- +help: change the type of the numeric literal from `i8` to `i32` + | +LL | foo::<i32>(42_i32); + | ~~~ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix-i32.rs:65:16 + | +LL | foo::<i32>(42.0_f64); + | ---------- ^^^^^^^^ expected `i32`, found `f64` + | | + | arguments to this function are incorrect + | +note: function defined here + --> $DIR/numeric-suffix-i32.rs:3:4 + | +LL | fn foo<N>(_x: N) {} + | ^^^ ----- +help: change the type of the numeric literal from `f64` to `i32` + | +LL | foo::<i32>(42i32); + | ~~~ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix-i32.rs:69:16 + | +LL | foo::<i32>(42.0_f32); + | ---------- ^^^^^^^^ expected `i32`, found `f32` + | | + | arguments to this function are incorrect + | +note: function defined here + --> $DIR/numeric-suffix-i32.rs:3:4 + | +LL | fn foo<N>(_x: N) {} + | ^^^ ----- +help: change the type of the numeric literal from `f32` to `i32` + | +LL | foo::<i32>(42i32); + | ~~~ + +error: aborting due to 11 previous errors + +For more information about this error, try `rustc --explain E0308`. |