rust/compiler/rustc_typeck
Dylan DPC 2c14bc3b55
Rollup merge of #99741 - compiler-errors:copy-impl-impl-generics, r=fee1-dead
Use `impl`'s generics when suggesting fix on bad `impl Copy`

See the UI test for a more complicated example, but we weren't correctly suggesting to add bounds given a manual `impl` whose generics didn't match the struct generics.

```rust
#[derive(Clone)]
struct Wrapper<T>(T);

impl<S> Copy for Wrapper<S> {}
```

Coincidentally this fix didn't cause any regressions for `derive(Copy)` impls, I think because those use the same spans in the impl generics as the struct generics, so the machinery still applies the same change.
2022-07-31 17:36:41 +05:30
..
src Rollup merge of #99741 - compiler-errors:copy-impl-impl-generics, r=fee1-dead 2022-07-31 17:36:41 +05:30
Cargo.toml Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
README.md

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.