diff options
| author | Michael Goulet <michael@errs.io> | 2022-10-05 03:13:32 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-10-14 05:26:32 +0000 |
| commit | a010df9389b4b949da23740100d00658d6a02480 (patch) | |
| tree | a2454f1132af76fee782676bad5bfac141b45755 /compiler/rustc_middle/src | |
| parent | edabf59ca4646b3fc1a961c26431215001043f6a (diff) | |
| download | rust-a010df9389b4b949da23740100d00658d6a02480.tar.gz rust-a010df9389b4b949da23740100d00658d6a02480.zip | |
float and int vars are trivially copy
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 64636963313..cf420bafeb1 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -2205,7 +2205,10 @@ impl<'tcx> Ty<'tcx> { // These aren't even `Clone` ty::Str | ty::Slice(..) | ty::Foreign(..) | ty::Dynamic(..) => false, - ty::Int(..) | ty::Uint(..) | ty::Float(..) => true, + ty::Infer(ty::InferTy::FloatVar(_) | ty::InferTy::IntVar(_)) + | ty::Int(..) + | ty::Uint(..) + | ty::Float(..) => true, // The voldemort ZSTs are fine. ty::FnDef(..) => true, |
