Less Instance::new_raw
by compiler-errors · Pull Request #140518 · rust-lang/rust (original) (raw)
[RUSTC-TIMING] portable_atomic test:false 0.369
error[E0424]: expected value, found module `self`
--> src/tools/clippy/clippy_lints/src/non_copy_const.rs:267:53
|
263 | fn is_value_unfrozen_poly(cx: &LateContext<'tcx>, body_id: BodyId, ty: Ty<'tcx>) -> bool {
| ---------------------- this function doesn't have a `self` parameter
...
267 | let instance = ty::Instance::expect_resolve(self.tcx,typing_env,def_id, args, DUMMY_SP);
| ^^^^ `self` value is a keyword only available in methods with a `self` parameter
|
help: add a `self` receiver parameter to make the associated `fn` a method
|
263 | fn is_value_unfrozen_poly(&self, cx: &LateContext<'tcx>, body_id: BodyId, ty: Ty<'tcx>) -> bool {
| ++++++
[RUSTC-TIMING] crossbeam_utils test:false 0.331
Checking bstr v1.12.0
[RUSTC-TIMING] bstr test:false 0.395