Commit Graph

16 Commits

Author SHA1 Message Date
Eric Holk
7b7992fbcf
Begin experimental support for pin reborrowing
This commit adds basic support for reborrowing `Pin` types in argument
position. At the moment it only supports reborrowing `Pin<&mut T>` as
`Pin<&mut T>` by inserting a call to `Pin::as_mut()`, and only in
argument position (not as the receiver in a method call).
2024-09-18 12:36:31 -07:00
Pavel Grigorenko
1481ab3f75 rustc_borrowck: make "implicit static" suff translatable 2024-08-10 14:32:55 +03:00
Pavel Grigorenko
1b6cc24c20 rustc_borrowck: make some suggestion about static lifetimes translatable 2024-08-10 14:32:55 +03:00
Pavel Grigorenko
446e03e3c9 rustc_borrowck: make suggestion to move closure translatable 2024-08-10 14:32:55 +03:00
Pavel Grigorenko
48413cf078 rustc_borrowck: make dereference suggestion translatable 2024-08-10 14:32:55 +03:00
Esteban Küber
4ca876b7a4 Better account for FnOnce in move errors
```
error[E0382]: use of moved value: `blk`
  --> $DIR/once-cant-call-twice-on-heap.rs:8:5
   |
LL | fn foo<F:FnOnce()>(blk: F) {
   |                    --- move occurs because `blk` has type `F`, which does not implement the `Copy` trait
LL |     blk();
   |     ----- `blk` moved due to this call
LL |     blk();
   |     ^^^ value used here after move
   |
note: `FnOnce` closures can only be called once
  --> $DIR/once-cant-call-twice-on-heap.rs:6:10
   |
LL | fn foo<F:FnOnce()>(blk: F) {
   |          ^^^^^^^^ `F` is made to be an `FnOnce` closure here
LL |     blk();
   |     ----- this value implements `FnOnce`, which causes it to be moved when called
```
2024-04-11 16:41:42 +00:00
Oli Scherer
be9317d1ec Prevent opaque types being instantiated twice with different regions within the same function 2024-03-18 10:26:10 +00:00
Esteban Küber
0953608deb Account for UnOps in borrowck message 2024-03-13 23:05:17 +00:00
Ralf Jung
396cf1e1f5 require simd_insert, simd_extract indices to be constants 2024-02-20 07:50:46 +01:00
Oli Scherer
e96ce20b34 s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
yukang
f9a9ff20a2 cleanup on messages 2023-09-12 07:27:17 +08:00
Oli Scherer
65f25fe194 Don't report any errors in lower_intrinsics. They should have been typecked before. 2023-09-06 09:38:15 +00:00
clubby789
f97fddab91 Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
Michael Goulet
6c9249f689 Don't call await a method 2023-04-27 17:18:12 +00:00
AndyJado
bdf0e74777 migrate ftl msg accroding to #103042 2023-04-13 09:43:46 +08:00
est31
7e2ecb3cd8 Simplify message paths
This makes it easier to open the messages file while developing on features.

The commit was the result of automatted changes:

for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done

for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done
2023-03-11 22:51:57 +01:00