review comments: tweak prefix strings
This commit is contained in:
parent
83ffda5216
commit
b2e6aef073
|
@ -252,7 +252,7 @@ impl<'tcx> ty::TyS<'tcx> {
|
|||
match self.kind {
|
||||
ty::Infer(_) | ty::Error | ty::Bool | ty::Char | ty::Int(_) |
|
||||
ty::Uint(_) | ty::Float(_) | ty::Str | ty::Never => "type".into(),
|
||||
ty::Tuple(ref tys) if tys.is_empty() => "type".into(),
|
||||
ty::Tuple(ref tys) if tys.is_empty() => "unit type".into(),
|
||||
ty::Adt(def, _) => def.descr().into(),
|
||||
ty::Foreign(_) => "extern type".into(),
|
||||
ty::Array(..) => "array".into(),
|
||||
|
@ -264,13 +264,13 @@ impl<'tcx> ty::TyS<'tcx> {
|
|||
}.into(),
|
||||
ty::FnDef(..) => "fn item".into(),
|
||||
ty::FnPtr(_) => "fn pointer".into(),
|
||||
ty::Dynamic(..) => "trait".into(),
|
||||
ty::Dynamic(..) => "trait object".into(),
|
||||
ty::Closure(..) => "closure".into(),
|
||||
ty::Generator(..) => "generator".into(),
|
||||
ty::GeneratorWitness(..) => "generator witness".into(),
|
||||
ty::Tuple(..) => "tuple".into(),
|
||||
ty::Placeholder(..) => "placeholder type".into(),
|
||||
ty::Bound(..) => "bound type".into(),
|
||||
ty::Placeholder(..) => "higher-ranked type".into(),
|
||||
ty::Bound(..) => "bound type variable".into(),
|
||||
ty::Projection(_) => "associated type".into(),
|
||||
ty::UnnormalizedProjection(_) => "associated type".into(),
|
||||
ty::Param(_) => "type parameter".into(),
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | fn main() { let i: (); i = f(()); }
|
||||
| ^^ expected isize, found ()
|
||||
|
|
||||
= note: expected type `isize`
|
||||
found type `()`
|
||||
= note: expected type `isize`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@ error[E0308]: mismatched types
|
|||
LL | |_: [_; break]| {}
|
||||
| ^^^^^^^^^^^^^^^^^^ expected (), found closure
|
||||
|
|
||||
= note: expected type `()`
|
||||
found closure `[closure@$DIR/array-break-length.rs:3:9: 3:27]`
|
||||
= note: expected unit type `()`
|
||||
found closure `[closure@$DIR/array-break-length.rs:3:9: 3:27]`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/array-break-length.rs:8:9
|
||||
|
@ -25,8 +25,8 @@ error[E0308]: mismatched types
|
|||
LL | |_: [_; continue]| {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected (), found closure
|
||||
|
|
||||
= note: expected type `()`
|
||||
found closure `[closure@$DIR/array-break-length.rs:8:9: 8:30]`
|
||||
= note: expected unit type `()`
|
||||
found closure `[closure@$DIR/array-break-length.rs:8:9: 8:30]`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ LL | fn visit() {}
|
|||
LL | <() as Visit>::visit();
|
||||
| ^^^^^^^^^^^^^^^^^^^^ expected (), found &()
|
||||
|
|
||||
= note: expected type `()`
|
||||
found reference `&()`
|
||||
= note: expected unit type `()`
|
||||
found reference `&()`
|
||||
= note: required because of the requirements on the impl of `Visit` for `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
@ -9,8 +9,8 @@ LL | impl Bar for Foo {
|
|||
LL | type Ok = ();
|
||||
| ^^^^^^^^^^^^^ expected u32, found ()
|
||||
|
|
||||
= note: expected type `u32`
|
||||
found type `()`
|
||||
= note: expected type `u32`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ LL | fn return_targets_async_block_not_fn() -> u8 {
|
|||
| |
|
||||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected type `u8`
|
||||
found type `()`
|
||||
= note: expected type `u8`
|
||||
found unit type `()`
|
||||
|
||||
error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
|
||||
--> $DIR/async-block-control-flow-static-semantics.rs:18:39
|
||||
|
@ -35,8 +35,8 @@ error[E0271]: type mismatch resolving `<impl std::future::Future as std::future:
|
|||
LL | let _: &dyn Future<Output = ()> = █
|
||||
| ^^^^^^ expected (), found u8
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `u8`
|
||||
= note: expected unit type `()`
|
||||
found type `u8`
|
||||
= note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
|
@ -52,8 +52,8 @@ LL | |
|
|||
LL | | }
|
||||
| |_^ expected u8, found ()
|
||||
|
|
||||
= note: expected type `u8`
|
||||
found type `()`
|
||||
= note: expected type `u8`
|
||||
found unit type `()`
|
||||
|
||||
error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
|
||||
--> $DIR/async-block-control-flow-static-semantics.rs:27:39
|
||||
|
@ -61,8 +61,8 @@ error[E0271]: type mismatch resolving `<impl std::future::Future as std::future:
|
|||
LL | let _: &dyn Future<Output = ()> = █
|
||||
| ^^^^^^ expected (), found u8
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `u8`
|
||||
= note: expected unit type `()`
|
||||
found type `u8`
|
||||
= note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
|
@ -73,8 +73,8 @@ LL | fn rethrow_targets_async_block_not_fn() -> Result<u8, MyErr> {
|
|||
| |
|
||||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected enum `std::result::Result<u8, MyErr>`
|
||||
found type `()`
|
||||
= note: expected enum `std::result::Result<u8, MyErr>`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/async-block-control-flow-static-semantics.rs:57:50
|
||||
|
@ -84,8 +84,8 @@ LL | fn rethrow_targets_async_block_not_async_fn() -> Result<u8, MyErr> {
|
|||
| |
|
||||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected enum `std::result::Result<u8, MyErr>`
|
||||
found type `()`
|
||||
= note: expected enum `std::result::Result<u8, MyErr>`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ LL | | foo();
|
|||
LL | | };
|
||||
| |_____^ expected i32, found ()
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | true
|
||||
| ^^^^ expected (), found bool
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `bool`
|
||||
= note: expected unit type `()`
|
||||
found type `bool`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ LL | fn drop(&mut self) {
|
|||
LL | true
|
||||
| ^^^^ expected (), found bool
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `bool`
|
||||
= note: expected unit type `()`
|
||||
found type `bool`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
fn main() {
|
||||
while true { //~ WARN denote infinite loops with
|
||||
true //~ ERROR mismatched types
|
||||
//~| expected type `()`
|
||||
//~| expected unit type `()`
|
||||
//~| found type `bool`
|
||||
//~| expected (), found bool
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ error[E0308]: mismatched types
|
|||
LL | true
|
||||
| ^^^^ expected (), found bool
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `bool`
|
||||
= note: expected unit type `()`
|
||||
found type `bool`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ LL | "bla".to_string();
|
|||
| - help: consider removing this semicolon
|
||||
|
|
||||
= note: expected struct `std::string::String`
|
||||
found type `()`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/consider-removing-last-semi.rs:6:11
|
||||
|
@ -24,7 +24,7 @@ LL | "removeme".to_string();
|
|||
| - help: consider removing this semicolon
|
||||
|
|
||||
= note: expected struct `std::string::String`
|
||||
found type `()`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ LL | fn blah() -> i32 {
|
|||
LL | ;
|
||||
| - help: consider removing this semicolon
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ LL | ;
|
|||
| - help: consider removing this semicolon
|
||||
|
|
||||
= note: expected struct `std::string::String`
|
||||
found type `()`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-13428.rs:11:13
|
||||
|
@ -24,7 +24,7 @@ LL | ;
|
|||
| - help: consider removing this semicolon
|
||||
|
|
||||
= note: expected struct `std::string::String`
|
||||
found type `()`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ mod a {
|
|||
Enum::EnumStructVariant { x: 1, y: 2, z: 3 }
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected (), found enum `a::Enum`
|
||||
//~| expected type `()`
|
||||
//~| expected unit type `()`
|
||||
//~| found enum `a::Enum`
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ mod b {
|
|||
a::Enum::EnumStructVariant { x, y, z } => {
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected (), found enum `a::Enum`
|
||||
//~| expected type `()`
|
||||
//~| expected unit type `()`
|
||||
//~| found enum `a::Enum`
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ LL | pub fn get_enum_struct_variant() -> () {
|
|||
LL | Enum::EnumStructVariant { x: 1, y: 2, z: 3 }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum`
|
||||
|
|
||||
= note: expected type `()`
|
||||
found enum `a::Enum`
|
||||
= note: expected unit type `()`
|
||||
found enum `a::Enum`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-13624.rs:22:9
|
||||
|
@ -17,8 +17,8 @@ LL | match enum_struct_variant {
|
|||
LL | a::Enum::EnumStructVariant { x, y, z } => {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum`
|
||||
|
|
||||
= note: expected type `()`
|
||||
found enum `a::Enum`
|
||||
= note: expected unit type `()`
|
||||
found enum `a::Enum`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ LL | fn foo(x: i32) {
|
|||
LL | |y| x + y
|
||||
| ^^^^^^^^^ expected (), found closure
|
||||
|
|
||||
= note: expected type `()`
|
||||
found closure `[closure@$DIR/issue-20862.rs:2:5: 2:14 x:_]`
|
||||
= note: expected unit type `()`
|
||||
found closure `[closure@$DIR/issue-20862.rs:2:5: 2:14 x:_]`
|
||||
|
||||
error[E0618]: expected function, found `()`
|
||||
--> $DIR/issue-20862.rs:7:13
|
||||
|
|
|
@ -17,8 +17,8 @@ LL | let b = Bob + 3.5;
|
|||
LL | b + 3
|
||||
| ^^^^^ expected (), found struct `Bob`
|
||||
|
|
||||
= note: expected type `()`
|
||||
found struct `Bob`
|
||||
= note: expected unit type `()`
|
||||
found struct `Bob`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
fn main() {
|
||||
&panic!()
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected type `()`
|
||||
//~| expected unit type `()`
|
||||
//~| found reference `&_`
|
||||
//~| expected (), found reference
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ LL | &panic!()
|
|||
| expected (), found reference
|
||||
| help: consider removing the borrow: `panic!()`
|
||||
|
|
||||
= note: expected type `()`
|
||||
found reference `&_`
|
||||
= note: expected unit type `()`
|
||||
found reference `&_`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | foo()
|
||||
| ^^^^^ expected (), found usize
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `usize`
|
||||
= note: expected unit type `()`
|
||||
found type `usize`
|
||||
help: try adding a semicolon
|
||||
|
|
||||
LL | foo();
|
||||
|
|
|
@ -7,8 +7,8 @@ LL | | 'a: while break 'a {};
|
|||
LL | | };
|
||||
| |_________^ expected !, found ()
|
||||
|
|
||||
= note: expected type `!`
|
||||
found type `()`
|
||||
= note: expected type `!`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/break-while-condition.rs:16:13
|
||||
|
@ -18,8 +18,8 @@ LL | | break
|
|||
LL | | }
|
||||
| |_____________^ expected !, found ()
|
||||
|
|
||||
= note: expected type `!`
|
||||
found type `()`
|
||||
= note: expected type `!`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/break-while-condition.rs:24:13
|
||||
|
@ -29,8 +29,8 @@ LL | | return
|
|||
LL | | }
|
||||
| |_____________^ expected !, found ()
|
||||
|
|
||||
= note: expected type `!`
|
||||
found type `()`
|
||||
= note: expected type `!`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ LL | fn foo() {
|
|||
LL | "bar boo"
|
||||
| ^^^^^^^^^^^^^^^^^^^^ expected (), found reference
|
||||
|
|
||||
= note: expected type `()`
|
||||
found reference `&'static str`
|
||||
= note: expected unit type `()`
|
||||
found reference `&'static str`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ LL | fn plus_one(x: i32) -> i32 {
|
|||
LL | x + 1;
|
||||
| - help: consider removing this semicolon
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/coercion-missing-tail-expected-type.rs:7:13
|
||||
|
@ -21,8 +21,8 @@ LL | fn foo() -> Result<u8, u64> {
|
|||
LL | Ok(1);
|
||||
| - help: consider removing this semicolon
|
||||
|
|
||||
= note: expected enum `std::result::Result<u8, u64>`
|
||||
found type `()`
|
||||
= note: expected enum `std::result::Result<u8, u64>`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -31,16 +31,16 @@ fn main() {
|
|||
// n > m
|
||||
let &&x = &1isize as &dyn T;
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected trait `dyn T`
|
||||
//~| expected trait object `dyn T`
|
||||
//~| found reference `&_`
|
||||
//~| expected trait T, found reference
|
||||
let &&&x = &(&1isize as &dyn T);
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected trait `dyn T`
|
||||
//~| expected trait object `dyn T`
|
||||
//~| found reference `&_`
|
||||
//~| expected trait T, found reference
|
||||
let box box x = box 1isize as Box<dyn T>;
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected trait `dyn T`
|
||||
//~| expected trait object `dyn T`
|
||||
//~| found struct `std::boxed::Box<_>`
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ LL | let &&x = &1isize as &dyn T;
|
|||
| expected trait T, found reference
|
||||
| help: you can probably remove the explicit borrow: `x`
|
||||
|
|
||||
= note: expected trait `dyn T`
|
||||
found reference `&_`
|
||||
= note: expected trait object `dyn T`
|
||||
found reference `&_`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/destructure-trait-ref.rs:37:11
|
||||
|
@ -37,8 +37,8 @@ LL | let &&&x = &(&1isize as &dyn T);
|
|||
| expected trait T, found reference
|
||||
| help: you can probably remove the explicit borrow: `x`
|
||||
|
|
||||
= note: expected trait `dyn T`
|
||||
found reference `&_`
|
||||
= note: expected trait object `dyn T`
|
||||
found reference `&_`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/destructure-trait-ref.rs:42:13
|
||||
|
@ -46,8 +46,8 @@ error[E0308]: mismatched types
|
|||
LL | let box box x = box 1isize as Box<dyn T>;
|
||||
| ^^^^^ expected trait T, found struct `std::boxed::Box`
|
||||
|
|
||||
= note: expected trait `dyn T`
|
||||
found struct `std::boxed::Box<_>`
|
||||
= note: expected trait object `dyn T`
|
||||
found struct `std::boxed::Box<_>`
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | &panic!()
|
||||
| ^^^^^^^^^ expected (), found reference
|
||||
|
|
||||
= note: expected type `()`
|
||||
found reference `&_`
|
||||
= note: expected unit type `()`
|
||||
found reference `&_`
|
||||
help: try adding a return type
|
||||
|
|
||||
LL | fn g() -> &_ {
|
||||
|
|
|
@ -33,7 +33,7 @@ pub fn main() {
|
|||
f5.2 = Bar1 {f: 36};
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected trait ToBar, found struct `Bar1`
|
||||
//~| expected trait `dyn ToBar`
|
||||
//~| expected trait object `dyn ToBar`
|
||||
//~| found struct `Bar1`
|
||||
//~| ERROR the size for values of type
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | f5.2 = Bar1 {f: 36};
|
||||
| ^^^^^^^^^^^^ expected trait ToBar, found struct `Bar1`
|
||||
|
|
||||
= note: expected trait `dyn ToBar`
|
||||
found struct `Bar1`
|
||||
= note: expected trait object `dyn ToBar`
|
||||
found struct `Bar1`
|
||||
|
||||
error[E0277]: the size for values of type `dyn ToBar` cannot be known at compilation time
|
||||
--> $DIR/dst-bad-assign-3.rs:33:5
|
||||
|
|
|
@ -35,7 +35,7 @@ pub fn main() {
|
|||
f5.ptr = Bar1 {f: 36};
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected trait ToBar, found struct `Bar1`
|
||||
//~| expected trait `dyn ToBar`
|
||||
//~| expected trait object `dyn ToBar`
|
||||
//~| found struct `Bar1`
|
||||
//~| ERROR the size for values of type
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | f5.ptr = Bar1 {f: 36};
|
||||
| ^^^^^^^^^^^^ expected trait ToBar, found struct `Bar1`
|
||||
|
|
||||
= note: expected trait `dyn ToBar`
|
||||
found struct `Bar1`
|
||||
= note: expected trait object `dyn ToBar`
|
||||
found struct `Bar1`
|
||||
|
||||
error[E0277]: the size for values of type `dyn ToBar` cannot be known at compilation time
|
||||
--> $DIR/dst-bad-assign.rs:35:5
|
||||
|
|
|
@ -16,8 +16,8 @@ error[E0308]: mismatched types
|
|||
LL | some_other_func() = 4;
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error[E0070]: invalid left-hand side expression
|
||||
--> $DIR/E0070.rs:8:5
|
||||
|
|
|
@ -5,15 +5,15 @@ fn needs_fn<F>(x: F) where F: Fn(isize) -> isize {}
|
|||
fn main() {
|
||||
let _: () = (box |_: isize| {}) as Box<dyn FnOnce(isize)>;
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected type `()`
|
||||
//~| expected unit type `()`
|
||||
//~| found struct `std::boxed::Box<dyn std::ops::FnOnce(isize)>`
|
||||
let _: () = (box |_: isize, isize| {}) as Box<dyn Fn(isize, isize)>;
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected type `()`
|
||||
//~| expected unit type `()`
|
||||
//~| found struct `std::boxed::Box<dyn std::ops::Fn(isize, isize)>`
|
||||
let _: () = (box || -> isize { unimplemented!() }) as Box<dyn FnMut() -> isize>;
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected type `()`
|
||||
//~| expected unit type `()`
|
||||
//~| found struct `std::boxed::Box<dyn std::ops::FnMut() -> isize>`
|
||||
|
||||
needs_fn(1);
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | let _: () = (box |_: isize| {}) as Box<dyn FnOnce(isize)>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
|
||||
|
|
||||
= note: expected type `()`
|
||||
found struct `std::boxed::Box<dyn std::ops::FnOnce(isize)>`
|
||||
= note: expected unit type `()`
|
||||
found struct `std::boxed::Box<dyn std::ops::FnOnce(isize)>`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/fn-trait-formatting.rs:10:17
|
||||
|
@ -13,8 +13,8 @@ error[E0308]: mismatched types
|
|||
LL | let _: () = (box |_: isize, isize| {}) as Box<dyn Fn(isize, isize)>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
|
||||
|
|
||||
= note: expected type `()`
|
||||
found struct `std::boxed::Box<dyn std::ops::Fn(isize, isize)>`
|
||||
= note: expected unit type `()`
|
||||
found struct `std::boxed::Box<dyn std::ops::Fn(isize, isize)>`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/fn-trait-formatting.rs:14:17
|
||||
|
@ -22,8 +22,8 @@ error[E0308]: mismatched types
|
|||
LL | let _: () = (box || -> isize { unimplemented!() }) as Box<dyn FnMut() -> isize>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
|
||||
|
|
||||
= note: expected type `()`
|
||||
found struct `std::boxed::Box<dyn std::ops::FnMut() -> isize>`
|
||||
= note: expected unit type `()`
|
||||
found struct `std::boxed::Box<dyn std::ops::FnMut() -> isize>`
|
||||
|
||||
error[E0277]: expected a `std::ops::Fn<(isize,)>` closure, found `{integer}`
|
||||
--> $DIR/fn-trait-formatting.rs:19:14
|
||||
|
|
|
@ -14,38 +14,38 @@ fn main() {
|
|||
//~^ ERROR mismatched types
|
||||
//~| expected struct `Foo`, found ()
|
||||
//~| expected struct `Foo<isize>`
|
||||
//~| found type `()`
|
||||
//~| found unit type `()`
|
||||
|
||||
// ...even when they're present, but the same types as the defaults.
|
||||
let _: Foo<isize, B, C> = ();
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected struct `Foo`, found ()
|
||||
//~| expected struct `Foo<isize>`
|
||||
//~| found type `()`
|
||||
//~| found unit type `()`
|
||||
|
||||
// Including cases where the default is using previous type params.
|
||||
let _: HashMap<String, isize> = ();
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected struct `HashMap`, found ()
|
||||
//~| expected struct `HashMap<std::string::String, isize>`
|
||||
//~| found type `()`
|
||||
//~| found unit type `()`
|
||||
let _: HashMap<String, isize, Hash<String>> = ();
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected struct `HashMap`, found ()
|
||||
//~| expected struct `HashMap<std::string::String, isize>`
|
||||
//~| found type `()`
|
||||
//~| found unit type `()`
|
||||
|
||||
// But not when there's a different type in between.
|
||||
let _: Foo<A, isize, C> = ();
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected struct `Foo`, found ()
|
||||
//~| expected struct `Foo<A, isize>`
|
||||
//~| found type `()`
|
||||
//~| found unit type `()`
|
||||
|
||||
// And don't print <> at all when there's just defaults.
|
||||
let _: Foo<A, B, C> = ();
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected struct `Foo`, found ()
|
||||
//~| expected struct `Foo`
|
||||
//~| found type `()`
|
||||
//~| found unit type `()`
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ LL | let _: Foo<isize> = ();
|
|||
| ^^ expected struct `Foo`, found ()
|
||||
|
|
||||
= note: expected struct `Foo<isize>`
|
||||
found type `()`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/generic-type-params-name-repr.rs:20:31
|
||||
|
@ -14,7 +14,7 @@ LL | let _: Foo<isize, B, C> = ();
|
|||
| ^^ expected struct `Foo`, found ()
|
||||
|
|
||||
= note: expected struct `Foo<isize>`
|
||||
found type `()`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/generic-type-params-name-repr.rs:27:37
|
||||
|
@ -23,7 +23,7 @@ LL | let _: HashMap<String, isize> = ();
|
|||
| ^^ expected struct `HashMap`, found ()
|
||||
|
|
||||
= note: expected struct `HashMap<std::string::String, isize>`
|
||||
found type `()`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/generic-type-params-name-repr.rs:32:51
|
||||
|
@ -32,7 +32,7 @@ LL | let _: HashMap<String, isize, Hash<String>> = ();
|
|||
| ^^ expected struct `HashMap`, found ()
|
||||
|
|
||||
= note: expected struct `HashMap<std::string::String, isize>`
|
||||
found type `()`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/generic-type-params-name-repr.rs:39:31
|
||||
|
@ -41,7 +41,7 @@ LL | let _: Foo<A, isize, C> = ();
|
|||
| ^^ expected struct `Foo`, found ()
|
||||
|
|
||||
= note: expected struct `Foo<A, isize>`
|
||||
found type `()`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/generic-type-params-name-repr.rs:46:27
|
||||
|
@ -50,7 +50,7 @@ LL | let _: Foo<A, B, C> = ();
|
|||
| ^^ expected struct `Foo`, found ()
|
||||
|
|
||||
= note: expected struct `Foo`
|
||||
found type `()`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ LL | | 6u32;
|
|||
LL | | };
|
||||
| |_____- if and else have incompatible types
|
||||
|
|
||||
= note: expected type `u32`
|
||||
found type `()`
|
||||
= note: expected type `u32`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: if and else have incompatible types
|
||||
--> $DIR/if-else-type-mismatch.rs:25:9
|
||||
|
@ -92,8 +92,8 @@ LL | | 10u32;
|
|||
LL | | };
|
||||
| |_____- if and else have incompatible types
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: if and else have incompatible types
|
||||
--> $DIR/if-else-type-mismatch.rs:37:9
|
||||
|
@ -122,8 +122,8 @@ LL | |
|
|||
LL | | };
|
||||
| |_____^ expected i32, found ()
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ LL | | return 3;
|
|||
LL | | }
|
||||
| |_____^ expected usize, found ()
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found type `()`
|
||||
= note: expected type `usize`
|
||||
found unit type `()`
|
||||
= note: `if` expressions without `else` evaluate to `()`
|
||||
= help: consider adding an `else` block that evaluates to the expected type
|
||||
|
||||
|
@ -24,8 +24,8 @@ LL | | return 3;
|
|||
LL | | };
|
||||
| |_____^ expected usize, found ()
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found type `()`
|
||||
= note: expected type `usize`
|
||||
found unit type `()`
|
||||
= note: `if` expressions without `else` evaluate to `()`
|
||||
= help: consider adding an `else` block that evaluates to the expected type
|
||||
|
||||
|
@ -39,8 +39,8 @@ LL | | 3
|
|||
LL | | }
|
||||
| |_____^ expected usize, found ()
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found type `()`
|
||||
= note: expected type `usize`
|
||||
found unit type `()`
|
||||
= note: `if` expressions without `else` evaluate to `()`
|
||||
= help: consider adding an `else` block that evaluates to the expected type
|
||||
|
||||
|
@ -54,8 +54,8 @@ LL | | return 3;
|
|||
LL | | }
|
||||
| |_____^ expected usize, found ()
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found type `()`
|
||||
= note: expected type `usize`
|
||||
found unit type `()`
|
||||
= note: `if` expressions without `else` evaluate to `()`
|
||||
= help: consider adding an `else` block that evaluates to the expected type
|
||||
|
||||
|
@ -70,8 +70,8 @@ LL | | return 3;
|
|||
LL | | };
|
||||
| |_____^ expected usize, found ()
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found type `()`
|
||||
= note: expected type `usize`
|
||||
found unit type `()`
|
||||
= note: `if` expressions without `else` evaluate to `()`
|
||||
= help: consider adding an `else` block that evaluates to the expected type
|
||||
|
||||
|
@ -85,8 +85,8 @@ LL | | 3
|
|||
LL | | }
|
||||
| |_____^ expected usize, found ()
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found type `()`
|
||||
= note: expected type `usize`
|
||||
found unit type `()`
|
||||
= note: `if` expressions without `else` evaluate to `()`
|
||||
= help: consider adding an `else` block that evaluates to the expected type
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
fn main() {
|
||||
let a = if true { true };
|
||||
//~^ ERROR if may be missing an else clause [E0317]
|
||||
//~| expected type `()`
|
||||
//~| expected unit type `()`
|
||||
//~| found type `bool`
|
||||
//~| expected (), found bool
|
||||
println!("{}", a);
|
||||
|
|
|
@ -7,8 +7,8 @@ LL | let a = if true { true };
|
|||
| | found here
|
||||
| expected (), found bool
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `bool`
|
||||
= note: expected unit type `()`
|
||||
found type `bool`
|
||||
= note: `if` expressions without `else` evaluate to `()`
|
||||
= help: consider adding an `else` block that evaluates to the expected type
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@ LL | | _ => true
|
|||
LL | | }
|
||||
| |_____- `match` arms have incompatible types
|
||||
|
|
||||
= note: expected type `bool`
|
||||
found type `()`
|
||||
= note: expected type `bool`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ fn main() {
|
|||
match () {
|
||||
Slice { data: data, len: len } => (),
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected type `()`
|
||||
//~| expected unit type `()`
|
||||
//~| found struct `Slice<_>`
|
||||
//~| expected (), found struct `Slice`
|
||||
_ => unreachable!()
|
||||
|
|
|
@ -6,8 +6,8 @@ LL | match () {
|
|||
LL | Slice { data: data, len: len } => (),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `Slice`
|
||||
|
|
||||
= note: expected type `()`
|
||||
found struct `Slice<_>`
|
||||
= note: expected unit type `()`
|
||||
found struct `Slice<_>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
fn f<'r>(p: &'r mut fn(p: &mut ())) {
|
||||
(*p)(()) //~ ERROR mismatched types
|
||||
//~| expected mutable reference `&mut ()`
|
||||
//~| found type `()`
|
||||
//~| found unit type `()`
|
||||
//~| expected &mut (), found ()
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ LL | (*p)(())
|
|||
| help: consider mutably borrowing here: `&mut ()`
|
||||
|
|
||||
= note: expected mutable reference `&mut ()`
|
||||
found type `()`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ LL | | _ => None
|
|||
LL | | }
|
||||
| |_____- `match` arms have incompatible types
|
||||
|
|
||||
= note: expected type `RoomDirection`
|
||||
found type `std::option::Option<_>`
|
||||
= note: expected enum `RoomDirection`
|
||||
found enum `std::option::Option<_>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
fn main() {
|
||||
if let Some(homura) = Some("madoka") { //~ ERROR missing an else clause
|
||||
//~| expected type `()`
|
||||
//~| expected unit type `()`
|
||||
//~| found type `{integer}`
|
||||
//~| expected (), found integer
|
||||
765
|
||||
|
|
|
@ -10,8 +10,8 @@ LL | | 765
|
|||
LL | | };
|
||||
| |_____^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
= note: `if` expressions without `else` evaluate to `()`
|
||||
= help: consider adding an `else` block that evaluates to the expected type
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | let _: () = foo::Foo.bar();
|
||||
| ^^^^^^^^^^^^^^ expected (), found bool
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `bool`
|
||||
= note: expected unit type `()`
|
||||
found type `bool`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ LL | loop { break };
|
|||
| expected i32, found ()
|
||||
| help: give it a value of the expected type: `break 42`
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-27042.rs:8:9
|
||||
|
@ -28,8 +28,8 @@ LL | |
|
|||
LL | | while true { break }; // but here we cite the whole loop
|
||||
| |____________________________^ expected i32, found ()
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-27042.rs:12:9
|
||||
|
@ -38,8 +38,8 @@ LL | / 'c:
|
|||
LL | | for _ in None { break }; // but here we cite the whole loop
|
||||
| |_______________________________^ expected i32, found ()
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-27042.rs:15:9
|
||||
|
@ -48,8 +48,8 @@ LL | / 'd:
|
|||
LL | | while let Some(_) = None { break };
|
||||
| |__________________________________________^ expected i32, found ()
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ LL | pub fn f<'a, T: Tr<'a>>() -> <T as Tr<'a>>::Out {}
|
|||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected associated type `<T as Tr<'a>>::Out`
|
||||
found type `()`
|
||||
found unit type `()`
|
||||
= note: consider constraining the associated type `<T as Tr<'a>>::Out` to `()` or calling a method that returns `<T as Tr<'a>>::Out`
|
||||
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | let empty_struct::XEmpty2 = ();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `empty_struct::XEmpty2`
|
||||
|
|
||||
= note: expected type `()`
|
||||
found struct `empty_struct::XEmpty2`
|
||||
= note: expected unit type `()`
|
||||
found struct `empty_struct::XEmpty2`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-37026.rs:7:9
|
||||
|
@ -13,8 +13,8 @@ error[E0308]: mismatched types
|
|||
LL | let empty_struct::XEmpty6(..) = ();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `empty_struct::XEmpty6`
|
||||
|
|
||||
= note: expected type `()`
|
||||
found struct `empty_struct::XEmpty6`
|
||||
= note: expected unit type `()`
|
||||
found struct `empty_struct::XEmpty6`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | let x: () = 0;
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ LL | <() as Visit>::visit();
|
|||
| ^^^^^^^^^^^^^^^^^^^^ expected &(), found ()
|
||||
|
|
||||
= note: expected reference `&()`
|
||||
found type `()`
|
||||
found unit type `()`
|
||||
= note: required because of the requirements on the impl of `Visit` for `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0326]: implemented const `CONST` has an incompatible type for trait
|
|||
LL | const CONST: () = ();
|
||||
| ^^ expected u32, found ()
|
||||
|
|
||||
= note: expected type `u32`
|
||||
found type `()`
|
||||
= note: expected type `u32`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ fn main() {
|
|||
0
|
||||
} else if false {
|
||||
//~^ ERROR if may be missing an else clause
|
||||
//~| expected type `()`
|
||||
//~| expected unit type `()`
|
||||
//~| found type `{integer}`
|
||||
//~| expected (), found integer
|
||||
1
|
||||
|
|
|
@ -12,8 +12,8 @@ LL | | 1
|
|||
LL | | };
|
||||
| |_____^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
= note: `if` expressions without `else` evaluate to `()`
|
||||
= help: consider adding an `else` block that evaluates to the expected type
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ LL |
|
|||
LL | break true;
|
||||
| - help: consider removing this semicolon
|
||||
|
|
||||
= note: expected type `bool`
|
||||
found type `()`
|
||||
= note: expected type `bool`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ LL | fn საჭმელად_გემრიელი_სადილი ( )
|
|||
| |
|
||||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected type `isize`
|
||||
found type `()`
|
||||
= note: expected type `isize`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ LL | fn main() { test(Ok(())); }
|
|||
| expected enum `std::option::Option`, found ()
|
||||
| help: try using a variant of the expected enum: `Some(())`
|
||||
|
|
||||
= note: expected enum `std::option::Option<()>`
|
||||
found type `()`
|
||||
= note: expected enum `std::option::Option<()>`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | () < std::mem::size_of::<_>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found usize
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `usize`
|
||||
= note: expected unit type `()`
|
||||
found type `usize`
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> $DIR/issue-47486.rs:3:11
|
||||
|
|
|
@ -31,8 +31,8 @@ LL | Drop = assert_eq!(1, 1)
|
|||
| expected (), found isize
|
||||
| found here
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `isize`
|
||||
= note: expected unit type `()`
|
||||
found type `isize`
|
||||
= note: `if` expressions without `else` evaluate to `()`
|
||||
= help: consider adding an `else` block that evaluates to the expected type
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
|
|
@ -10,8 +10,8 @@ error[E0308]: mismatched types
|
|||
LL | |y: Vec<[(); for x in 0..2 {}]>| {};
|
||||
| ^^^^^^^^^^^^^^^^ expected usize, found ()
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found type `()`
|
||||
= note: expected type `usize`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ LL | fn foo(b: bool) -> Result<bool,String> {
|
|||
LL | Err("bar".to_string());
|
||||
| - help: consider removing this semicolon
|
||||
|
|
||||
= note: expected enum `std::result::Result<bool, std::string::String>`
|
||||
found type `()`
|
||||
= note: expected enum `std::result::Result<bool, std::string::String>`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ let x: i32 = \"I am not a number!\";
|
|||
// type `i32` assigned to variable `x`
|
||||
```
|
||||
"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":801,"byte_end":809,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected struct `std::string::String`, found ()","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `std::string::String`
|
||||
found type `()`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:25:22: error[E0308]: mismatched types
|
||||
found unit type `()`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:25:22: error[E0308]: mismatched types
|
||||
"}
|
||||
{"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors
|
||||
"}
|
||||
|
|
|
@ -76,7 +76,7 @@ let x: i32 = \"I am not a number!\";
|
|||
// type `i32` assigned to variable `x`
|
||||
```
|
||||
"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":801,"byte_end":809,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected struct `std::string::String`, found ()","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `std::string::String`
|
||||
found type `()`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:25:22: error[E0308]: mismatched types
|
||||
found unit type `()`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:25:22: error[E0308]: mismatched types
|
||||
"}
|
||||
{"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors
|
||||
"}
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | fn main() { println!("{}", force(|| {})); }
|
||||
| ^^ expected isize, found ()
|
||||
|
|
||||
= note: expected type `isize`
|
||||
found type `()`
|
||||
= note: expected type `isize`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ LL | fn f(a: isize) -> isize { if god_exists(a) { return 5; }; }
|
|||
| |
|
||||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected type `isize`
|
||||
found type `()`
|
||||
= note: expected type `isize`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ LL | |
|
|||
LL | | });
|
||||
| |_____^ expected bool, found ()
|
||||
|
|
||||
= note: expected type `bool`
|
||||
found type `()`
|
||||
= note: expected type `bool`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ LL | fn f() -> isize {
|
|||
| |
|
||||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected type `isize`
|
||||
found type `()`
|
||||
= note: expected type `isize`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } }
|
|||
LL | test!();
|
||||
| -------- in this macro invocation
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/liveness-return-last-stmt-semi.rs:7:19
|
||||
|
@ -21,8 +21,8 @@ LL | fn no_return() -> i32 {}
|
|||
| |
|
||||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/liveness-return-last-stmt-semi.rs:9:19
|
||||
|
@ -34,8 +34,8 @@ LL | fn bar(x: u32) -> u32 {
|
|||
LL | x * 2;
|
||||
| - help: consider removing this semicolon
|
||||
|
|
||||
= note: expected type `u32`
|
||||
found type `()`
|
||||
= note: expected type `u32`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/liveness-return-last-stmt-semi.rs:13:19
|
||||
|
@ -45,8 +45,8 @@ LL | fn baz(x: u64) -> u32 {
|
|||
| |
|
||||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected type `u32`
|
||||
found type `()`
|
||||
= note: expected type `u32`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
@ -100,8 +100,8 @@ error[E0308]: mismatched types
|
|||
LL | let val: ! = loop { break break; };
|
||||
| ^^^^^ expected !, found ()
|
||||
|
|
||||
= note: expected type `!`
|
||||
found type `()`
|
||||
= note: expected type `!`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/loop-break-value.rs:11:19
|
||||
|
@ -136,8 +136,8 @@ error[E0308]: mismatched types
|
|||
LL | break 'c 123;
|
||||
| ^^^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/loop-break-value.rs:80:15
|
||||
|
@ -145,8 +145,8 @@ error[E0308]: mismatched types
|
|||
LL | break (break, break);
|
||||
| ^^^^^^^^^^^^^^ expected (), found tuple
|
||||
|
|
||||
= note: expected type `()`
|
||||
found tuple `(!, !)`
|
||||
= note: expected unit type `()`
|
||||
found tuple `(!, !)`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/loop-break-value.rs:85:15
|
||||
|
@ -154,8 +154,8 @@ error[E0308]: mismatched types
|
|||
LL | break 2;
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/loop-break-value.rs:90:9
|
||||
|
@ -166,8 +166,8 @@ LL | break;
|
|||
| expected integer, found ()
|
||||
| help: give it a value of the expected type: `break value`
|
||||
|
|
||||
= note: expected type `{integer}`
|
||||
found type `()`
|
||||
= note: expected type `{integer}`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 16 previous errors
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ LL | let _: i32 = loop { break };
|
|||
| expected i32, found ()
|
||||
| help: give it a value of the expected type: `break 42`
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/loop-labeled-break-value.rs:6:37
|
||||
|
@ -19,8 +19,8 @@ LL | let _: i32 = 'inner: loop { break 'inner };
|
|||
| expected i32, found ()
|
||||
| help: give it a value of the expected type: `break 'inner 42`
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/loop-labeled-break-value.rs:9:45
|
||||
|
@ -31,8 +31,8 @@ LL | let _: i32 = 'inner2: loop { loop { break 'inner2 } };
|
|||
| expected i32, found ()
|
||||
| help: give it a value of the expected type: `break 'inner2 42`
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ LL | let x: i32 = loop { break };
|
|||
| expected i32, found ()
|
||||
| help: give it a value of the expected type: `break 42`
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found type `()`
|
||||
= note: expected type `i32`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -62,8 +62,8 @@ LL | |
|
|||
LL | | };
|
||||
| |_____- `match` arms have incompatible types
|
||||
|
|
||||
= note: expected type `u32`
|
||||
found type `()`
|
||||
= note: expected type `u32`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | let _seetype: () = z;
|
||||
| ^ expected (), found u32
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `u32`
|
||||
= note: expected unit type `()`
|
||||
found type `u32`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:102:24
|
||||
|
@ -13,8 +13,8 @@ error[E0308]: mismatched types
|
|||
LL | let _seetype: () = z;
|
||||
| ^ expected (), found u64
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `u64`
|
||||
= note: expected unit type `()`
|
||||
found type `u64`
|
||||
|
||||
error[E0034]: multiple applicable items in scope
|
||||
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:120:15
|
||||
|
@ -47,8 +47,8 @@ error[E0308]: mismatched types
|
|||
LL | let _seetype: () = z;
|
||||
| ^ expected (), found u8
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `u8`
|
||||
= note: expected unit type `()`
|
||||
found type `u8`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:155:24
|
||||
|
@ -56,8 +56,8 @@ error[E0308]: mismatched types
|
|||
LL | let _seetype: () = z;
|
||||
| ^ expected (), found u32
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `u32`
|
||||
= note: expected unit type `()`
|
||||
found type `u32`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:172:24
|
||||
|
@ -65,8 +65,8 @@ error[E0308]: mismatched types
|
|||
LL | let _seetype: () = z;
|
||||
| ^ expected (), found u32
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `u32`
|
||||
= note: expected unit type `()`
|
||||
found type `u32`
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | let x: () = 0;
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | x
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ LL | fn function(t: &mut dyn Trait) {
|
|||
LL | t as *mut dyn Trait
|
||||
| ^^^^^^^^^^^^^^^^^^^ expected (), found *-ptr
|
||||
|
|
||||
= note: expected type `()`
|
||||
found raw pointer `*mut dyn Trait`
|
||||
= note: expected unit type `()`
|
||||
found raw pointer `*mut dyn Trait`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ LL | let x: u32 = (
|
|||
LL | | );
|
||||
| |_____^ expected u32, found ()
|
||||
|
|
||||
= note: expected type `u32`
|
||||
found type `()`
|
||||
= note: expected type `u32`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ LL | fn f() -> isize { }
|
|||
| |
|
||||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected type `isize`
|
||||
found type `()`
|
||||
= note: expected type `isize`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ error[E0308]: mismatched types
|
|||
LL | let () = 0;
|
||||
| ^^ expected integer, found ()
|
||||
|
|
||||
= note: expected type `{integer}`
|
||||
found type `()`
|
||||
= note: expected type `{integer}`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | fn main() { let i: isize; i = f(); }
|
||||
| ^^^ expected isize, found ()
|
||||
|
|
||||
= note: expected type `isize`
|
||||
found type `()`
|
||||
= note: expected type `isize`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ error[E0308]: mismatched types
|
|||
LL | {2} + {2}
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/expr-as-stmt.rs:12:6
|
||||
|
@ -58,8 +58,8 @@ error[E0308]: mismatched types
|
|||
LL | {2} + 2
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/expr-as-stmt.rs:18:7
|
||||
|
@ -67,8 +67,8 @@ error[E0308]: mismatched types
|
|||
LL | { 42 } + foo;
|
||||
| ^^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/expr-as-stmt.rs:24:7
|
||||
|
@ -76,8 +76,8 @@ error[E0308]: mismatched types
|
|||
LL | { 3 } * 3
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error[E0614]: type `{integer}` cannot be dereferenced
|
||||
--> $DIR/expr-as-stmt.rs:24:11
|
||||
|
|
|
@ -12,8 +12,8 @@ LL | fn f(*, a: u8) -> u8 {}
|
|||
| |
|
||||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected type `u8`
|
||||
found type `()`
|
||||
= note: expected type `u8`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ LL | fn f() -> isize { fn f() -> isize {} pub f<
|
|||
| |
|
||||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected type `isize`
|
||||
found type `()`
|
||||
= note: expected type `isize`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@ LL | fn v() -> isize {
|
|||
| |
|
||||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected type `isize`
|
||||
found type `()`
|
||||
= note: expected type `isize`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ error[E0308]: mismatched types
|
|||
LL | const RECOVERY_WITNESS: () = 0;
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ error[E0308]: mismatched types
|
|||
LL | const RECOVERY_WITNESS: () = 0;
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ error[E0308]: mismatched types
|
|||
LL | const RECOVERY_WITNESS: () = 0;
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ error[E0308]: mismatched types
|
|||
LL | const RECOVERY_WITNESS: () = 0;
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ error[E0308]: mismatched types
|
|||
LL | const RECOVERY_WITNESS: () = 0;
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ error[E0308]: mismatched types
|
|||
LL | let x: usize = ();
|
||||
| ^^ expected usize, found ()
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found type `()`
|
||||
= note: expected type `usize`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ error[E0308]: mismatched types
|
|||
LL | let _: usize = ()
|
||||
| ^^ expected usize, found ()
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found type `()`
|
||||
= note: expected type `usize`
|
||||
found unit type `()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/recover-missing-semi.rs:9:20
|
||||
|
@ -31,8 +31,8 @@ error[E0308]: mismatched types
|
|||
LL | let _: usize = ()
|
||||
| ^^ expected usize, found ()
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found type `()`
|
||||
= note: expected type `usize`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ error[E0308]: mismatched types
|
|||
LL | (..) => {}
|
||||
| ^^^^ expected u8, found ()
|
||||
|
|
||||
= note: expected type `u8`
|
||||
found type `()`
|
||||
= note: expected type `u8`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ LL | std::cell::Cell::new(0)
|
|||
| |
|
||||
| expected (), found struct `std::cell::Cell`
|
||||
|
|
||||
= note: expected type `()`
|
||||
found struct `std::cell::Cell<{integer}>`
|
||||
= note: expected unit type `()`
|
||||
found struct `std::cell::Cell<{integer}>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ LL | extern "C" fn baz() {
|
|||
LL | 0
|
||||
| ^ expected (), found integer
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
= note: expected unit type `()`
|
||||
found type `{integer}`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/span-preservation.rs:49:5
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | let _: fn(&mut &isize, &mut &isize) = a;
|
||||
| ^ expected concrete lifetime, found bound lifetime parameter
|
||||
|
|
||||
= note: expected type `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)`
|
||||
found type `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}`
|
||||
= note: expected fn pointer `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)`
|
||||
found fn item `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | let _: fn(&mut &isize, &mut &isize, &mut &isize) = a;
|
||||
| ^ expected concrete lifetime, found bound lifetime parameter
|
||||
|
|
||||
= note: expected type `for<'r, 's, 't0, 't1, 't2, 't3> fn(&'r mut &'s isize, &'t0 mut &'t1 isize, &'t2 mut &'t3 isize)`
|
||||
found type `for<'r, 's, 't0> fn(&'r mut &isize, &'s mut &isize, &'t0 mut &isize) {a::<'_, '_, '_>}`
|
||||
= note: expected fn pointer `for<'r, 's, 't0, 't1, 't2, 't3> fn(&'r mut &'s isize, &'t0 mut &'t1 isize, &'t2 mut &'t3 isize)`
|
||||
found fn item `for<'r, 's, 't0> fn(&'r mut &isize, &'s mut &isize, &'t0 mut &isize) {a::<'_, '_, '_>}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | let _: fn(&mut &isize, &mut &isize) = a;
|
||||
| ^ expected concrete lifetime, found bound lifetime parameter
|
||||
|
|
||||
= note: expected type `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)`
|
||||
found type `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}`
|
||||
= note: expected fn pointer `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)`
|
||||
found fn item `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue