Rollup merge of #138357 - lcnr:goodbye-TypeVerifier-rarw, r=compiler-errors
merge `TypeChecker` and `TypeVerifier` Stacked on top of #138354. Best reviewed commit by commit. r? `@compiler-errors`
This commit is contained in:
commit
74c3794ece
3 changed files with 697 additions and 806 deletions
File diff suppressed because it is too large
Load diff
|
@ -58,18 +58,18 @@ error[E0507]: cannot move out of a shared reference
|
|||
LL | static STATIC_BAR: str = *"bar";
|
||||
| ^^^^^^ move occurs because value has type `str`, which does not implement the `Copy` trait
|
||||
|
||||
error[E0161]: cannot move a value of type `str`
|
||||
--> $DIR/const-unsized.rs:20:48
|
||||
|
|
||||
LL | println!("{:?} {:?} {:?} {:?}", &CONST_0, &CONST_FOO, &STATIC_1, &STATIC_BAR);
|
||||
| ^^^^^^^^^ the size of `str` cannot be statically determined
|
||||
|
||||
error[E0161]: cannot move a value of type `dyn Debug + Sync`
|
||||
--> $DIR/const-unsized.rs:20:38
|
||||
|
|
||||
LL | println!("{:?} {:?} {:?} {:?}", &CONST_0, &CONST_FOO, &STATIC_1, &STATIC_BAR);
|
||||
| ^^^^^^^ the size of `dyn Debug + Sync` cannot be statically determined
|
||||
|
||||
error[E0161]: cannot move a value of type `str`
|
||||
--> $DIR/const-unsized.rs:20:48
|
||||
|
|
||||
LL | println!("{:?} {:?} {:?} {:?}", &CONST_0, &CONST_FOO, &STATIC_1, &STATIC_BAR);
|
||||
| ^^^^^^^^^ the size of `str` cannot be statically determined
|
||||
|
||||
error: aborting due to 10 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0161, E0277, E0507.
|
||||
|
|
|
@ -7,12 +7,12 @@ LL | let _ = x as &dyn Bar<'static, 'a>; // Error
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ cast requires that `'a` must outlive `'static`
|
||||
|
||||
error: lifetime may not live long enough
|
||||
--> $DIR/type-checking-test-4.rs:22:18
|
||||
--> $DIR/type-checking-test-4.rs:22:13
|
||||
|
|
||||
LL | fn test_wrong2<'a>(x: &dyn Foo<'static>, y: &'a u32) {
|
||||
| -- lifetime `'a` defined here
|
||||
LL | let _ = x as &dyn Bar<'a, 'static>; // Error
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ cast requires that `'a` must outlive `'static`
|
||||
|
||||
error: lifetime may not live long enough
|
||||
--> $DIR/type-checking-test-4.rs:28:5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue