Skip to content

Commit da17a53

Browse files
committed
it's not a borrow checker limitation :<
1 parent 6b2916a commit da17a53

19 files changed

+24
-24
lines changed

compiler/rustc_borrowck/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ borrowck_lifetime_constraints_error =
9090
lifetime may not live long enough
9191
9292
borrowck_limitations_implies_static =
93-
due to current limitations in the borrow checker, this implies a `'static` lifetime
93+
due to a current limitation of the type system, this implies a `'static` lifetime
9494
9595
borrowck_move_closure_suggestion =
9696
consider adding 'move' keyword before the nested closure

tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | print_items::<WindowsMut<'_>>(windows);
99
LL | }
1010
| - temporary value is freed at the end of this statement
1111
|
12-
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
12+
note: due to a current limitation of the type system, this implies a `'static` lifetime
1313
--> $DIR/hrtb-implied-1.rs:26:5
1414
|
1515
LL | for<'a> I::Item<'a>: Debug,

tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ LL | let _next = iter2.next();
1515
= note: requirement occurs because of a mutable reference to `Eat<&mut I, F>`
1616
= note: mutable references are invariant over their type parameter
1717
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
18-
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
18+
note: due to a current limitation of the type system, this implies a `'static` lifetime
1919
--> $DIR/hrtb-implied-2.rs:31:8
2020
|
2121
LL | F: FnMut(I::Item<'_>),

tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | trivial_bound(iter);
1111
| `iter` escapes the function body here
1212
| argument requires that `'1` must outlive `'static`
1313
|
14-
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
14+
note: due to a current limitation of the type system, this implies a `'static` lifetime
1515
--> $DIR/hrtb-implied-3.rs:14:5
1616
|
1717
LL | for<'a> I::Item<'a>: Sized,

tests/ui/generic-associated-types/collectivity-regression.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | | let _x = x;
77
LL | | };
88
| |_____^
99
|
10-
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
10+
note: due to a current limitation of the type system, this implies a `'static` lifetime
1111
--> $DIR/collectivity-regression.rs:11:16
1212
|
1313
LL | for<'a> T: Get<Value<'a> = ()>,

tests/ui/generic-associated-types/extended/lending_iterator.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ error: `Self` does not live long enough
1313
LL | <B as FromLendingIterator<A>>::from_iter(self)
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1515
|
16-
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
16+
note: due to a current limitation of the type system, this implies a `'static` lifetime
1717
--> $DIR/lending_iterator.rs:4:21
1818
|
1919
LL | fn from_iter<T: for<'x> LendingIterator<Item<'x> = A>>(iter: T) -> Self;

tests/ui/higher-ranked/trait-bounds/hrtb-just-for-static.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ LL | fn give_some<'a>() {
1515
LL | want_hrtb::<&'a u32>()
1616
| ^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
1717
|
18-
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
18+
note: due to a current limitation of the type system, this implies a `'static` lifetime
1919
--> $DIR/hrtb-just-for-static.rs:9:15
2020
|
2121
LL | where T : for<'a> Foo<&'a isize>

tests/ui/higher-ranked/trait-bounds/hrtb-perfect-forwarding.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ LL | fn foo_hrtb_bar_not<'b, T>(mut t: T)
4747
LL | foo_hrtb_bar_not(&mut t);
4848
| ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'static`
4949
|
50-
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
50+
note: due to a current limitation of the type system, this implies a `'static` lifetime
5151
--> $DIR/hrtb-perfect-forwarding.rs:37:8
5252
|
5353
LL | T: for<'a> Foo<&'a isize> + Bar<&'b isize>,

tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ LL | fn test_lifetime<'lt, T: Trait>(_: Foo<&'lt u8>) {}
3131
| | lifetime `'lt` defined here
3232
| requires that `'lt` must outlive `'static`
3333
|
34-
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
34+
note: due to a current limitation of the type system, this implies a `'static` lifetime
3535
--> $DIR/normalization-placeholder-leak.rs:19:5
3636
|
3737
LL | for<'x> T::Ty<'x>: Sized;
@@ -46,7 +46,7 @@ LL | fn test_alias<'lt, T: AnotherTrait>(_: Foo<T::Ty2::<'lt>>) {}
4646
| | lifetime `'lt` defined here
4747
| requires that `'lt` must outlive `'static`
4848
|
49-
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
49+
note: due to a current limitation of the type system, this implies a `'static` lifetime
5050
--> $DIR/normalization-placeholder-leak.rs:19:5
5151
|
5252
LL | for<'x> T::Ty<'x>: Sized;

tests/ui/issues/issue-26217.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | fn bar<'a>() {
66
LL | foo::<&'a i32>();
77
| ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
88
|
9-
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
9+
note: due to a current limitation of the type system, this implies a `'static` lifetime
1010
--> $DIR/issue-26217.rs:1:19
1111
|
1212
LL | fn foo<T>() where for<'a> T: 'a {}

0 commit comments

Comments
 (0)