about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/example/std_example.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-10-18 13:07:20 +1100
committerJosh Stone <jistone@redhat.com>2022-10-20 11:57:41 -0700
commit692bc5b3ca777363759b760f7c67084a719dc2b6 (patch)
tree5dd56eeefc2c985b151602c9fd78062f7657862a /compiler/rustc_codegen_gcc/example/std_example.rs
parent8f1050e0053abaf9c844cdb872eed73711b4c964 (diff)
downloadrust-692bc5b3ca777363759b760f7c67084a719dc2b6.tar.gz
rust-692bc5b3ca777363759b760f7c67084a719dc2b6.zip
Fix `TyKind::is_simple_path`.
PR #98758 introduced code to avoid redundant assertions in derived code
like this:
```
let _: ::core::clone::AssertParamIsClone<u32>;
let _: ::core::clone::AssertParamIsClone<u32>;
```
But the predicate `is_simple_path` introduced as part of this failed to
account for generic arguments. Therefore the deriving code erroneously
considers types like `Option<bool>` and `Option<f32>` to be the same.

This commit fixes `is_simple_path`.

Fixes #103157.

(cherry picked from commit 9a23f60f9c801dd0b4686cc75c6a9979bd8928fa)
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions