Don't forget that the lifetime on hir types is 'tcx#120100
Don't forget that the lifetime on hir types is 'tcx#120100bors merged 1 commit intorust-lang:masterfrom
'tcx#120100Conversation
|
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
| args.args = &args.args[..args.args.len() - 1]; | ||
| path_segments[last_segment].args = Some(&args); | ||
| path_segments[last_segment].args = Some(tcx.hir_arena.alloc(args)); | ||
| let path = hir::Path { | ||
| span: ast_trait_ref.path.span, | ||
| res: ast_trait_ref.path.res, | ||
| segments: &path_segments, | ||
| segments: tcx.hir_arena.alloc_slice(&path_segments), | ||
| }; | ||
| let trait_ref = hir::TraitRef { path: &path, hir_ref_id: ast_trait_ref.hir_ref_id }; | ||
| icx.astconv().instantiate_mono_trait_ref(&trait_ref, selfty) | ||
| let trait_ref = tcx.hir_arena.alloc(hir::TraitRef { path: tcx.hir_arena.alloc(path), hir_ref_id: ast_trait_ref.hir_ref_id }); | ||
| icx.astconv().instantiate_mono_trait_ref(trait_ref, selfty) |
There was a problem hiding this comment.
This is an error code path, so allocating random things is not an issue
Don't forget that the lifetime on hir types is `'tcx` This PR just tracks the `'tcx` lifetime to wherever the original objects actually have that lifetime. This code is needed for rust-lang#107606 (now rust-lang#120131) so that `ast_ty_to_ty` can invoke `lit_to_const` on an argument passed to it. Currently the argument is `&hir::Ty<'_>`, but after this PR it is `&'tcx hir::Ty<'tcx>`.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
💔 Test failed - checks-actions |
|
@bors retry runner shutdown |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (867d39c): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 661.791s -> 662.887s (0.17%) |
Don't forget that the lifetime on hir types is `'tcx` This PR just tracks the `'tcx` lifetime to wherever the original objects actually have that lifetime. This code is needed for rust-lang#107606 (now rust-lang#120131) so that `ast_ty_to_ty` can invoke `lit_to_const` on an argument passed to it. Currently the argument is `&hir::Ty<'_>`, but after this PR it is `&'tcx hir::Ty<'tcx>`.
This PR just tracks the
'tcxlifetime to wherever the original objects actually have that lifetime. This code is needed for #107606 (now #120131) so thatast_ty_to_tycan invokelit_to_conston an argument passed to it. Currently the argument is&hir::Ty<'_>, but after this PR it is&'tcx hir::Ty<'tcx>.