about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/Linker.cpp
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-07-31 17:36:41 +0530
committerGitHub <noreply@github.com>2022-07-31 17:36:41 +0530
commit2c14bc3b550b30353a1031334739bf903daa288e (patch)
tree049e0dd0d9cd50ebbe79cc331d1d897945886e8c /compiler/rustc_llvm/llvm-wrapper/Linker.cpp
parent403c1b3802b3e3fd6fe6fecf835dbefa07fed2d7 (diff)
parent1390220ff25d61a36795eacdab3ea104dac6d957 (diff)
downloadrust-2c14bc3b550b30353a1031334739bf903daa288e.tar.gz
rust-2c14bc3b550b30353a1031334739bf903daa288e.zip
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions