Auto merge of #122824 - oli-obk:no_ord_def_id2, r=estebank,michaelwoerister
Stop sorting via `DefId`s in region resolution hopefully maintains the perf improvement from https://github.com/rust-lang/rust/pull/118824 works towards https://github.com/rust-lang/rust/issues/90317
This commit is contained in:
commit
eb80be223f
5 changed files with 56 additions and 53 deletions
|
|
@ -1,22 +1,3 @@
|
|||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-27942.rs:5:25
|
||||
|
|
||||
LL | fn select(&self) -> BufferViewHandle<R>;
|
||||
| ^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
||||
|
|
||||
= note: expected trait `Resources<'_>`
|
||||
found trait `Resources<'a>`
|
||||
note: the anonymous lifetime defined here...
|
||||
--> $DIR/issue-27942.rs:5:15
|
||||
|
|
||||
LL | fn select(&self) -> BufferViewHandle<R>;
|
||||
| ^^^^^
|
||||
note: ...does not necessarily outlive the lifetime `'a` as defined here
|
||||
--> $DIR/issue-27942.rs:3:18
|
||||
|
|
||||
LL | pub trait Buffer<'a, R: Resources<'a>> {
|
||||
| ^^
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-27942.rs:5:25
|
||||
|
|
||||
|
|
@ -36,6 +17,25 @@ note: ...does not necessarily outlive the anonymous lifetime defined here
|
|||
LL | fn select(&self) -> BufferViewHandle<R>;
|
||||
| ^^^^^
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-27942.rs:5:25
|
||||
|
|
||||
LL | fn select(&self) -> BufferViewHandle<R>;
|
||||
| ^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
||||
|
|
||||
= note: expected trait `Resources<'_>`
|
||||
found trait `Resources<'a>`
|
||||
note: the anonymous lifetime defined here...
|
||||
--> $DIR/issue-27942.rs:5:15
|
||||
|
|
||||
LL | fn select(&self) -> BufferViewHandle<R>;
|
||||
| ^^^^^
|
||||
note: ...does not necessarily outlive the lifetime `'a` as defined here
|
||||
--> $DIR/issue-27942.rs:3:18
|
||||
|
|
||||
LL | pub trait Buffer<'a, R: Resources<'a>> {
|
||||
| ^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` d
|
|||
LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
note: first, the lifetime cannot outlive the lifetime `'a` as defined here...
|
||||
--> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:6
|
||||
|
|
||||
LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
|
||||
| ^^
|
||||
note: ...but the lifetime must also be valid for the lifetime `'b` as defined here...
|
||||
note: first, the lifetime cannot outlive the lifetime `'b` as defined here...
|
||||
--> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:9
|
||||
|
|
||||
LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
|
||||
| ^^
|
||||
note: ...but the lifetime must also be valid for the lifetime `'a` as defined here...
|
||||
--> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:6
|
||||
|
|
||||
LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
|
||||
| ^^
|
||||
note: ...so that the types are compatible
|
||||
--> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:28
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,22 +1,3 @@
|
|||
error[E0308]: method not compatible with trait
|
||||
--> $DIR/matching-lifetimes.rs:14:5
|
||||
|
|
||||
LL | fn foo(x: Foo<'b,'a>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
||||
|
|
||||
= note: expected signature `fn(Foo<'a, 'b>)`
|
||||
found signature `fn(Foo<'b, 'a>)`
|
||||
note: the lifetime `'b` as defined here...
|
||||
--> $DIR/matching-lifetimes.rs:13:9
|
||||
|
|
||||
LL | impl<'a,'b> Tr for Foo<'a,'b> {
|
||||
| ^^
|
||||
note: ...does not necessarily outlive the lifetime `'a` as defined here
|
||||
--> $DIR/matching-lifetimes.rs:13:6
|
||||
|
|
||||
LL | impl<'a,'b> Tr for Foo<'a,'b> {
|
||||
| ^^
|
||||
|
||||
error[E0308]: method not compatible with trait
|
||||
--> $DIR/matching-lifetimes.rs:14:5
|
||||
|
|
||||
|
|
@ -36,6 +17,25 @@ note: ...does not necessarily outlive the lifetime `'b` as defined here
|
|||
LL | impl<'a,'b> Tr for Foo<'a,'b> {
|
||||
| ^^
|
||||
|
||||
error[E0308]: method not compatible with trait
|
||||
--> $DIR/matching-lifetimes.rs:14:5
|
||||
|
|
||||
LL | fn foo(x: Foo<'b,'a>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
||||
|
|
||||
= note: expected signature `fn(Foo<'a, 'b>)`
|
||||
found signature `fn(Foo<'b, 'a>)`
|
||||
note: the lifetime `'b` as defined here...
|
||||
--> $DIR/matching-lifetimes.rs:13:9
|
||||
|
|
||||
LL | impl<'a,'b> Tr for Foo<'a,'b> {
|
||||
| ^^
|
||||
note: ...does not necessarily outlive the lifetime `'a` as defined here
|
||||
--> $DIR/matching-lifetimes.rs:13:6
|
||||
|
|
||||
LL | impl<'a,'b> Tr for Foo<'a,'b> {
|
||||
| ^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue