```
Benchmark #1: ./raytracer_cg_clif_pre
Time (mean ± σ): 9.553 s ± 0.129 s [User: 9.543 s, System: 0.008 s]
Range (min … max): 9.438 s … 9.837 s 10 runs
Benchmark #2: ./raytracer_cg_clif_post
Time (mean ± σ): 9.463 s ± 0.055 s [User: 9.452 s, System: 0.008 s]
Range (min … max): 9.387 s … 9.518 s 10 runs
Summary
'./raytracer_cg_clif_post' ran
1.01 ± 0.01 times faster than './raytracer_cg_clif_pre'
```
The discussion seems to have resolved that this lint is a bit "noisy" in
that applying it in all places would result in a reduction in
readability.
A few of the trivial functions (like `Path::new`) are fine to leave
outside of closures.
The general rule seems to be that anything that is obviously an
allocation (`Box`, `Vec`, `vec![]`) should be in a closure, even if it
is a 0-sized allocation.
rustc_target: Further cleanup use of target options
Follow up to https://github.com/rust-lang/rust/pull/77729.
Implements items 2 and 4 from the list in https://github.com/rust-lang/rust/pull/77729#issue-500228243.
The first commit collapses uses of `target.options.foo` into `target.foo`.
The second commit renames some target options to avoid tautology:
`target.target_endian` -> `target.endian`
`target.target_c_int_width` -> `target.c_int_width`
`target.target_os` -> `target.os`
`target.target_env` -> `target.env`
`target.target_vendor` -> `target.vendor`
`target.target_family` -> `target.os_family`
`target.target_mcount` -> `target.mcount`
r? `@Mark-Simulacrum`
inliner: Use substs_for_mir_body
Changes from 68965 extended the kind of instances that are being
inlined. For some of those, the `instance_mir` returns a MIR body that
is already expressed in terms of the types found in substitution array,
and doesn't need further substitution.
Use `substs_for_mir_body` to take that into account.
Resolves#78529.
Resolves#78560.
with an eye on merging `TargetOptions` into `Target`.
`TargetOptions` as a separate structure is mostly an implementation detail of `Target` construction, all its fields logically belong to `Target` and available from `Target` through `Deref` impls.
Changes from 68965 extended the kind of instances that are being
inlined. For some of those, the `instance_mir` returns a MIR body that
is already expressed in terms of the types found in substitution array,
and doesn't need further substitution.
Use `substs_for_mir_body` to take that into account.
Previously it would error:
```
Finished dev [unoptimized + debuginfo] target(s) in 26.93s
mv target/debug/main raytracer_cg_llvm
mv: cannot stat 'target/debug/main': No such file or directory
```