Commit Graph

7 Commits

Author SHA1 Message Date
Chris Krycho
d4275e08e7 Update tests for new TRPL chapter order 2024-11-23 08:57:25 -07:00
Esteban Küber
7f5548fa8b On function and method calls in patterns, link to the book
```
error: expected a pattern, found an expression
 --> f889.rs:3:13
  |
3 |     let (x, y.drop()) = (1, 2); //~ ERROR
  |             ^^^^^^^^ not a pattern
  |
  = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch18-00-patterns.html>

error[E0532]: expected a pattern, found a function call
 --> f889.rs:2:13
  |
2 |     let (x, drop(y)) = (1, 2); //~ ERROR
  |             ^^^^ not a tuple struct or tuple variant
  |
  = note: function calls are not allowed in patterns: <https://doc.rust-lang.org/book/ch18-00-patterns.html>
```

Fix #97200.
2024-10-06 01:44:59 +00:00
Oli Scherer
a183989e88 Only check locally for reported errors 2024-06-18 15:43:27 +00:00
Nilstrieb
7b1527ff5f hir pretty: fix block indent 2024-05-20 20:30:44 +02:00
Michael Goulet
619e044178 Fix pretty hir for anon consts in diagnostics 2024-04-15 18:48:12 -04:00
surechen
1012218ba8 t plit astconv's error report code in check functions to mod errors.
Move some error report codes to mod `astconv/errors.rs`
2024-04-02 20:10:35 +08:00
Esteban Küber
d54e9833e3 Do not attempt to write ty::Err on binding that isn't from current HIR Owner
Fix #123009.
2024-03-29 19:05:54 +00:00