diff options
| author | bors <bors@rust-lang.org> | 2025-06-01 10:59:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-01 10:59:38 +0000 |
| commit | 9b0268a43b0a5b58f50c96ded25364037c019a61 (patch) | |
| tree | 55b03e4ef3a2a5284a4dd3fd2f1d386c4871f3a8 /compiler/rustc_middle/src | |
| parent | ba55b7ce3cd931af7123e334647584f6fbdb3c20 (diff) | |
| parent | f1da2885578519b3f5ad1d584bcb9fb0a22e9403 (diff) | |
| download | rust-9b0268a43b0a5b58f50c96ded25364037c019a61.tar.gz rust-9b0268a43b0a5b58f50c96ded25364037c019a61.zip | |
Auto merge of #141731 - compiler-errors:tweak-fast-path-trait, r=lcnr
Tweak fast path trait handling (1.) Make it more sound by considering polarity (lol) (2.) Make it more general, by considering higher-ranked size/copy/clone (2.) Make it less observable, by only doing copy/clone fast path if there are no regions involved r? lcnr
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 77b9becba57..404674c359e 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -1882,10 +1882,8 @@ impl<'tcx> Ty<'tcx> { // Needs normalization or revealing to determine, so no is the safe answer. ty::Alias(..) => false, - ty::Param(..) | ty::Placeholder(..) | ty::Infer(..) | ty::Error(..) => false, - - ty::Bound(..) => { - bug!("`is_trivially_pure_clone_copy` applied to unexpected type: {:?}", self); + ty::Param(..) | ty::Placeholder(..) | ty::Bound(..) | ty::Infer(..) | ty::Error(..) => { + false } } } |
