Commit Graph

11 Commits

Author SHA1 Message Date
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