Reblessed tests.
This commit is contained in:
parent
c105c28de0
commit
10b6daa6c8
@ -2,7 +2,7 @@
|
||||
{ "type": "test", "event": "started", "name": "a" }
|
||||
{ "type": "test", "name": "a", "event": "ok" }
|
||||
{ "type": "test", "event": "started", "name": "b" }
|
||||
{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'main' panicked at 'assertion failed: false', f.rs:8:5\nnote: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.\n" }
|
||||
{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'main' panicked at 'assertion failed: false', f.rs:8:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.\n" }
|
||||
{ "type": "test", "event": "started", "name": "c" }
|
||||
{ "type": "test", "name": "c", "event": "ok" }
|
||||
{ "type": "test", "event": "started", "name": "d" }
|
||||
|
@ -8,7 +8,7 @@ fn check_for_no_backtrace(test: std::process::Output) {
|
||||
let mut it = err.lines();
|
||||
|
||||
assert_eq!(it.next().map(|l| l.starts_with("thread '<unnamed>' panicked at")), Some(true));
|
||||
assert_eq!(it.next(), Some("note: Run with `RUST_BACKTRACE=1` \
|
||||
assert_eq!(it.next(), Some("note: run with `RUST_BACKTRACE=1` \
|
||||
environment variable to display a backtrace."));
|
||||
assert_eq!(it.next().map(|l| l.starts_with("thread 'main' panicked at")), Some(true));
|
||||
assert_eq!(it.next(), None);
|
||||
|
@ -27,7 +27,7 @@ stderr:
|
||||
stderr 1
|
||||
stderr 2
|
||||
thread 'main' panicked at 'oh no', $DIR/failed-doctest-output.rs:7:1
|
||||
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
|
||||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
|
||||
|
||||
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
|
||||
--> $DIR/duplicate.rs:7:12
|
||||
|
|
||||
LL | #![feature(impl_trait_in_bindings)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:12:36
|
||||
|
|
||||
@ -624,4 +630,3 @@ error: could not find defining uses
|
||||
|
||||
error: aborting due to 93 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0719`.
|
||||
|
6
src/test/ui/associated-type-bounds/dyn-lcsit.stderr
Normal file
6
src/test/ui/associated-type-bounds/dyn-lcsit.stderr
Normal file
@ -0,0 +1,6 @@
|
||||
warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
|
||||
--> $DIR/dyn-lcsit.rs:4:12
|
||||
|
|
||||
LL | #![feature(impl_trait_in_bindings)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -2,9 +2,7 @@ error[E0623]: lifetime mismatch
|
||||
--> $DIR/implied-region-constraints.rs:19:64
|
||||
|
|
||||
LL | fn _bad_st<'a, 'b, T>(x: St<'a, 'b, T>)
|
||||
| -------------
|
||||
| |
|
||||
| this type is declared with multiple lifetimes...
|
||||
| ------------- this type is declared with multiple lifetimes...
|
||||
...
|
||||
LL | let _failure_proves_not_implied_outlives_region_b: &'b T = &x.f0;
|
||||
| ^^^^^ ...but data with one lifetime flows into the other here
|
||||
@ -13,13 +11,10 @@ error[E0623]: lifetime mismatch
|
||||
--> $DIR/implied-region-constraints.rs:40:72
|
||||
|
|
||||
LL | fn _bad_en7<'a, 'b, T>(x: En7<'a, 'b, T>)
|
||||
| --------------
|
||||
| |
|
||||
| this type is declared with multiple lifetimes...
|
||||
| -------------- this type is declared with multiple lifetimes...
|
||||
...
|
||||
LL | let _failure_proves_not_implied_outlives_region_b: &'b T = &x;
|
||||
| ^^ ...but data with one lifetime flows into the other here
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0623`.
|
||||
|
6
src/test/ui/associated-type-bounds/lcsit.stderr
Normal file
6
src/test/ui/associated-type-bounds/lcsit.stderr
Normal file
@ -0,0 +1,6 @@
|
||||
warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
|
||||
--> $DIR/lcsit.rs:4:12
|
||||
|
|
||||
LL | #![feature(impl_trait_in_bindings)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -49,7 +49,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | let _: i32 = f2(2i32);
|
||||
| ^^^^^^^^ expected i32, found u32
|
||||
help: you can convert an `u32` to `i32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | let _: i32 = f2(2i32).try_into().unwrap();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,80 +1,5 @@
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast)
|
||||
--> $DIR/borrowck-closures-two-mut.rs:14:24
|
||||
|
|
||||
LL | let c1 = to_fn_mut(|| x = 4);
|
||||
| -- - previous borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| first mutable borrow occurs here
|
||||
LL | let c2 = to_fn_mut(|| x = 5);
|
||||
| ^^ - borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| second mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - first borrow ends here
|
||||
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast)
|
||||
--> $DIR/borrowck-closures-two-mut.rs:26:24
|
||||
|
|
||||
LL | let c1 = to_fn_mut(|| set(&mut x));
|
||||
| -- - previous borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| first mutable borrow occurs here
|
||||
LL | let c2 = to_fn_mut(|| set(&mut x));
|
||||
| ^^ - borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| second mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - first borrow ends here
|
||||
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast)
|
||||
--> $DIR/borrowck-closures-two-mut.rs:34:24
|
||||
|
|
||||
LL | let c1 = to_fn_mut(|| x = 5);
|
||||
| -- - previous borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| first mutable borrow occurs here
|
||||
LL | let c2 = to_fn_mut(|| set(&mut x));
|
||||
| ^^ - borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| second mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - first borrow ends here
|
||||
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast)
|
||||
--> $DIR/borrowck-closures-two-mut.rs:42:24
|
||||
|
|
||||
LL | let c1 = to_fn_mut(|| x = 5);
|
||||
| -- - previous borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| first mutable borrow occurs here
|
||||
LL | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure)
|
||||
| ^^ - borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| second mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - first borrow ends here
|
||||
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast)
|
||||
--> $DIR/borrowck-closures-two-mut.rs:55:24
|
||||
|
|
||||
LL | let c1 = to_fn_mut(|| set(&mut *x.f));
|
||||
| -- - previous borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| first mutable borrow occurs here
|
||||
LL | let c2 = to_fn_mut(|| set(&mut *x.f));
|
||||
| ^^ - borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| second mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - first borrow ends here
|
||||
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
|
||||
--> $DIR/borrowck-closures-two-mut.rs:14:24
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time
|
||||
--> $DIR/borrowck-closures-two-mut.rs:12:24
|
||||
|
|
||||
LL | let c1 = to_fn_mut(|| x = 4);
|
||||
| -- - first borrow occurs due to use of `x` in closure
|
||||
@ -84,12 +9,11 @@ LL | let c2 = to_fn_mut(|| x = 5);
|
||||
| ^^ - second borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| second mutable borrow occurs here
|
||||
LL |
|
||||
LL | drop((c1, c2));
|
||||
| -- first borrow later used here
|
||||
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
|
||||
--> $DIR/borrowck-closures-two-mut.rs:26:24
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time
|
||||
--> $DIR/borrowck-closures-two-mut.rs:23:24
|
||||
|
|
||||
LL | let c1 = to_fn_mut(|| set(&mut x));
|
||||
| -- - first borrow occurs due to use of `x` in closure
|
||||
@ -99,12 +23,11 @@ LL | let c2 = to_fn_mut(|| set(&mut x));
|
||||
| ^^ - second borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| second mutable borrow occurs here
|
||||
LL |
|
||||
LL | drop((c1, c2));
|
||||
| -- first borrow later used here
|
||||
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
|
||||
--> $DIR/borrowck-closures-two-mut.rs:34:24
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time
|
||||
--> $DIR/borrowck-closures-two-mut.rs:30:24
|
||||
|
|
||||
LL | let c1 = to_fn_mut(|| x = 5);
|
||||
| -- - first borrow occurs due to use of `x` in closure
|
||||
@ -114,12 +37,11 @@ LL | let c2 = to_fn_mut(|| set(&mut x));
|
||||
| ^^ - second borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| second mutable borrow occurs here
|
||||
LL |
|
||||
LL | drop((c1, c2));
|
||||
| -- first borrow later used here
|
||||
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
|
||||
--> $DIR/borrowck-closures-two-mut.rs:42:24
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time
|
||||
--> $DIR/borrowck-closures-two-mut.rs:37:24
|
||||
|
|
||||
LL | let c1 = to_fn_mut(|| x = 5);
|
||||
| -- - first borrow occurs due to use of `x` in closure
|
||||
@ -129,12 +51,12 @@ LL | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nes
|
||||
| ^^ - second borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| second mutable borrow occurs here
|
||||
...
|
||||
LL |
|
||||
LL | drop((c1, c2));
|
||||
| -- first borrow later used here
|
||||
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
|
||||
--> $DIR/borrowck-closures-two-mut.rs:55:24
|
||||
error[E0499]: cannot borrow `x` as mutable more than once at a time
|
||||
--> $DIR/borrowck-closures-two-mut.rs:49:24
|
||||
|
|
||||
LL | let c1 = to_fn_mut(|| set(&mut *x.f));
|
||||
| -- - first borrow occurs due to use of `x` in closure
|
||||
@ -144,10 +66,10 @@ LL | let c2 = to_fn_mut(|| set(&mut *x.f));
|
||||
| ^^ - second borrow occurs due to use of `x` in closure
|
||||
| |
|
||||
| second mutable borrow occurs here
|
||||
...
|
||||
LL |
|
||||
LL | drop((c1, c2));
|
||||
| -- first borrow later used here
|
||||
|
||||
error: aborting due to 10 previous errors
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0499`.
|
||||
|
@ -1,15 +1,5 @@
|
||||
error[E0382]: use of moved value: `x` (Ast)
|
||||
--> $DIR/borrowck-reinit.rs:8:16
|
||||
|
|
||||
LL | drop(x);
|
||||
| - value moved here
|
||||
LL | let _ = (1,x);
|
||||
| ^ value used here after move
|
||||
|
|
||||
= note: move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
|
||||
|
||||
error[E0382]: use of moved value: `x` (Mir)
|
||||
--> $DIR/borrowck-reinit.rs:8:16
|
||||
error[E0382]: use of moved value: `x`
|
||||
--> $DIR/borrowck-reinit.rs:6:16
|
||||
|
|
||||
LL | let mut x = Box::new(0);
|
||||
| ----- move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
|
||||
@ -19,6 +9,6 @@ LL | drop(x);
|
||||
LL | let _ = (1,x);
|
||||
| ^ value used here after move
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0382`.
|
||||
|
@ -1,15 +1,9 @@
|
||||
error[E0381]: use of possibly uninitialized variable: `x` (Ast)
|
||||
--> $DIR/borrowck-storage-dead.rs:18:17
|
||||
error[E0381]: use of possibly uninitialized variable: `x`
|
||||
--> $DIR/borrowck-storage-dead.rs:16:17
|
||||
|
|
||||
LL | let _ = x + 1;
|
||||
| ^ use of possibly uninitialized `x`
|
||||
|
||||
error[E0381]: use of possibly uninitialized variable: `x` (Mir)
|
||||
--> $DIR/borrowck-storage-dead.rs:18:17
|
||||
|
|
||||
LL | let _ = x + 1;
|
||||
| ^ use of possibly uninitialized `x`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0381`.
|
||||
|
@ -1,19 +1,11 @@
|
||||
error[E0384]: cannot assign twice to immutable variable `_x` (Ast)
|
||||
--> $DIR/immutable-arg.rs:4:5
|
||||
|
|
||||
LL | fn foo(_x: u32) {
|
||||
| -- first assignment to `_x`
|
||||
LL | _x = 4;
|
||||
| ^^^^^^ cannot assign twice to immutable variable
|
||||
|
||||
error[E0384]: cannot assign to immutable argument `_x` (Mir)
|
||||
--> $DIR/immutable-arg.rs:4:5
|
||||
error[E0384]: cannot assign to immutable argument `_x`
|
||||
--> $DIR/immutable-arg.rs:2:5
|
||||
|
|
||||
LL | fn foo(_x: u32) {
|
||||
| -- help: make this binding mutable: `mut _x`
|
||||
LL | _x = 4;
|
||||
| ^^^^^^ cannot assign to immutable argument
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0384`.
|
||||
|
@ -1,29 +1,11 @@
|
||||
error[E0382]: use of partially moved value: `maybe` (Ast)
|
||||
--> $DIR/issue-41962.rs:7:30
|
||||
|
|
||||
LL | if let Some(thing) = maybe {
|
||||
| ----- ^^^^^ value used here after move
|
||||
| |
|
||||
| value moved here
|
||||
|
|
||||
= note: move occurs because the value has type `std::vec::Vec<bool>`, which does not implement the `Copy` trait
|
||||
|
||||
error[E0382]: use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast)
|
||||
--> $DIR/issue-41962.rs:7:21
|
||||
|
|
||||
LL | if let Some(thing) = maybe {
|
||||
| ^^^^^ value moved here in previous iteration of loop
|
||||
|
|
||||
= note: move occurs because the value has type `std::vec::Vec<bool>`, which does not implement the `Copy` trait
|
||||
|
||||
error[E0382]: use of moved value (Mir)
|
||||
--> $DIR/issue-41962.rs:7:21
|
||||
error[E0382]: use of moved value
|
||||
--> $DIR/issue-41962.rs:5:21
|
||||
|
|
||||
LL | if let Some(thing) = maybe {
|
||||
| ^^^^^ value moved here, in previous iteration of loop
|
||||
|
|
||||
= note: move occurs because value has type `std::vec::Vec<bool>`, which does not implement the `Copy` trait
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0382`.
|
||||
|
@ -4,17 +4,17 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
|
||||
LL | #![feature(const_generics)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: type parameters must be declared prior to const parameters
|
||||
--> $DIR/const-param-before-other-params.rs:4:21
|
||||
|
|
||||
LL | fn foo<const X: (), T>(_: &T) {
|
||||
| --------------^- help: reorder the parameters: lifetimes, then types, then consts: `<T, const X: ()>`
|
||||
|
||||
error: lifetime parameters must be declared prior to const parameters
|
||||
--> $DIR/const-param-before-other-params.rs:8:21
|
||||
--> $DIR/const-param-before-other-params.rs:4:21
|
||||
|
|
||||
LL | fn bar<const X: (), 'a>(_: &'a ()) {
|
||||
| --------------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, const X: ()>`
|
||||
|
||||
error: type parameters must be declared prior to const parameters
|
||||
--> $DIR/const-param-before-other-params.rs:8:21
|
||||
|
|
||||
LL | fn foo<const X: (), T>(_: &T) {
|
||||
| --------------^- help: reorder the parameters: lifetimes, then types, then consts: `<T, const X: ()>`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
error: `#[deprecated]` cannot be used in staged api, use `#[rustc_deprecated]` instead
|
||||
error: `#[deprecated]` cannot be used in staged API; use `#[rustc_deprecated]` instead
|
||||
--> $DIR/deprecation-in-staged-api.rs:8:1
|
||||
|
|
||||
LL | fn main() { }
|
||||
|
@ -1,39 +1,21 @@
|
||||
error[E0626]: borrow may still be in use when generator yields (Ast)
|
||||
--> $DIR/yield-while-local-borrowed.rs:15:22
|
||||
|
|
||||
LL | let a = &mut 3;
|
||||
| ^
|
||||
...
|
||||
LL | yield();
|
||||
| ------- possible yield occurs here
|
||||
|
||||
error[E0626]: borrow may still be in use when generator yields (Ast)
|
||||
--> $DIR/yield-while-local-borrowed.rs:43:22
|
||||
|
|
||||
LL | let b = &a;
|
||||
| ^
|
||||
...
|
||||
LL | yield();
|
||||
| ------- possible yield occurs here
|
||||
|
||||
error[E0626]: borrow may still be in use when generator yields (Mir)
|
||||
--> $DIR/yield-while-local-borrowed.rs:15:17
|
||||
error[E0626]: borrow may still be in use when generator yields
|
||||
--> $DIR/yield-while-local-borrowed.rs:13:17
|
||||
|
|
||||
LL | let a = &mut 3;
|
||||
| ^^^^^^
|
||||
...
|
||||
LL |
|
||||
LL | yield();
|
||||
| ------- possible yield occurs here
|
||||
|
||||
error[E0626]: borrow may still be in use when generator yields (Mir)
|
||||
--> $DIR/yield-while-local-borrowed.rs:43:21
|
||||
error[E0626]: borrow may still be in use when generator yields
|
||||
--> $DIR/yield-while-local-borrowed.rs:40:21
|
||||
|
|
||||
LL | let b = &a;
|
||||
| ^^
|
||||
...
|
||||
LL |
|
||||
LL | yield();
|
||||
| ------- possible yield occurs here
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0626`.
|
||||
|
@ -12,7 +12,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | bar::<isize>(i); // i should not be re-coerced back to an isize
|
||||
| ^ expected isize, found usize
|
||||
help: you can convert an `usize` to `isize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `usize` to `isize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | bar::<isize>(i.try_into().unwrap()); // i should not be re-coerced back to an isize
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -3,7 +3,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_i8(a16);
|
||||
| ^^^ expected i8, found i16
|
||||
help: you can convert an `i16` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_i8(a16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -13,7 +13,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_i8(a32);
|
||||
| ^^^ expected i8, found i32
|
||||
help: you can convert an `i32` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_i8(a32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -23,7 +23,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_i8(a64);
|
||||
| ^^^ expected i8, found i64
|
||||
help: you can convert an `i64` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_i8(a64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -42,7 +42,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_i16(a32);
|
||||
| ^^^ expected i16, found i32
|
||||
help: you can convert an `i32` to `i16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_i16(a32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -52,7 +52,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_i16(a64);
|
||||
| ^^^ expected i16, found i64
|
||||
help: you can convert an `i64` to `i16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_i16(a64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -80,7 +80,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_i32(a64);
|
||||
| ^^^ expected i32, found i64
|
||||
help: you can convert an `i64` to `i32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_i32(a64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -117,7 +117,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_i8(c16);
|
||||
| ^^^ expected i8, found i16
|
||||
help: you can convert an `i16` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_i8(c16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -127,7 +127,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_i8(c32);
|
||||
| ^^^ expected i8, found i32
|
||||
help: you can convert an `i32` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_i8(c32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -137,7 +137,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_i8(c64);
|
||||
| ^^^ expected i8, found i64
|
||||
help: you can convert an `i64` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_i8(c64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -156,7 +156,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_i16(c32);
|
||||
| ^^^ expected i16, found i32
|
||||
help: you can convert an `i32` to `i16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_i16(c32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -166,7 +166,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_i16(c64);
|
||||
| ^^^ expected i16, found i64
|
||||
help: you can convert an `i64` to `i16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_i16(c64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -194,7 +194,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_i32(c64);
|
||||
| ^^^ expected i32, found i64
|
||||
help: you can convert an `i64` to `i32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_i32(c64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -231,7 +231,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_u8(b16);
|
||||
| ^^^ expected u8, found u16
|
||||
help: you can convert an `u16` to `u8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u16` to `u8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_u8(b16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -241,7 +241,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_u8(b32);
|
||||
| ^^^ expected u8, found u32
|
||||
help: you can convert an `u32` to `u8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u32` to `u8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_u8(b32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -251,7 +251,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_u8(b64);
|
||||
| ^^^ expected u8, found u64
|
||||
help: you can convert an `u64` to `u8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u64` to `u8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_u8(b64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -270,7 +270,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_u16(b32);
|
||||
| ^^^ expected u16, found u32
|
||||
help: you can convert an `u32` to `u16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u32` to `u16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_u16(b32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -280,7 +280,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_u16(b64);
|
||||
| ^^^ expected u16, found u64
|
||||
help: you can convert an `u64` to `u16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u64` to `u16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_u16(b64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -308,7 +308,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | id_u32(b64);
|
||||
| ^^^ expected u32, found u64
|
||||
help: you can convert an `u64` to `u32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u64` to `u32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | id_u32(b64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -3,7 +3,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo(1*(1 as isize));
|
||||
| ^^^^^^^^^^^^^^ expected i16, found isize
|
||||
help: you can convert an `isize` to `i16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `i16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo((1*(1 as isize)).try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -13,7 +13,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | bar(1*(1 as usize));
|
||||
| ^^^^^^^^^^^^^^ expected u32, found usize
|
||||
help: you can convert an `usize` to `u32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | bar((1*(1 as usize)).try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -3,7 +3,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | X = Trait::Number,
|
||||
| ^^^^^^^^^^^^^ expected isize, found i32
|
||||
help: you can convert an `i32` to `isize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | X = Trait::Number.try_into().unwrap(),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,12 +1,4 @@
|
||||
error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Ast)
|
||||
--> $DIR/issue-45697-1.rs:20:9
|
||||
|
|
||||
LL | let z = copy_borrowed_ptr(&mut y);
|
||||
| - borrow of `*y.pointer` occurs here
|
||||
LL | *y.pointer += 1;
|
||||
| ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here
|
||||
|
||||
error[E0503]: cannot use `*y.pointer` because it was mutably borrowed (Mir)
|
||||
error[E0503]: cannot use `*y.pointer` because it was mutably borrowed
|
||||
--> $DIR/issue-45697-1.rs:20:9
|
||||
|
|
||||
LL | let z = copy_borrowed_ptr(&mut y);
|
||||
@ -17,7 +9,7 @@ LL | *y.pointer += 1;
|
||||
LL | *z.pointer += 1;
|
||||
| --------------- borrow later used here
|
||||
|
||||
error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Mir)
|
||||
error[E0506]: cannot assign to `*y.pointer` because it is borrowed
|
||||
--> $DIR/issue-45697-1.rs:20:9
|
||||
|
|
||||
LL | let z = copy_borrowed_ptr(&mut y);
|
||||
@ -28,7 +20,7 @@ LL | *y.pointer += 1;
|
||||
LL | *z.pointer += 1;
|
||||
| --------------- borrow later used here
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0503, E0506.
|
||||
For more information about an error, try `rustc --explain E0503`.
|
||||
|
@ -1,12 +1,4 @@
|
||||
error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Ast)
|
||||
--> $DIR/issue-45697.rs:20:9
|
||||
|
|
||||
LL | let z = copy_borrowed_ptr(&mut y);
|
||||
| - borrow of `*y.pointer` occurs here
|
||||
LL | *y.pointer += 1;
|
||||
| ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here
|
||||
|
||||
error[E0503]: cannot use `*y.pointer` because it was mutably borrowed (Mir)
|
||||
error[E0503]: cannot use `*y.pointer` because it was mutably borrowed
|
||||
--> $DIR/issue-45697.rs:20:9
|
||||
|
|
||||
LL | let z = copy_borrowed_ptr(&mut y);
|
||||
@ -17,7 +9,7 @@ LL | *y.pointer += 1;
|
||||
LL | *z.pointer += 1;
|
||||
| --------------- borrow later used here
|
||||
|
||||
error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Mir)
|
||||
error[E0506]: cannot assign to `*y.pointer` because it is borrowed
|
||||
--> $DIR/issue-45697.rs:20:9
|
||||
|
|
||||
LL | let z = copy_borrowed_ptr(&mut y);
|
||||
@ -28,7 +20,7 @@ LL | *y.pointer += 1;
|
||||
LL | *z.pointer += 1;
|
||||
| --------------- borrow later used here
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0503, E0506.
|
||||
For more information about an error, try `rustc --explain E0503`.
|
||||
|
@ -1,16 +1,5 @@
|
||||
error[E0597]: `z` does not live long enough (Ast)
|
||||
--> $DIR/issue-46471-1.rs:6:14
|
||||
|
|
||||
LL | &mut z
|
||||
| ^ borrowed value does not live long enough
|
||||
LL | };
|
||||
| - `z` dropped here while still borrowed
|
||||
...
|
||||
LL | }
|
||||
| - borrowed value needs to live until here
|
||||
|
||||
error[E0597]: `z` does not live long enough (Mir)
|
||||
--> $DIR/issue-46471-1.rs:6:9
|
||||
error[E0597]: `z` does not live long enough
|
||||
--> $DIR/issue-46471-1.rs:4:9
|
||||
|
|
||||
LL | &mut z
|
||||
| ^^^^^^
|
||||
@ -20,6 +9,6 @@ LL | &mut z
|
||||
LL | };
|
||||
| - `z` dropped here while still borrowed
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0597`.
|
||||
|
@ -1,21 +1,9 @@
|
||||
error[E0597]: `x` does not live long enough (Ast)
|
||||
--> $DIR/issue-46471.rs:5:6
|
||||
|
|
||||
LL | &x
|
||||
| ^ borrowed value does not live long enough
|
||||
...
|
||||
LL | }
|
||||
| - borrowed value only lives until here
|
||||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0515]: cannot return reference to local variable `x` (Mir)
|
||||
--> $DIR/issue-46471.rs:5:5
|
||||
error[E0515]: cannot return reference to local variable `x`
|
||||
--> $DIR/issue-46471.rs:3:5
|
||||
|
|
||||
LL | &x
|
||||
| ^^ returns a reference to data owned by the current function
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
Some errors have detailed explanations: E0515, E0597.
|
||||
For more information about an error, try `rustc --explain E0515`.
|
||||
For more information about this error, try `rustc --explain E0515`.
|
||||
|
@ -1,20 +1,5 @@
|
||||
error[E0597]: borrowed value does not live long enough (Ast)
|
||||
--> $DIR/issue-46472.rs:4:10
|
||||
|
|
||||
LL | &mut 4
|
||||
| ^ temporary value does not live long enough
|
||||
...
|
||||
LL | }
|
||||
| - temporary value only lives until here
|
||||
|
|
||||
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 3:8...
|
||||
--> $DIR/issue-46472.rs:3:8
|
||||
|
|
||||
LL | fn bar<'a>() -> &'a mut u32 {
|
||||
| ^^
|
||||
|
||||
error[E0515]: cannot return reference to temporary value (Mir)
|
||||
--> $DIR/issue-46472.rs:4:5
|
||||
error[E0515]: cannot return reference to temporary value
|
||||
--> $DIR/issue-46472.rs:2:5
|
||||
|
|
||||
LL | &mut 4
|
||||
| ^^^^^-
|
||||
@ -22,7 +7,6 @@ LL | &mut 4
|
||||
| | temporary value created here
|
||||
| returns a reference to data owned by the current function
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
Some errors have detailed explanations: E0515, E0597.
|
||||
For more information about an error, try `rustc --explain E0515`.
|
||||
For more information about this error, try `rustc --explain E0515`.
|
||||
|
@ -1,36 +1,5 @@
|
||||
error[E0384]: cannot assign twice to immutable variable `x` (Ast)
|
||||
--> $DIR/liveness-assign-imm-local-notes.rs:13:9
|
||||
|
|
||||
LL | x = 2;
|
||||
| ----- first assignment to `x`
|
||||
LL | x = 3;
|
||||
| ^^^^^ cannot assign twice to immutable variable
|
||||
|
||||
error[E0384]: cannot assign twice to immutable variable `x` (Ast)
|
||||
--> $DIR/liveness-assign-imm-local-notes.rs:25:13
|
||||
|
|
||||
LL | x = 2;
|
||||
| ----- first assignment to `x`
|
||||
LL | x = 3;
|
||||
| ^^^^^ cannot assign twice to immutable variable
|
||||
|
||||
error[E0384]: cannot assign twice to immutable variable `x` (Ast)
|
||||
--> $DIR/liveness-assign-imm-local-notes.rs:35:13
|
||||
|
|
||||
LL | x = 1;
|
||||
| ^^^^^ cannot assign twice to immutable variable
|
||||
|
||||
error[E0384]: cannot assign twice to immutable variable `x` (Ast)
|
||||
--> $DIR/liveness-assign-imm-local-notes.rs:38:13
|
||||
|
|
||||
LL | x = 1;
|
||||
| ----- first assignment to `x`
|
||||
...
|
||||
LL | x = 2;
|
||||
| ^^^^^ cannot assign twice to immutable variable
|
||||
|
||||
error[E0384]: cannot assign twice to immutable variable `x` (Mir)
|
||||
--> $DIR/liveness-assign-imm-local-notes.rs:13:9
|
||||
error[E0384]: cannot assign twice to immutable variable `x`
|
||||
--> $DIR/liveness-assign-imm-local-notes.rs:10:9
|
||||
|
|
||||
LL | let x;
|
||||
| - help: make this binding mutable: `mut x`
|
||||
@ -40,8 +9,8 @@ LL | x = 2;
|
||||
LL | x = 3;
|
||||
| ^^^^^ cannot assign twice to immutable variable
|
||||
|
||||
error[E0384]: cannot assign twice to immutable variable `x` (Mir)
|
||||
--> $DIR/liveness-assign-imm-local-notes.rs:25:13
|
||||
error[E0384]: cannot assign twice to immutable variable `x`
|
||||
--> $DIR/liveness-assign-imm-local-notes.rs:21:13
|
||||
|
|
||||
LL | let x;
|
||||
| - help: make this binding mutable: `mut x`
|
||||
@ -51,8 +20,8 @@ LL | x = 2;
|
||||
LL | x = 3;
|
||||
| ^^^^^ cannot assign twice to immutable variable
|
||||
|
||||
error[E0384]: cannot assign twice to immutable variable `x` (Mir)
|
||||
--> $DIR/liveness-assign-imm-local-notes.rs:35:13
|
||||
error[E0384]: cannot assign twice to immutable variable `x`
|
||||
--> $DIR/liveness-assign-imm-local-notes.rs:30:13
|
||||
|
|
||||
LL | let x;
|
||||
| - help: make this binding mutable: `mut x`
|
||||
@ -60,18 +29,18 @@ LL | let x;
|
||||
LL | x = 1;
|
||||
| ^^^^^ cannot assign twice to immutable variable
|
||||
|
||||
error[E0384]: cannot assign twice to immutable variable `x` (Mir)
|
||||
--> $DIR/liveness-assign-imm-local-notes.rs:38:13
|
||||
error[E0384]: cannot assign twice to immutable variable `x`
|
||||
--> $DIR/liveness-assign-imm-local-notes.rs:32:13
|
||||
|
|
||||
LL | let x;
|
||||
| - help: make this binding mutable: `mut x`
|
||||
...
|
||||
LL | x = 1;
|
||||
| ----- first assignment to `x`
|
||||
...
|
||||
LL | } else {
|
||||
LL | x = 2;
|
||||
| ^^^^^ cannot assign twice to immutable variable
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0384`.
|
||||
|
@ -11,7 +11,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | let y: usize = x.foo();
|
||||
| ^^^^^^^ expected usize, found isize
|
||||
help: you can convert an `isize` to `usize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | let y: usize = x.foo().try_into().unwrap();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -6,7 +6,7 @@ LL | $arr.len() * size_of($arr[0]));
|
||||
...
|
||||
LL | write!(hello);
|
||||
| -------------- in this macro invocation
|
||||
help: you can convert an `usize` to `u64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `usize` to `u64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | ($arr.len() * size_of($arr[0])).try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,15 +1,5 @@
|
||||
error[E0382]: use of moved value: `x` (Ast)
|
||||
--> $DIR/moves-based-on-type-tuple.rs:6:13
|
||||
|
|
||||
LL | box (x, x)
|
||||
| - ^ value used here after move
|
||||
| |
|
||||
| value moved here
|
||||
|
|
||||
= note: move occurs because `x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
|
||||
|
||||
error[E0382]: use of moved value: `x` (Mir)
|
||||
--> $DIR/moves-based-on-type-tuple.rs:6:13
|
||||
error[E0382]: use of moved value: `x`
|
||||
--> $DIR/moves-based-on-type-tuple.rs:4:13
|
||||
|
|
||||
LL | fn dup(x: Box<isize>) -> Box<(Box<isize>,Box<isize>)> {
|
||||
| - move occurs because `x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
|
||||
@ -18,6 +8,6 @@ LL | box (x, x)
|
||||
| |
|
||||
| value moved here
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0382`.
|
||||
|
@ -1,41 +1,5 @@
|
||||
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast)
|
||||
--> $DIR/get_default.rs:23:17
|
||||
|
|
||||
LL | match map.get() {
|
||||
| --- immutable borrow occurs here
|
||||
...
|
||||
LL | map.set(String::new()); // Ideally, this would not error.
|
||||
| ^^^ mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - immutable borrow ends here
|
||||
|
||||
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast)
|
||||
--> $DIR/get_default.rs:35:17
|
||||
|
|
||||
LL | match map.get() {
|
||||
| --- immutable borrow occurs here
|
||||
LL | Some(v) => {
|
||||
LL | map.set(String::new()); // Both AST and MIR error here
|
||||
| ^^^ mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - immutable borrow ends here
|
||||
|
||||
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast)
|
||||
--> $DIR/get_default.rs:41:17
|
||||
|
|
||||
LL | match map.get() {
|
||||
| --- immutable borrow occurs here
|
||||
...
|
||||
LL | map.set(String::new()); // Ideally, just AST would error here
|
||||
| ^^^ mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - immutable borrow ends here
|
||||
|
||||
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Mir)
|
||||
--> $DIR/get_default.rs:23:17
|
||||
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable
|
||||
--> $DIR/get_default.rs:21:17
|
||||
|
|
||||
LL | fn ok(map: &mut Map) -> &String {
|
||||
| - let's call the lifetime of this reference `'1`
|
||||
@ -47,10 +11,10 @@ LL | return v;
|
||||
| - returning this value requires that `*map` is borrowed for `'1`
|
||||
...
|
||||
LL | map.set(String::new()); // Ideally, this would not error.
|
||||
| ^^^ mutable borrow occurs here
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
|
||||
|
||||
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Mir)
|
||||
--> $DIR/get_default.rs:35:17
|
||||
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable
|
||||
--> $DIR/get_default.rs:32:17
|
||||
|
|
||||
LL | fn err(map: &mut Map) -> &String {
|
||||
| - let's call the lifetime of this reference `'1`
|
||||
@ -59,13 +23,13 @@ LL | match map.get() {
|
||||
| --- immutable borrow occurs here
|
||||
LL | Some(v) => {
|
||||
LL | map.set(String::new()); // Both AST and MIR error here
|
||||
| ^^^ mutable borrow occurs here
|
||||
...
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
|
||||
LL |
|
||||
LL | return v;
|
||||
| - returning this value requires that `*map` is borrowed for `'1`
|
||||
|
||||
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Mir)
|
||||
--> $DIR/get_default.rs:41:17
|
||||
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable
|
||||
--> $DIR/get_default.rs:37:17
|
||||
|
|
||||
LL | fn err(map: &mut Map) -> &String {
|
||||
| - let's call the lifetime of this reference `'1`
|
||||
@ -77,8 +41,8 @@ LL | return v;
|
||||
| - returning this value requires that `*map` is borrowed for `'1`
|
||||
...
|
||||
LL | map.set(String::new()); // Ideally, just AST would error here
|
||||
| ^^^ mutable borrow occurs here
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0502`.
|
||||
|
@ -1,59 +1,5 @@
|
||||
error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
|
||||
--> $DIR/loan_ends_mid_block_pair.rs:14:5
|
||||
|
|
||||
LL | let c = &mut data.0;
|
||||
| ------ borrow of `data.0` occurs here
|
||||
LL | capitalize(c);
|
||||
LL | data.0 = 'e';
|
||||
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
|
||||
|
||||
error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
|
||||
--> $DIR/loan_ends_mid_block_pair.rs:17:5
|
||||
|
|
||||
LL | let c = &mut data.0;
|
||||
| ------ borrow of `data.0` occurs here
|
||||
...
|
||||
LL | data.0 = 'f';
|
||||
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
|
||||
|
||||
error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
|
||||
--> $DIR/loan_ends_mid_block_pair.rs:19:5
|
||||
|
|
||||
LL | let c = &mut data.0;
|
||||
| ------ borrow of `data.0` occurs here
|
||||
...
|
||||
LL | data.0 = 'g';
|
||||
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
|
||||
|
||||
error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
|
||||
--> $DIR/loan_ends_mid_block_pair.rs:28:5
|
||||
|
|
||||
LL | let c = &mut data.0;
|
||||
| ------ borrow of `data.0` occurs here
|
||||
LL | capitalize(c);
|
||||
LL | data.0 = 'e';
|
||||
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
|
||||
|
||||
error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
|
||||
--> $DIR/loan_ends_mid_block_pair.rs:30:5
|
||||
|
|
||||
LL | let c = &mut data.0;
|
||||
| ------ borrow of `data.0` occurs here
|
||||
...
|
||||
LL | data.0 = 'f';
|
||||
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
|
||||
|
||||
error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
|
||||
--> $DIR/loan_ends_mid_block_pair.rs:32:5
|
||||
|
|
||||
LL | let c = &mut data.0;
|
||||
| ------ borrow of `data.0` occurs here
|
||||
...
|
||||
LL | data.0 = 'g';
|
||||
| ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
|
||||
|
||||
error[E0506]: cannot assign to `data.0` because it is borrowed (Mir)
|
||||
--> $DIR/loan_ends_mid_block_pair.rs:14:5
|
||||
error[E0506]: cannot assign to `data.0` because it is borrowed
|
||||
--> $DIR/loan_ends_mid_block_pair.rs:12:5
|
||||
|
|
||||
LL | let c = &mut data.0;
|
||||
| ----------- borrow of `data.0` occurs here
|
||||
@ -64,6 +10,6 @@ LL | data.0 = 'e';
|
||||
LL | capitalize(c);
|
||||
| - borrow later used here
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0506`.
|
||||
|
@ -1,111 +1,39 @@
|
||||
error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast)
|
||||
error[E0499]: cannot borrow `data` as mutable more than once at a time
|
||||
--> $DIR/loan_ends_mid_block_vec.rs:11:5
|
||||
|
|
||||
LL | let slice = &mut data;
|
||||
| --------- first mutable borrow occurs here
|
||||
LL | capitalize(slice);
|
||||
LL | data.push('d');
|
||||
| ^^^^ second mutable borrow occurs here
|
||||
...
|
||||
LL | capitalize(slice);
|
||||
| ----- first borrow later used here
|
||||
|
||||
error[E0499]: cannot borrow `data` as mutable more than once at a time
|
||||
--> $DIR/loan_ends_mid_block_vec.rs:13:5
|
||||
|
|
||||
LL | let slice = &mut data;
|
||||
| ---- first mutable borrow occurs here
|
||||
LL | capitalize(slice);
|
||||
LL | data.push('d');
|
||||
| ^^^^ second mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - first borrow ends here
|
||||
|
||||
error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast)
|
||||
--> $DIR/loan_ends_mid_block_vec.rs:16:5
|
||||
|
|
||||
LL | let slice = &mut data;
|
||||
| ---- first mutable borrow occurs here
|
||||
| --------- first mutable borrow occurs here
|
||||
...
|
||||
LL | data.push('e');
|
||||
| ^^^^ second mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - first borrow ends here
|
||||
|
||||
error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast)
|
||||
--> $DIR/loan_ends_mid_block_vec.rs:19:5
|
||||
|
|
||||
LL | let slice = &mut data;
|
||||
| ---- first mutable borrow occurs here
|
||||
...
|
||||
LL | data.push('f');
|
||||
| ^^^^ second mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - first borrow ends here
|
||||
|
||||
error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast)
|
||||
--> $DIR/loan_ends_mid_block_vec.rs:29:5
|
||||
|
|
||||
LL | let slice = &mut data;
|
||||
| ---- first mutable borrow occurs here
|
||||
LL | capitalize(slice);
|
||||
LL | data.push('d');
|
||||
| ^^^^ second mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - first borrow ends here
|
||||
| ----- first borrow later used here
|
||||
|
||||
error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast)
|
||||
--> $DIR/loan_ends_mid_block_vec.rs:31:5
|
||||
error[E0499]: cannot borrow `data` as mutable more than once at a time
|
||||
--> $DIR/loan_ends_mid_block_vec.rs:15:5
|
||||
|
|
||||
LL | let slice = &mut data;
|
||||
| ---- first mutable borrow occurs here
|
||||
...
|
||||
LL | data.push('e');
|
||||
| ^^^^ second mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - first borrow ends here
|
||||
|
||||
error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast)
|
||||
--> $DIR/loan_ends_mid_block_vec.rs:33:5
|
||||
|
|
||||
LL | let slice = &mut data;
|
||||
| ---- first mutable borrow occurs here
|
||||
| --------- first mutable borrow occurs here
|
||||
...
|
||||
LL | data.push('f');
|
||||
| ^^^^ second mutable borrow occurs here
|
||||
LL |
|
||||
LL | }
|
||||
| - first borrow ends here
|
||||
|
||||
error[E0499]: cannot borrow `data` as mutable more than once at a time (Mir)
|
||||
--> $DIR/loan_ends_mid_block_vec.rs:13:5
|
||||
|
|
||||
LL | let slice = &mut data;
|
||||
| --------- first mutable borrow occurs here
|
||||
LL | capitalize(slice);
|
||||
LL | data.push('d');
|
||||
| ^^^^ second mutable borrow occurs here
|
||||
...
|
||||
LL | capitalize(slice);
|
||||
| ----- first borrow later used here
|
||||
|
||||
error[E0499]: cannot borrow `data` as mutable more than once at a time (Mir)
|
||||
--> $DIR/loan_ends_mid_block_vec.rs:16:5
|
||||
|
|
||||
LL | let slice = &mut data;
|
||||
| --------- first mutable borrow occurs here
|
||||
...
|
||||
LL | data.push('e');
|
||||
| ^^^^ second mutable borrow occurs here
|
||||
...
|
||||
LL | capitalize(slice);
|
||||
| ----- first borrow later used here
|
||||
|
||||
error[E0499]: cannot borrow `data` as mutable more than once at a time (Mir)
|
||||
--> $DIR/loan_ends_mid_block_vec.rs:19:5
|
||||
|
|
||||
LL | let slice = &mut data;
|
||||
| --------- first mutable borrow occurs here
|
||||
...
|
||||
LL | data.push('f');
|
||||
| ^^^^ second mutable borrow occurs here
|
||||
...
|
||||
LL | capitalize(slice);
|
||||
| ----- first borrow later used here
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0499`.
|
||||
|
@ -1,39 +1,15 @@
|
||||
error[E0502]: cannot borrow `my_struct.field` as mutable because it is also borrowed as immutable (Ast)
|
||||
--> $DIR/region-ends-after-if-condition.rs:19:9
|
||||
|
|
||||
LL | let value = &my_struct.field;
|
||||
| --------------- immutable borrow occurs here
|
||||
LL | if value.is_empty() {
|
||||
LL | my_struct.field.push_str("Hello, world!");
|
||||
| ^^^^^^^^^^^^^^^ mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - immutable borrow ends here
|
||||
|
||||
error[E0502]: cannot borrow `my_struct.field` as mutable because it is also borrowed as immutable (Ast)
|
||||
--> $DIR/region-ends-after-if-condition.rs:29:9
|
||||
|
|
||||
LL | let value = &my_struct.field;
|
||||
| --------------- immutable borrow occurs here
|
||||
LL | if value.is_empty() {
|
||||
LL | my_struct.field.push_str("Hello, world!");
|
||||
| ^^^^^^^^^^^^^^^ mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - immutable borrow ends here
|
||||
|
||||
error[E0502]: cannot borrow `my_struct.field` as mutable because it is also borrowed as immutable (Mir)
|
||||
--> $DIR/region-ends-after-if-condition.rs:29:9
|
||||
error[E0502]: cannot borrow `my_struct.field` as mutable because it is also borrowed as immutable
|
||||
--> $DIR/region-ends-after-if-condition.rs:26:9
|
||||
|
|
||||
LL | let value = &my_struct.field;
|
||||
| ---------------- immutable borrow occurs here
|
||||
LL | if value.is_empty() {
|
||||
LL | my_struct.field.push_str("Hello, world!");
|
||||
| ^^^^^^^^^^^^^^^ mutable borrow occurs here
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
|
||||
...
|
||||
LL | drop(value);
|
||||
| ----- immutable borrow later used here
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0502`.
|
||||
|
@ -1,39 +1,15 @@
|
||||
error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time (Ast)
|
||||
--> $DIR/return_from_loop.rs:22:9
|
||||
|
|
||||
LL | let value = &mut my_struct.field;
|
||||
| --------------- first mutable borrow occurs here
|
||||
LL | loop {
|
||||
LL | my_struct.field.push_str("Hello, world!");
|
||||
| ^^^^^^^^^^^^^^^ second mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - first borrow ends here
|
||||
|
||||
error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time (Ast)
|
||||
--> $DIR/return_from_loop.rs:35:9
|
||||
|
|
||||
LL | let value = &mut my_struct.field;
|
||||
| --------------- first mutable borrow occurs here
|
||||
LL | loop {
|
||||
LL | my_struct.field.push_str("Hello, world!");
|
||||
| ^^^^^^^^^^^^^^^ second mutable borrow occurs here
|
||||
...
|
||||
LL | }
|
||||
| - first borrow ends here
|
||||
|
||||
error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time (Mir)
|
||||
--> $DIR/return_from_loop.rs:22:9
|
||||
error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time
|
||||
--> $DIR/return_from_loop.rs:20:9
|
||||
|
|
||||
LL | let value = &mut my_struct.field;
|
||||
| -------------------- first mutable borrow occurs here
|
||||
LL | loop {
|
||||
LL | my_struct.field.push_str("Hello, world!");
|
||||
| ^^^^^^^^^^^^^^^ second mutable borrow occurs here
|
||||
...
|
||||
LL |
|
||||
LL | value.len();
|
||||
| ----- first borrow later used here
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0499`.
|
||||
|
@ -37,7 +37,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | let d: i8 = c;
|
||||
| ^ expected i8, found i32
|
||||
help: you can convert an `i32` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | let d: i8 = c.try_into().unwrap();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -3,7 +3,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | test(array.len());
|
||||
| ^^^^^^^^^^^ expected u32, found usize
|
||||
help: you can convert an `usize` to `u32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | test(array.len().try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -3,7 +3,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | let x: u16 = foo();
|
||||
| ^^^^^ expected u16, found i32
|
||||
help: you can convert an `i32` to `u16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | let x: u16 = foo().try_into().unwrap();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -13,7 +13,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | let y: i64 = x + x;
|
||||
| ^^^^^ expected i64, found u16
|
||||
help: you can convert an `u16` to `i64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u16` to `i64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | let y: i64 = (x + x).try_into().unwrap();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -23,7 +23,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | let z: i32 = x + x;
|
||||
| ^^^^^ expected i32, found u16
|
||||
help: you can convert an `u16` to `i32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u16` to `i32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | let z: i32 = (x + x).try_into().unwrap();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -3,7 +3,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<usize>(x_u64);
|
||||
| ^^^^^ expected usize, found u64
|
||||
help: you can convert an `u64` to `usize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u64` to `usize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<usize>(x_u64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -13,7 +13,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<usize>(x_u32);
|
||||
| ^^^^^ expected usize, found u32
|
||||
help: you can convert an `u32` to `usize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u32` to `usize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<usize>(x_u32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -23,7 +23,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<usize>(x_u16);
|
||||
| ^^^^^ expected usize, found u16
|
||||
help: you can convert an `u16` to `usize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u16` to `usize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<usize>(x_u16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -33,7 +33,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<usize>(x_u8);
|
||||
| ^^^^ expected usize, found u8
|
||||
help: you can convert an `u8` to `usize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u8` to `usize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<usize>(x_u8.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -43,7 +43,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<usize>(x_isize);
|
||||
| ^^^^^^^ expected usize, found isize
|
||||
help: you can convert an `isize` to `usize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<usize>(x_isize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -53,7 +53,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<usize>(x_i64);
|
||||
| ^^^^^ expected usize, found i64
|
||||
help: you can convert an `i64` to `usize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `usize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<usize>(x_i64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -63,7 +63,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<usize>(x_i32);
|
||||
| ^^^^^ expected usize, found i32
|
||||
help: you can convert an `i32` to `usize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `usize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<usize>(x_i32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -73,7 +73,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<usize>(x_i16);
|
||||
| ^^^^^ expected usize, found i16
|
||||
help: you can convert an `i16` to `usize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i16` to `usize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<usize>(x_i16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -83,7 +83,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<usize>(x_i8);
|
||||
| ^^^^ expected usize, found i8
|
||||
help: you can convert an `i8` to `usize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i8` to `usize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<usize>(x_i8.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -93,7 +93,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<isize>(x_usize);
|
||||
| ^^^^^^^ expected isize, found usize
|
||||
help: you can convert an `usize` to `isize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `usize` to `isize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<isize>(x_usize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -103,7 +103,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<isize>(x_u64);
|
||||
| ^^^^^ expected isize, found u64
|
||||
help: you can convert an `u64` to `isize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u64` to `isize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<isize>(x_u64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -113,7 +113,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<isize>(x_u32);
|
||||
| ^^^^^ expected isize, found u32
|
||||
help: you can convert an `u32` to `isize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u32` to `isize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<isize>(x_u32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -123,7 +123,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<isize>(x_u16);
|
||||
| ^^^^^ expected isize, found u16
|
||||
help: you can convert an `u16` to `isize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u16` to `isize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<isize>(x_u16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -133,7 +133,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<isize>(x_u8);
|
||||
| ^^^^ expected isize, found u8
|
||||
help: you can convert an `u8` to `isize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u8` to `isize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<isize>(x_u8.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -143,7 +143,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<isize>(x_i64);
|
||||
| ^^^^^ expected isize, found i64
|
||||
help: you can convert an `i64` to `isize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `isize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<isize>(x_i64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -153,7 +153,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<isize>(x_i32);
|
||||
| ^^^^^ expected isize, found i32
|
||||
help: you can convert an `i32` to `isize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<isize>(x_i32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -163,7 +163,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<isize>(x_i16);
|
||||
| ^^^^^ expected isize, found i16
|
||||
help: you can convert an `i16` to `isize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i16` to `isize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<isize>(x_i16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -173,7 +173,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<isize>(x_i8);
|
||||
| ^^^^ expected isize, found i8
|
||||
help: you can convert an `i8` to `isize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i8` to `isize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<isize>(x_i8.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -183,7 +183,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u64>(x_usize);
|
||||
| ^^^^^^^ expected u64, found usize
|
||||
help: you can convert an `usize` to `u64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `usize` to `u64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u64>(x_usize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -220,7 +220,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u64>(x_isize);
|
||||
| ^^^^^^^ expected u64, found isize
|
||||
help: you can convert an `isize` to `u64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `u64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u64>(x_isize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -230,7 +230,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u64>(x_i64);
|
||||
| ^^^^^ expected u64, found i64
|
||||
help: you can convert an `i64` to `u64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `u64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u64>(x_i64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -240,7 +240,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u64>(x_i32);
|
||||
| ^^^^^ expected u64, found i32
|
||||
help: you can convert an `i32` to `u64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `u64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u64>(x_i32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -250,7 +250,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u64>(x_i16);
|
||||
| ^^^^^ expected u64, found i16
|
||||
help: you can convert an `i16` to `u64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i16` to `u64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u64>(x_i16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -260,7 +260,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u64>(x_i8);
|
||||
| ^^^^ expected u64, found i8
|
||||
help: you can convert an `i8` to `u64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i8` to `u64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u64>(x_i8.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -270,7 +270,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i64>(x_usize);
|
||||
| ^^^^^^^ expected i64, found usize
|
||||
help: you can convert an `usize` to `i64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `usize` to `i64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i64>(x_usize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -280,7 +280,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i64>(x_u64);
|
||||
| ^^^^^ expected i64, found u64
|
||||
help: you can convert an `u64` to `i64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u64` to `i64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i64>(x_u64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -290,7 +290,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i64>(x_u32);
|
||||
| ^^^^^ expected i64, found u32
|
||||
help: you can convert an `u32` to `i64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u32` to `i64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i64>(x_u32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -300,7 +300,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i64>(x_u16);
|
||||
| ^^^^^ expected i64, found u16
|
||||
help: you can convert an `u16` to `i64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u16` to `i64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i64>(x_u16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -310,7 +310,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i64>(x_u8);
|
||||
| ^^^^ expected i64, found u8
|
||||
help: you can convert an `u8` to `i64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u8` to `i64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i64>(x_u8.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -320,7 +320,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i64>(x_isize);
|
||||
| ^^^^^^^ expected i64, found isize
|
||||
help: you can convert an `isize` to `i64` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `i64` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i64>(x_isize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -357,7 +357,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u32>(x_usize);
|
||||
| ^^^^^^^ expected u32, found usize
|
||||
help: you can convert an `usize` to `u32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u32>(x_usize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -367,7 +367,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u32>(x_u64);
|
||||
| ^^^^^ expected u32, found u64
|
||||
help: you can convert an `u64` to `u32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u64` to `u32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u32>(x_u64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -395,7 +395,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u32>(x_isize);
|
||||
| ^^^^^^^ expected u32, found isize
|
||||
help: you can convert an `isize` to `u32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `u32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u32>(x_isize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -405,7 +405,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u32>(x_i64);
|
||||
| ^^^^^ expected u32, found i64
|
||||
help: you can convert an `i64` to `u32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `u32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u32>(x_i64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -415,7 +415,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u32>(x_i32);
|
||||
| ^^^^^ expected u32, found i32
|
||||
help: you can convert an `i32` to `u32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `u32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u32>(x_i32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -425,7 +425,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u32>(x_i16);
|
||||
| ^^^^^ expected u32, found i16
|
||||
help: you can convert an `i16` to `u32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i16` to `u32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u32>(x_i16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -435,7 +435,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u32>(x_i8);
|
||||
| ^^^^ expected u32, found i8
|
||||
help: you can convert an `i8` to `u32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i8` to `u32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u32>(x_i8.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -445,7 +445,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i32>(x_usize);
|
||||
| ^^^^^^^ expected i32, found usize
|
||||
help: you can convert an `usize` to `i32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `usize` to `i32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i32>(x_usize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -455,7 +455,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i32>(x_u64);
|
||||
| ^^^^^ expected i32, found u64
|
||||
help: you can convert an `u64` to `i32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u64` to `i32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i32>(x_u64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -465,7 +465,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i32>(x_u32);
|
||||
| ^^^^^ expected i32, found u32
|
||||
help: you can convert an `u32` to `i32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i32>(x_u32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -475,7 +475,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i32>(x_u16);
|
||||
| ^^^^^ expected i32, found u16
|
||||
help: you can convert an `u16` to `i32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u16` to `i32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i32>(x_u16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -485,7 +485,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i32>(x_u8);
|
||||
| ^^^^ expected i32, found u8
|
||||
help: you can convert an `u8` to `i32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u8` to `i32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i32>(x_u8.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -495,7 +495,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i32>(x_isize);
|
||||
| ^^^^^^^ expected i32, found isize
|
||||
help: you can convert an `isize` to `i32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `i32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i32>(x_isize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -505,7 +505,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i32>(x_i64);
|
||||
| ^^^^^ expected i32, found i64
|
||||
help: you can convert an `i64` to `i32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i32>(x_i64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -533,7 +533,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u16>(x_usize);
|
||||
| ^^^^^^^ expected u16, found usize
|
||||
help: you can convert an `usize` to `u16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `usize` to `u16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u16>(x_usize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -543,7 +543,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u16>(x_u64);
|
||||
| ^^^^^ expected u16, found u64
|
||||
help: you can convert an `u64` to `u16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u64` to `u16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u16>(x_u64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -553,7 +553,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u16>(x_u32);
|
||||
| ^^^^^ expected u16, found u32
|
||||
help: you can convert an `u32` to `u16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u32` to `u16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u16>(x_u32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -572,7 +572,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u16>(x_isize);
|
||||
| ^^^^^^^ expected u16, found isize
|
||||
help: you can convert an `isize` to `u16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u16>(x_isize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -582,7 +582,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u16>(x_i64);
|
||||
| ^^^^^ expected u16, found i64
|
||||
help: you can convert an `i64` to `u16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `u16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u16>(x_i64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -592,7 +592,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u16>(x_i32);
|
||||
| ^^^^^ expected u16, found i32
|
||||
help: you can convert an `i32` to `u16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u16>(x_i32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -602,7 +602,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u16>(x_i16);
|
||||
| ^^^^^ expected u16, found i16
|
||||
help: you can convert an `i16` to `u16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i16` to `u16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u16>(x_i16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -612,7 +612,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u16>(x_i8);
|
||||
| ^^^^ expected u16, found i8
|
||||
help: you can convert an `i8` to `u16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i8` to `u16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u16>(x_i8.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -622,7 +622,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i16>(x_usize);
|
||||
| ^^^^^^^ expected i16, found usize
|
||||
help: you can convert an `usize` to `i16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `usize` to `i16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i16>(x_usize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -632,7 +632,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i16>(x_u64);
|
||||
| ^^^^^ expected i16, found u64
|
||||
help: you can convert an `u64` to `i16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u64` to `i16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i16>(x_u64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -642,7 +642,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i16>(x_u32);
|
||||
| ^^^^^ expected i16, found u32
|
||||
help: you can convert an `u32` to `i16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u32` to `i16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i16>(x_u32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -652,7 +652,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i16>(x_u16);
|
||||
| ^^^^^ expected i16, found u16
|
||||
help: you can convert an `u16` to `i16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u16` to `i16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i16>(x_u16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -662,7 +662,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i16>(x_u8);
|
||||
| ^^^^ expected i16, found u8
|
||||
help: you can convert an `u8` to `i16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u8` to `i16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i16>(x_u8.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -672,7 +672,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i16>(x_isize);
|
||||
| ^^^^^^^ expected i16, found isize
|
||||
help: you can convert an `isize` to `i16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `i16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i16>(x_isize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -682,7 +682,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i16>(x_i64);
|
||||
| ^^^^^ expected i16, found i64
|
||||
help: you can convert an `i64` to `i16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i16>(x_i64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -692,7 +692,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i16>(x_i32);
|
||||
| ^^^^^ expected i16, found i32
|
||||
help: you can convert an `i32` to `i16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i16>(x_i32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -711,7 +711,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u8>(x_usize);
|
||||
| ^^^^^^^ expected u8, found usize
|
||||
help: you can convert an `usize` to `u8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `usize` to `u8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u8>(x_usize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -721,7 +721,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u8>(x_u64);
|
||||
| ^^^^^ expected u8, found u64
|
||||
help: you can convert an `u64` to `u8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u64` to `u8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u8>(x_u64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -731,7 +731,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u8>(x_u32);
|
||||
| ^^^^^ expected u8, found u32
|
||||
help: you can convert an `u32` to `u8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u32` to `u8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u8>(x_u32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -741,7 +741,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u8>(x_u16);
|
||||
| ^^^^^ expected u8, found u16
|
||||
help: you can convert an `u16` to `u8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u16` to `u8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u8>(x_u16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -751,7 +751,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u8>(x_isize);
|
||||
| ^^^^^^^ expected u8, found isize
|
||||
help: you can convert an `isize` to `u8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `u8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u8>(x_isize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -761,7 +761,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u8>(x_i64);
|
||||
| ^^^^^ expected u8, found i64
|
||||
help: you can convert an `i64` to `u8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `u8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u8>(x_i64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -771,7 +771,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u8>(x_i32);
|
||||
| ^^^^^ expected u8, found i32
|
||||
help: you can convert an `i32` to `u8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `u8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u8>(x_i32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -781,7 +781,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u8>(x_i16);
|
||||
| ^^^^^ expected u8, found i16
|
||||
help: you can convert an `i16` to `u8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i16` to `u8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u8>(x_i16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -791,7 +791,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<u8>(x_i8);
|
||||
| ^^^^ expected u8, found i8
|
||||
help: you can convert an `i8` to `u8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i8` to `u8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<u8>(x_i8.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -801,7 +801,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i8>(x_usize);
|
||||
| ^^^^^^^ expected i8, found usize
|
||||
help: you can convert an `usize` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `usize` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i8>(x_usize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -811,7 +811,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i8>(x_u64);
|
||||
| ^^^^^ expected i8, found u64
|
||||
help: you can convert an `u64` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u64` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i8>(x_u64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -821,7 +821,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i8>(x_u32);
|
||||
| ^^^^^ expected i8, found u32
|
||||
help: you can convert an `u32` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u32` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i8>(x_u32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -831,7 +831,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i8>(x_u16);
|
||||
| ^^^^^ expected i8, found u16
|
||||
help: you can convert an `u16` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u16` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i8>(x_u16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -841,7 +841,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i8>(x_u8);
|
||||
| ^^^^ expected i8, found u8
|
||||
help: you can convert an `u8` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `u8` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i8>(x_u8.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -851,7 +851,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i8>(x_isize);
|
||||
| ^^^^^^^ expected i8, found isize
|
||||
help: you can convert an `isize` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i8>(x_isize.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -861,7 +861,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i8>(x_i64);
|
||||
| ^^^^^ expected i8, found i64
|
||||
help: you can convert an `i64` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i8>(x_i64.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -871,7 +871,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i8>(x_i32);
|
||||
| ^^^^^ expected i8, found i32
|
||||
help: you can convert an `i32` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i8>(x_i32.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -881,7 +881,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | foo::<i8>(x_i16);
|
||||
| ^^^^^ expected i8, found i16
|
||||
help: you can convert an `i16` to `i8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | foo::<i8>(x_i16.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,5 +1,5 @@
|
||||
thread 'rustc' panicked at 'assertion failed: rows.iter().all(|r| r.len() == v.len())', src/librustc_mir/hair/pattern/_match.rs:1085:5
|
||||
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
|
||||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
|
||||
|
||||
error: internal compiler error: unexpected panic
|
||||
|
||||
|
@ -21,7 +21,18 @@ LL | pub (b) fn bfn() {}
|
||||
`pub(in path::to::module)`: visible only on the specified path
|
||||
|
||||
error[E0704]: incorrect visibility restriction
|
||||
--> $DIR/pub-restricted.rs:22:14
|
||||
--> $DIR/pub-restricted.rs:7:6
|
||||
|
|
||||
LL | pub (crate::a) fn cfn() {}
|
||||
| ^^^^^^^^ help: make this visible only to module `crate::a` with `in`: `in crate::a`
|
||||
|
|
||||
= help: some possible visibility restrictions are:
|
||||
`pub(crate)`: visible only on the current crate
|
||||
`pub(super)`: visible only in the current module's parent
|
||||
`pub(in path::to::module)`: visible only on the specified path
|
||||
|
||||
error[E0704]: incorrect visibility restriction
|
||||
--> $DIR/pub-restricted.rs:24:14
|
||||
|
|
||||
LL | pub (a) invalid: usize,
|
||||
| ^ help: make this visible only to module `a` with `in`: `in a`
|
||||
@ -32,7 +43,7 @@ LL | pub (a) invalid: usize,
|
||||
`pub(in path::to::module)`: visible only on the specified path
|
||||
|
||||
error[E0704]: incorrect visibility restriction
|
||||
--> $DIR/pub-restricted.rs:31:6
|
||||
--> $DIR/pub-restricted.rs:33:6
|
||||
|
|
||||
LL | pub (xyz) fn xyz() {}
|
||||
| ^^^ help: make this visible only to module `xyz` with `in`: `in xyz`
|
||||
@ -43,11 +54,11 @@ LL | pub (xyz) fn xyz() {}
|
||||
`pub(in path::to::module)`: visible only on the specified path
|
||||
|
||||
error: visibilities can only be restricted to ancestor modules
|
||||
--> $DIR/pub-restricted.rs:23:17
|
||||
--> $DIR/pub-restricted.rs:25:17
|
||||
|
|
||||
LL | pub (in x) non_parent_invalid: usize,
|
||||
| ^
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0704`.
|
||||
|
@ -42,7 +42,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | let f = [0; -4_isize];
|
||||
| ^^^^^^^^ expected usize, found isize
|
||||
help: you can convert an `isize` to `usize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | let f = [0; (-4_isize).try_into().unwrap()];
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -52,7 +52,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | let f = [0_usize; -1_isize];
|
||||
| ^^^^^^^^ expected usize, found isize
|
||||
help: you can convert an `isize` to `usize` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | let f = [0_usize; (-1_isize).try_into().unwrap()];
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -27,7 +27,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | let _: i32 = 22_i64 >> 1_i32;
|
||||
| ^^^^^^^^^^^^^^^ expected i32, found i64
|
||||
help: you can convert an `i64` to `i32` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | let _: i32 = (22_i64 >> 1_i32).try_into().unwrap();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,4 +1,4 @@
|
||||
error: symbol-name(_ZN5basic4main17h08bcaf310214ed52E)
|
||||
error: symbol-name(_ZN5basic4main17hd72940ef9669d526E)
|
||||
--> $DIR/basic.rs:3:1
|
||||
|
|
||||
LL | #[rustc_symbol_name]
|
||||
|
@ -1,4 +1,4 @@
|
||||
error: symbol-name(_ZN5impl13foo3Foo3bar17hc487d6ec13fe9124E)
|
||||
error: symbol-name(_ZN5impl13foo3Foo3bar17he53b9bee7600ed8dE)
|
||||
--> $DIR/impl1.rs:8:9
|
||||
|
|
||||
LL | #[rustc_symbol_name]
|
||||
@ -10,7 +10,7 @@ error: def-path(foo::Foo::bar)
|
||||
LL | #[rustc_def_path]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz17h38577281258e1527E)
|
||||
error: symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz17h86c41f0462d901d4E)
|
||||
--> $DIR/impl1.rs:18:9
|
||||
|
|
||||
LL | #[rustc_symbol_name]
|
||||
|
@ -6,7 +6,7 @@ LL | fn global_bound_is_hidden() -> u8
|
||||
...
|
||||
LL | B::get_x()
|
||||
| ^^^^^^^^^^ expected u8, found i32
|
||||
help: you can convert an `i32` to `u8` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `u8` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | B::get_x().try_into().unwrap()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -12,7 +12,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | identity_u16(y);
|
||||
| ^ expected u16, found i32
|
||||
help: you can convert an `i32` to `u16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | identity_u16(y.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -22,7 +22,7 @@ error[E0308]: mismatched types
|
||||
|
|
||||
LL | identity_u16(a);
|
||||
| ^ expected u16, found isize
|
||||
help: you can convert an `isize` to `u16` or panic if it the converted value wouldn't fit
|
||||
help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | identity_u16(a.try_into().unwrap());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
Loading…
x
Reference in New Issue
Block a user