Commit Graph

23 Commits

Author SHA1 Message Date
Michael Goulet
d7113948d3
Rollup merge of #106524 - compiler-errors:constructor-note, r=cjgillot
Label `struct/enum constructor` instead of `fn item`, mention that it should be called on type mismatch

Fixes #106516
2023-01-11 22:25:49 -08:00
Michael Goulet
54f6fea818
Rollup merge of #106360 - estebank:remove-borrow-suggestion, r=compiler-errors
Tweak E0277 `&`-removal suggestions

Fix #64068, fix #84837.
2023-01-11 22:25:49 -08:00
Michael Goulet
83d3b76ac2
Rollup merge of #106097 - mejrs:mir_build2, r=oli-obk
Migrate mir_build diagnostics 2 of 3

The first three commits are fairly boring, however I've made some changes to the output of the match checking diagnostics.
2023-01-11 22:25:47 -08:00
Michael Goulet
2e17a5d406
Rollup merge of #103800 - danielhenrymantilla:stabilize-pin-macro, r=dtolnay
Stabilize `::{core,std}::pin::pin!`

As discussed [over here](https://github.com/rust-lang/rust/issues/93178#issuecomment-1295843548), it looks like a decent time to stabilize the `pin!` macro.

### Public API

```rust
// in module `core::pin`

/// API: `fn pin<T>($value: T) -> Pin<&'local mut T>`
pub macro pin($value:expr $(,)?) {
    …
}
```

  - Tracking issue: #93178

(now all this needs is an FCP by the proper team?)
2023-01-11 22:25:47 -08:00
bors
d4203eda5f Auto merge of #106537 - fmease:recover-where-clause-before-tuple-struct-body, r=estebank
Recover from where clauses placed before tuple struct bodies

Open to any suggestions regarding the phrasing of the diagnostic.

Fixes #100790.
`@rustbot` label A-diagnostics
r? diagnostics
2023-01-12 02:16:16 +00:00
mejrs
372ac9c1a2
Translate Overlap eagerly 2023-01-11 14:40:13 -08:00
mejrs
8476c517c0
Don't recommend if let if let else works 2023-01-11 14:40:07 -08:00
mejrs
31c20210b9
Migrate pattern matching 2023-01-11 14:40:02 -08:00
mejrs
5d2b9a9ed0
Migrate deconstruct_pat.rs 2023-01-11 14:39:49 -08:00
Daniel Henry-Mantilla
48b7e2a5b9
Stabilize ::{core,std}::pin::pin! 2023-01-11 14:09:14 -08:00
Esteban Küber
8b8cce16bf Use the root trait predicate to determine whether to remove references
Fix #84837.
2023-01-11 21:39:07 +00:00
Esteban Küber
ce83be4af8 Account for type params 2023-01-11 21:38:56 +00:00
Esteban Küber
2024aa48b4 Make &-removal suggestion verbose 2023-01-11 21:38:54 +00:00
Matthias Krüger
90f9c681d4
Rollup merge of #106703 - compiler-errors:impl-derived-span, r=estebank
Note predicate span on `ImplDerivedObligation`

Seems obvious to point out the where-clause that introduces the `ImplDerivedObligation` :)

r? `@estebank`
2023-01-11 21:08:08 +01:00
Matthias Krüger
88765b0f59
Rollup merge of #106622 - estebank:issue-68972, r=davidtwco
Detect out of bounds range pattern value

Fix #68972.
2023-01-11 21:08:07 +01:00
Michael Goulet
d375440dab label where constructor is defined and note that it should be called 2023-01-11 19:53:15 +00:00
Michael Goulet
ede5c31af4 Be more specific about constructor FnDefs in type mismatch 2023-01-11 19:53:14 +00:00
Michael Goulet
9a39d7e441 Note predicate span on ImplDerivedObligation 2023-01-11 19:46:45 +00:00
León Orell Valerian Liehr
70ddde76df
parser: recover from where clauses placed before tuple struct bodies 2023-01-11 17:54:48 +01:00
Esteban Küber
5311938531 Detect struct literal needing parentheses
Fix #82051.
2023-01-11 16:53:21 +00:00
Esteban Küber
52d534ef63 Detect out of bounds range pattern value
Fix #68972.
2023-01-11 16:50:55 +00:00
Albert Larsan
40ba0e84d5
Change src/test to tests in source files, fix tidy and tests 2023-01-11 09:32:13 +00:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00