[rustdoc] Replace DocContext with TyCtxt wherever possible#154680
[rustdoc] Replace DocContext with TyCtxt wherever possible#154680rust-bors[bot] merged 15 commits intorust-lang:mainfrom
DocContext with TyCtxt wherever possible#154680Conversation
…_attrs` function
…y_macro_source` function
…_macro` function
…middle_region` function
…region_outlives_predicate` function
…proc_macro` function
…f_id_and_parts` function
…field_with_def_id` function
…bound_vars` function
This comment has been minimized.
This comment has been minimized.
bc45950 to
0b941ed
Compare
|
Just to be sure: @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
[rustdoc] Replace `DocContext` with `TyCtxt` wherever possible
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (80eb201): comparison URL. Overall result: ❌✅ regressions and improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -1.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.3%, secondary 0.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 488.823s -> 484.984s (-0.79%) |
|
Seems like perf results are just noise since no @bors r=Urgau rollup |
… r=Urgau [rustdoc] Replace `DocContext` with `TyCtxt` wherever possible In a lot of places, we pass down `DocContext` but actually only use its `tcx` field (`TyCtxt`). To make it more obvious what's actually being done, I replaced `DocContext` with `TyCtxt` (which implements `Copy`) in the function arguments. It created quite the cascade effect so I ended up with a lot more changes I expected. Because it's a lot of changes, I made small commits which are easy to go through, so I strongly recommend reviewing this PR one commit at a time. r? @Urgau
Rollup of 7 pull requests Successful merges: - #153105 (Compute the result of a projection type with region errors) - #153960 (Make `layout_of` cycles fatal errors) - #154666 (Remove `StableHashContext` impls) - #154669 (Introduce #[diagnostic::on_move] on `Arc`) - #154442 (Export `derive` at the crate root: `core::derive` and `std::derive`) - #154660 (Avoid creating async return opaques for foreign async fns) - #154680 ([rustdoc] Replace `DocContext` with `TyCtxt` wherever possible)
… r=Urgau [rustdoc] Replace `DocContext` with `TyCtxt` wherever possible In a lot of places, we pass down `DocContext` but actually only use its `tcx` field (`TyCtxt`). To make it more obvious what's actually being done, I replaced `DocContext` with `TyCtxt` (which implements `Copy`) in the function arguments. It created quite the cascade effect so I ended up with a lot more changes I expected. Because it's a lot of changes, I made small commits which are easy to go through, so I strongly recommend reviewing this PR one commit at a time. r? @Urgau
Rollup of 11 pull requests Successful merges: - #153105 (Compute the result of a projection type with region errors) - #153286 (various fixes for scalable vectors) - #153960 (Make `layout_of` cycles fatal errors) - #154527 (Emit pre-expansion feature gate warnings for negative impls and specialization) - #154666 (Remove `StableHashContext` impls) - #154669 (Introduce #[diagnostic::on_move] on `Arc`) - #154442 (Export `derive` at the crate root: `core::derive` and `std::derive`) - #154644 (rustdoc: seperate methods and associated functions in sidebar) - #154660 (Avoid creating async return opaques for foreign async fns) - #154671 (Add a test for a past ICE when calling a const fn of an unresolved type with the wrong number of args) - #154680 ([rustdoc] Replace `DocContext` with `TyCtxt` wherever possible)
… r=Urgau [rustdoc] Replace `DocContext` with `TyCtxt` wherever possible In a lot of places, we pass down `DocContext` but actually only use its `tcx` field (`TyCtxt`). To make it more obvious what's actually being done, I replaced `DocContext` with `TyCtxt` (which implements `Copy`) in the function arguments. It created quite the cascade effect so I ended up with a lot more changes I expected. Because it's a lot of changes, I made small commits which are easy to go through, so I strongly recommend reviewing this PR one commit at a time. r? @Urgau
Rollup of 11 pull requests Successful merges: - #153105 (Compute the result of a projection type with region errors) - #153960 (Make `layout_of` cycles fatal errors) - #154527 (Emit pre-expansion feature gate warnings for negative impls and specialization) - #154666 (Remove `StableHashContext` impls) - #154669 (Introduce #[diagnostic::on_move] on `Arc`) - #154213 (tidy-alphabetical: fix line number in error message) - #154442 (Export `derive` at the crate root: `core::derive` and `std::derive`) - #154644 (rustdoc: seperate methods and associated functions in sidebar) - #154660 (Avoid creating async return opaques for foreign async fns) - #154671 (Add a test for a past ICE when calling a const fn of an unresolved type with the wrong number of args) - #154680 ([rustdoc] Replace `DocContext` with `TyCtxt` wherever possible)
… r=Urgau [rustdoc] Replace `DocContext` with `TyCtxt` wherever possible In a lot of places, we pass down `DocContext` but actually only use its `tcx` field (`TyCtxt`). To make it more obvious what's actually being done, I replaced `DocContext` with `TyCtxt` (which implements `Copy`) in the function arguments. It created quite the cascade effect so I ended up with a lot more changes I expected. Because it's a lot of changes, I made small commits which are easy to go through, so I strongly recommend reviewing this PR one commit at a time. r? @Urgau
…uwer Rollup of 21 pull requests Successful merges: - #153105 (Compute the result of a projection type with region errors) - #153286 (various fixes for scalable vectors) - #153532 (Attributes containing rustc) - #153960 (Make `layout_of` cycles fatal errors) - #154527 (Emit pre-expansion feature gate warnings for negative impls and specialization) - #154666 (Remove `StableHashContext` impls) - #154669 (Introduce #[diagnostic::on_move] on `Arc`) - #154710 (opaque_generic_const_args -> generic_const_args) - #154712 (Revert "`-Znext-solver` Remove the forced ambiguity hack from search graph") - #154713 (Stop compiling when we get resolving crate failure) - #154213 (tidy-alphabetical: fix line number in error message) - #154425 (Migrate transmute tests) - #154442 (Export `derive` at the crate root: `core::derive` and `std::derive`) - #154469 (mGCA: Lower spans for literal const args) - #154578 (Rename `probe_ty_var` to `try_resolve_ty_var`) - #154615 (Moving issues) - #154644 (rustdoc: seperate methods and associated functions in sidebar) - #154660 (Avoid creating async return opaques for foreign async fns) - #154671 (Add a test for a past ICE when calling a const fn of an unresolved type with the wrong number of args) - #154680 ([rustdoc] Replace `DocContext` with `TyCtxt` wherever possible) - #154709 (Revert `Ty` type alias in `rustc_type_ir`)
… r=Urgau [rustdoc] Replace `DocContext` with `TyCtxt` wherever possible In a lot of places, we pass down `DocContext` but actually only use its `tcx` field (`TyCtxt`). To make it more obvious what's actually being done, I replaced `DocContext` with `TyCtxt` (which implements `Copy`) in the function arguments. It created quite the cascade effect so I ended up with a lot more changes I expected. Because it's a lot of changes, I made small commits which are easy to go through, so I strongly recommend reviewing this PR one commit at a time. r? @Urgau
…uwer Rollup of 21 pull requests Successful merges: - #153105 (Compute the result of a projection type with region errors) - #153286 (various fixes for scalable vectors) - #153532 (Attributes containing rustc) - #153960 (Make `layout_of` cycles fatal errors) - #154527 (Emit pre-expansion feature gate warnings for negative impls and specialization) - #154666 (Remove `StableHashContext` impls) - #154669 (Introduce #[diagnostic::on_move] on `Arc`) - #154710 (opaque_generic_const_args -> generic_const_args) - #154712 (Revert "`-Znext-solver` Remove the forced ambiguity hack from search graph") - #153614 (`FindParamInClause` handle edge-cases) - #154213 (tidy-alphabetical: fix line number in error message) - #154425 (Migrate transmute tests) - #154442 (Export `derive` at the crate root: `core::derive` and `std::derive`) - #154469 (mGCA: Lower spans for literal const args) - #154578 (Rename `probe_ty_var` to `try_resolve_ty_var`) - #154615 (Moving issues) - #154644 (rustdoc: seperate methods and associated functions in sidebar) - #154660 (Avoid creating async return opaques for foreign async fns) - #154671 (Add a test for a past ICE when calling a const fn of an unresolved type with the wrong number of args) - #154680 ([rustdoc] Replace `DocContext` with `TyCtxt` wherever possible) - #154709 (Revert `Ty` type alias in `rustc_type_ir`)
…uwer Rollup of 20 pull requests Successful merges: - #153105 (Compute the result of a projection type with region errors) - #153532 (Attributes containing rustc) - #153960 (Make `layout_of` cycles fatal errors) - #154527 (Emit pre-expansion feature gate warnings for negative impls and specialization) - #154666 (Remove `StableHashContext` impls) - #154669 (Introduce #[diagnostic::on_move] on `Arc`) - #154710 (opaque_generic_const_args -> generic_const_args) - #154712 (Revert "`-Znext-solver` Remove the forced ambiguity hack from search graph") - #153614 (`FindParamInClause` handle edge-cases) - #154213 (tidy-alphabetical: fix line number in error message) - #154425 (Migrate transmute tests) - #154442 (Export `derive` at the crate root: `core::derive` and `std::derive`) - #154469 (mGCA: Lower spans for literal const args) - #154578 (Rename `probe_ty_var` to `try_resolve_ty_var`) - #154615 (Moving issues) - #154644 (rustdoc: seperate methods and associated functions in sidebar) - #154660 (Avoid creating async return opaques for foreign async fns) - #154671 (Add a test for a past ICE when calling a const fn of an unresolved type with the wrong number of args) - #154680 ([rustdoc] Replace `DocContext` with `TyCtxt` wherever possible) - #154709 (Revert `Ty` type alias in `rustc_type_ir`)
Rollup merge of #154680 - GuillaumeGomez:doccontext-cleanup, r=Urgau [rustdoc] Replace `DocContext` with `TyCtxt` wherever possible In a lot of places, we pass down `DocContext` but actually only use its `tcx` field (`TyCtxt`). To make it more obvious what's actually being done, I replaced `DocContext` with `TyCtxt` (which implements `Copy`) in the function arguments. It created quite the cascade effect so I ended up with a lot more changes I expected. Because it's a lot of changes, I made small commits which are easy to go through, so I strongly recommend reviewing this PR one commit at a time. r? @Urgau
In a lot of places, we pass down
DocContextbut actually only use itstcxfield (TyCtxt). To make it more obvious what's actually being done, I replacedDocContextwithTyCtxt(which implementsCopy) in the function arguments. It created quite the cascade effect so I ended up with a lot more changes I expected.Because it's a lot of changes, I made small commits which are easy to go through, so I strongly recommend reviewing this PR one commit at a time.
r? @Urgau