Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxyUwU committed Apr 4, 2024
1 parent 2b67f01 commit 6ec1b32
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions tests/ui/proc-macro/bad-projection.rs
Expand Up @@ -15,4 +15,5 @@ pub fn uwu() -> <() as Project>::Assoc {}
//~^ ERROR the trait bound `(): Project` is not satisfied
//~| ERROR the trait bound `(): Project` is not satisfied
//~| ERROR the trait bound `(): Project` is not satisfied
//~| ERROR the trait bound `(): Project` is not satisfied
//~| ERROR function is expected to take 1 argument, but it takes 0 arguments
14 changes: 13 additions & 1 deletion tests/ui/proc-macro/bad-projection.stderr
Expand Up @@ -35,6 +35,18 @@ help: this trait has no implementations, consider adding one
LL | trait Project {
| ^^^^^^^^^^^^^

error[E0277]: the trait bound `(): Project` is not satisfied
--> $DIR/bad-projection.rs:14:1
|
LL | pub fn uwu() -> <() as Project>::Assoc {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Project` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/bad-projection.rs:9:1
|
LL | trait Project {
| ^^^^^^^^^^^^^

error[E0277]: the trait bound `(): Project` is not satisfied
--> $DIR/bad-projection.rs:14:40
|
Expand All @@ -47,7 +59,7 @@ help: this trait has no implementations, consider adding one
LL | trait Project {
| ^^^^^^^^^^^^^

error: aborting due to 4 previous errors
error: aborting due to 5 previous errors

Some errors have detailed explanations: E0277, E0593.
For more information about an error, try `rustc --explain E0277`.
2 changes: 1 addition & 1 deletion tests/ui/wf/wf-fn-def-check-sig-1.rs
Expand Up @@ -8,8 +8,8 @@ fn foo<'b, 'a>() -> PhantomData<&'b &'a ()> {

fn extend_lifetime<'a, 'b, T: ?Sized>(x: &'a T) -> &'b T {
let f = foo::<'b, 'a>;
//~^ ERROR lifetime may not live long enough
f.baz(x)
//~^ ERROR lifetime may not live long enough
}

trait Foo<'a, 'b, T: ?Sized> {
Expand Down
7 changes: 4 additions & 3 deletions tests/ui/wf/wf-fn-def-check-sig-1.stderr
@@ -1,14 +1,15 @@
error: lifetime may not live long enough
--> $DIR/wf-fn-def-check-sig-1.rs:10:13
--> $DIR/wf-fn-def-check-sig-1.rs:11:5
|
LL | fn extend_lifetime<'a, 'b, T: ?Sized>(x: &'a T) -> &'b T {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
LL | let f = foo::<'b, 'a>;
| ^^^^^^^^^^^^^ requires that `'a` must outlive `'b`
LL | f.baz(x)
| ^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
|
= help: consider adding the following bound: `'a: 'b`

error: aborting due to previous error
error: aborting due to 1 previous error

2 changes: 1 addition & 1 deletion tests/ui/wf/wf-fn-def-check-sig-2.stderr
Expand Up @@ -11,5 +11,5 @@ LL | f.baz(x)
|
= help: consider adding the following bound: `'a: 'b`

error: aborting due to previous error
error: aborting due to 1 previous error

0 comments on commit 6ec1b32

Please sign in to comment.