about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-11-15Auto merge of #104428 - matthiaskrgr:rollup-jo3078i, r=matthiaskrgrbors-0/+109
Rollup of 13 pull requests Successful merges: - #103842 (Adding Fuchsia compiler testing script, docs) - #104354 (Remove leading newlines from `NonZero*` doc examples) - #104372 (Update compiler-builtins) - #104380 (rustdoc: remove unused CSS `code { opacity: 1 }`) - #104381 (Remove dead NoneError diagnostic handling) - #104383 (Remove unused symbols and diagnostic items) - #104391 (Deriving cleanups) - #104403 (Specify language of code comment to generate document) - #104404 (Fix missing minification for static files) - #104413 ([llvm-wrapper] adapt for LLVM API change) - #104415 (rustdoc: fix corner case in search keyboard commands) - #104422 (Fix suggest associated call syntax) - #104426 (Add test for #102154) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-15Rollup merge of #104426 - aDotInTheVoid:test-102154, r=compiler-errorsMatthias Krüger-0/+13
Add test for #102154 Closes #102154
2022-11-15Rollup merge of #104422 - ↵Matthias Krüger-0/+68
compiler-errors:fix-suggest_associated_call_syntax, r=BoxyUwU Fix suggest associated call syntax Fixes #104412
2022-11-14Add test for #102154Nixon Enraght-Moony-0/+13
2022-11-14rustdoc: fix corner case in search keyboard commandsMichael Howell-0/+28
2022-11-14Add regression testMichael Goulet-0/+19
2022-11-14Do autoderef to match impl against rcvrMichael Goulet-0/+49
2022-11-14Rollup merge of #104378 - compiler-errors:chalk-up, r=jackh726Matthias Krüger-110/+17
Bump chalk to v0.87 1. Removes `ReEmpty` from chalk 2. Adds support for the `std::marker::Tuple` trait
2022-11-14Rollup merge of #104364 - petrochenkov:docice2, r=GuillaumeGomezMatthias Krüger-0/+14
rustdoc: Resolve doc links in external traits having local impls For external impls it was done in https://github.com/rust-lang/rust/pull/103192 right away, but the local impl case was forgotten. Fixes https://github.com/rust-lang/rust/issues/104145.
2022-11-14Rollup merge of #104294 - compiler-errors:inline-ct-err-in-mir-build, ↵Matthias Krüger-0/+21
r=davidtwco Don't ICE with inline const errors during MIR build Fixes #104277
2022-11-14Rollup merge of #104229 - compiler-errors:overlap-full-path, r=davidtwcoMatthias Krüger-75/+75
Don't print full paths in overlap errors We don't print the full path in other diagnostics -- I don't think it particularly helps with the error message. I also delayed the printing until actually needing to render the error message. r? diagnostics
2022-11-14Rollup merge of #104223 - fmease:recover-fn-ptr-with-generics, r=estebankMatthias Krüger-0/+142
Recover from function pointer types with generic parameter list Give a more helpful error when encountering function pointer types with a generic parameter list like `fn<'a>(&'a str) -> bool` or `fn<T>(T) -> T` and suggest moving lifetime parameters to a `for<>` parameter list. I've added a bunch of extra code to properly handle (unlikely?) corner cases like `for<'a> fn<'b>()` (where there already exists a `for<>` parameter list) correctly suggesting `for<'a, 'b> fn()` (merging the lists). If you deem this useless, I can simplify the code by suggesting nothing at all in this case. I am quite open to suggestions regarding the wording of the diagnostic messages. Fixes #103487. ``@rustbot`` label A-diagnostics r? diagnostics
2022-11-13Rollup merge of #104266 - compiler-errors:issue-102430, r=Mark-SimulacrumManish Goregaokar-0/+32
Regression test for coercion of mut-ref to dyn-star Closes #102430
2022-11-13Rollup merge of #104181 - jackh726:known-bug-tests, r=Mark-SimulacrumManish Goregaokar-0/+373
Add a few known-bug tests The labels of these tests should be changed from `S-bug-has-mcve` to `S-bug-has-test` once this is merged. cc: #101518 #99492 #90950 #89196 #104034 #101350 #103705 #103899 I couldn't reproduce the failures in #101962 and #100772 (so either these have started passing, or I didn't repro properly), so leaving those out for now. #102065 was a bit more complicated, since it uses `rustc_private` and I didn't want to mess with that.
2022-11-13Rollup merge of #104105 - davidtwco:split-dwarf-lto, r=michaelwoeristerManish Goregaokar-14/+197
llvm: dwo only emitted when object code emitted Fixes #103932. `CompiledModule` should not think a DWARF object was emitted when a bitcode-only compilation has happened, this can confuse archive file creation (which expects to create an archive containing non-existent dwo files). r? ``````@michaelwoerister``````
2022-11-13Add a few known-bug testsJack Huey-0/+373
2022-11-13Make rustc build with new chalkMichael Goulet-110/+17
2022-11-13Auto merge of #104370 - matthiaskrgr:rollup-c3b38sm, r=matthiaskrgrbors-0/+12
Rollup of 5 pull requests Successful merges: - #103996 (Add small clarification around using pointers derived from references) - #104315 (Improve spans with `use crate::{self}`) - #104320 (Use `derive_const` and rm manual StructuralEq impl) - #104357 (add is_sized method on Abi and Layout, and use it) - #104365 (Add x tool to triagebot) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-13Rollup merge of #104315 - SparkyPotato:fix-104276, r=cjgillotMatthias Krüger-0/+12
Improve spans with `use crate::{self}` Fixes #104276. The error becomes: ``` error: crate root imports need to be explicitly named: `use crate as name;` --> src/lib.rs.rs:1:13 | 1 | use crate::{self}; | ^^^^ warning: unused import: `self` --> src/lib.rs:1:13 | 1 | use crate::{self}; | ^^^^ | = note: `#[warn(unused_imports)]` on by default ```
2022-11-13Auto merge of #104292 - GuillaumeGomez:fix-missing-reexports-doc-comments, ↵bors-0/+34
r=notriddle Fix missing reexports' doc comments Fixes #81893. The issue was that an import directly "links" to the target without the intermediate imports. Unfortunately, to fix this bug we need to go through them one by one. To do so, I take the import path direct parent (so `b` in `a::b::c`) and then look for `c` into it. r? `@notriddle`
2022-11-13rustdoc: Resolve doc links in external traits having local implsVadim Petrochenkov-0/+14
2022-11-13Auto merge of #104351 - JohnTitor:rollup-ikh2dzr, r=JohnTitorbors-80/+141
Rollup of 5 pull requests Successful merges: - #103650 (rustdoc: change `.src-line-numbers > span` to `.src-line-numbers > a`) - #104177 (rustdoc: use consistent "popover" styling for notable traits) - #104318 (Move tests) - #104323 (rustdoc: remove no-op CSS `.scrape-help { background: transparent }`) - #104345 (Fix up a Fluent message) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-13move span to `self` instead of `crate`SparkyPotato-0/+12
2022-11-13Rollup merge of #104345 - fmease:fix-up-a-fluent-message, r=compiler-errorsYuki Okushi-1/+29
Fix up a Fluent message Fix up a Fluent message which contained arrows `->` after [selectors](https://projectfluent.org/fluent/guide/selectors.html). The original author probably thought that they were required as part of the selector syntax but in reality they were interpreted as literal text and actually showed up in the emitted diagnostic. This wasn't caught during the diagnostic migration since the branch constructing the diagnostic in question (`rustc_infer::errors::LifetimeMismatchLabels::Normal`) was not exercised by the UI test suite. I've added two more test cases to do so (one testing `LifetimeMismatchLabels::Normal` where `hir_equal == true` and one where `hir_equal == false`). Diff visualizing the `->` bug (`master` vs `fix-up-a-fluent-message`): ```diff error[E0623]: lifetime mismatch --> src/test/ui/implied-bounds/hrlt-implied-trait-bounds-guard.rs:39:30 | 39 | fn badboi3<'in_, 'out, T>(a: Foo<'in_, 'out, (&'in_ T, &'out T)>, sadness: &'in_ T) { | ^^^^^^^^^^^^^^^^^-------^^-------^^ | | | | | these two types are declared with different lifetimes... - | ...but data-> from `a` flows-> into `a` here + | ...but data from `a` flows into `a` here ```
2022-11-13Rollup merge of #104318 - c410-f3r:moar-errors, r=petrochenkovYuki Okushi-0/+0
Move tests r? `@petrochenkov` https://github.com/rust-lang/rust/pull/46521 -> enum-discriminant
2022-11-13Rollup merge of #104177 - notriddle:notriddle/js-notable-trait-v2, ↵Yuki Okushi-53/+62
r=GuillaumeGomez rustdoc: use consistent "popover" styling for notable traits Follow-up to #104129 Fixes https://github.com/rust-lang/rust/issues/104313. Preview: https://notriddle.com/notriddle-rustdoc-demos/js-notable-trait-v2/std/iter/trait.Iterator.html#method.step_by ## Before ![image](https://user-images.githubusercontent.com/1593513/200710372-d2d992ce-0bdc-4437-9a2e-379a29df09cf.png) ![image](https://user-images.githubusercontent.com/1593513/200711266-e372b176-daa9-45f3-a022-738ef0a77d3c.png) ## After ![image](https://user-images.githubusercontent.com/1593513/200710601-09b3b717-116f-43c6-b14f-34a8b02b33c0.png) ![image](https://user-images.githubusercontent.com/1593513/200711288-3978cdc1-a6c2-47f6-9216-e22e3c1f5bdf.png)
2022-11-13Rollup merge of #103650 - notriddle:notriddle/line-anchors, r=GuillaumeGomezYuki Okushi-26/+50
rustdoc: change `.src-line-numbers > span` to `.src-line-numbers > a` Example: https://notriddle.com/notriddle-rustdoc-demos/line-anchors/test_dingus/fn.test.html This allows people to treat them like real links, such as right-click to copy URL, and makes the line numbers in a scraped example work at all, when before this commit was added, they had the clickable pointer cursor but did not actually do anything when clicked.
2022-11-13Auto merge of #104282 - cjgillot:intern-span, r=compiler-errorsbors-18/+18
Hash spans when interning types Ignoring hash for spans creates an inconsistency between the `Hash` impl for `WithStableHash`, which takes them into account, and the `HashStable` impl which does not. cc `@compiler-errors` Fixes https://github.com/rust-lang/rust/issues/104271 Fixes https://github.com/rust-lang/rust/issues/104255 Fixes https://github.com/rust-lang/rust/issues/104238
2022-11-13fix up a fluent messageLeón Orell Valerian Liehr-1/+29
2022-11-12Auto merge of #103311 - petrochenkov:pblfix, r=bjorn3bors-1/+4
linker: Refactoring and fixes to native library linking This PR contains a bunch of code cleanup and comment rearrangements + 2 fixes for `-Zpacked-bundled-libs`. It's better to look at individual commits.
2022-11-12Update run-make-fulldeps testsVadim Petrochenkov-1/+4
Adjacent identical native libraries are no longer deduplicated if they come from different crates
2022-11-12Auto merge of #104325 - GuillaumeGomez:rollup-19bzwoa, r=GuillaumeGomezbors-80/+273
Rollup of 8 pull requests Successful merges: - #104110 (prevent uninitialized access in black_box for zero-sized-types) - #104117 (Mark `trait_upcasting` feature no longer incomplete.) - #104144 (Suggest removing unnecessary `.` to use a floating point literal) - #104250 (Migrate no result page link color to CSS variables) - #104261 (More accurately report error when formal and expected signature types differ) - #104263 (Add a reference to ilog2 in leading_zeros integer docs) - #104308 (Remove the old `ValidAlign` name) - #104319 (Fix non clickable source link) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-12Rollup merge of #104319 - GuillaumeGomez:fix-non-clickable-source-link, ↵Guillaume Gomez-0/+5
r=notriddle Fix non clickable source link Fixes https://github.com/rust-lang/rust/issues/104313. It was also fixed in https://github.com/rust-lang/rust/pull/104177. If https://github.com/rust-lang/rust/pull/104177 is merged first, I'll simply remove the first commit to keep the test. r? ``@notriddle``
2022-11-12Rollup merge of #104261 - compiler-errors:formal-and-expected-differ, r=estebankGuillaume Gomez-0/+55
More accurately report error when formal and expected signature types differ Fixes #104242
2022-11-12Rollup merge of #104250 - GuillaumeGomez:migrate-not-found-link-color, ↵Guillaume Gomez-0/+36
r=notriddle Migrate no result page link color to CSS variables r? ``@notriddle``
2022-11-12Rollup merge of #104144 - TaKO8Ki:suggest-removing-unnecessary-dot, r=fee1-deadGuillaume Gomez-0/+65
Suggest removing unnecessary `.` to use a floating point literal Fixes a part of #101883
2022-11-12Rollup merge of #104117 - crlf0710:update_feature_gate, r=jackh726Guillaume Gomez-80/+80
Mark `trait_upcasting` feature no longer incomplete. This marks the `trait_upcasting` feature no longer incomplete since #101336 has been settled for a little while. r? ``````@jackh726``````
2022-11-12Rollup merge of #104110 - krasimirgg:msan-16, r=nagisaGuillaume Gomez-0/+32
prevent uninitialized access in black_box for zero-sized-types Don't read the pointer location in black_box for zero sized types, just emit a memory clobber instead. Addresses https://github.com/rust-lang/rust/issues/103304 when rust is build against LLVM at HEAD. Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/.28with.20llvm.20at.20HEAD.29.3A.20msan.20error.20in.20core.3A.3Ahint.3A.3Ablack_box
2022-11-12Auto merge of #103812 - clubby789:improve-include-bytes, r=petrochenkovbors-8/+13
Delay `include_bytes` to AST lowering Hopefully addresses #65818. This PR introduces a new `ExprKind::IncludedBytes` which stores the path and bytes of a file included with `include_bytes!()`. We can then create a literal from the bytes during AST lowering, which means we don't need to escape the bytes into valid UTF8 which is the cause of most of the overhead of embedding large binary blobs.
2022-11-12Add GUI test to ensure that source links can be clickedGuillaume Gomez-0/+5
2022-11-12Move testsCaio-0/+0
2022-11-12Use same color for links in no result searchGuillaume Gomez-2/+2
2022-11-12Add GUI test for "no result found" linksGuillaume Gomez-0/+36
2022-11-12Auto merge of #102701 - flba-eb:add_qnx_nostd_support, r=cjgillotbors-1/+1
Add tier 3 no_std AArch64/x86_64 support for the QNX Neutrino RTOS This change allows to compile `no_std` applications for the QNX Neutrino Real-time operating system for ARM 64 bit CPUs. Tested with QNX Neutrino 7.1. Partially discussed in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Adding.20QNX.20as.20target). --- > ## Tier 3 target policy > > At this tier, the Rust project provides no official support for a target, so we place minimal requirements on the introduction of targets. > >A proposed new tier 3 target must be reviewed and approved by a member of the compiler team based on these requirements. The reviewer may choose to gauge broader compiler team consensus via a [Major Change Proposal (MCP)][MCP]. > >A proposed target or target-specific patch that substantially changes code shared with other targets (not just target-specific code) must be reviewed and approved by the appropriate team for that shared code before acceptance. > >- A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.) See also nto-qnx.md; designated developers are: - Florian Bartels, `Florian.Bartels@elektrobit.com`, https://github.com/flba-eb - Tristan Roach, `TRoach@blackberry.com`, https://github.com/gh-tr > - Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target. > - Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it. `aarch64-unknown-nto-qnx7.1.0` and `x86_64-pc-nto-qnx7.1.0` have been chosen as these strings are used in the official QNX Neutrino toolchain (for `C`/`C++`). It should also harmonize with the other Rust targets. The version (`7.1.0 `) is needed because libc needs to distinguish between different versions (`target_env` is set to `710` for QNX Neutrino 7.1): For example, functions are removed from 7.0 to 7.1, sometimes the signature of functions is slightly changed or size/alignment of structs. I'm expecting the same for future versions. This works very well in e.g. `libc` (tested with 7.0 which I'm not going to support). > - Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users. > - The target must not introduce license incompatibilities. No issue as far as I can see. > - Anything added to the Rust repository must be under the standard Rust license (`MIT OR Apache-2.0`). Ok > - The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy. This applies whether the dependency is a Rust crate that would require adding new license exceptions (as specified by the `tidy` tool in the rust-lang/rust repository), or whether the dependency is a native library or binary. In other words, the introduction of the target must not cause a user installing or running a version of Rust or the Rust tools to be subject to any new license requirements. No change for host tools. When cross-compiling for QNX Neutrino, the compiler/linker driver "qcc" is called. It should be possible (but not tested) to use other (OSS) compilers/linkers to produce working binaries. > - Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries. Host tools built for the target itself may depend on the ordinary runtime libraries supplied by the platform and commonly used by other applications built for the target, but those libraries must not be required for code generation for the target; cross-compilation to the target must not require such libraries at all. For instance, `rustc` built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3. Only rustc is required for code generation (i.e. no additional libraries to generate code). Linking of executables requires the ordinary runtime libraries `crt` and `libc`. > - "onerous" here is an intentionally subjective term. At a minimum, "onerous" legal/licensing terms include but are *not* limited to: non-disclosure requirements, non-compete requirements, contributor license agreements (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms, requirements conditional on the employer or employment of any particular Rust developers, revocable terms, any requirements that create liability for the Rust project or its developers or users, or any requirements that adversely affect the livelihood or prospects of the Rust project or its developers or users. >- Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions. > - This requirement does not prevent part or all of this policy from being cited in an explicit contract or work agreement (e.g. to implement or maintain support for a target). This requirement exists to ensure that a developer or team responsible for reviewing and approving a target does not face any legal threats or obligations that would prevent them from freely exercising their judgment in such approval, even if such judgment involves subjective matters or goes beyond the letter of these requirements. I see no issues with any of the above. >- Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (`core` for most targets, `alloc` for targets that can support dynamic memory allocation, `std` for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions. `core` and `alloc` should be working (no change required). `std` implementation is ongoing and will be provided separately. >- The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary. see nto-qnx.md >- Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via ``@`)` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages. > - Backlinks such as those generated by the issue/PR tracker when linking to an issue or PR are not considered a violation of this policy, within reason. However, such messages (even on a separate repository) must not generate notifications to anyone involved with a PR who has not requested such notifications. Ok >- Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target. > - In particular, this may come up when working on closely related targets, such as variations of the same architecture with different features. Avoid introducing unconditional uses of features that another variation of the target may not have; use conditional compilation or runtime detection, as appropriate, to let each target run code supported by that target. Ok
2022-11-12Auto merge of #104310 - Dylan-DPC:rollup-wgt1z4a, r=Dylan-DPCbors-34/+306
Rollup of 7 pull requests Successful merges: - #102049 (Add the `#[derive_const]` attribute) - #103970 (Unhide unknown spans) - #104206 (Remove `save_and_restore_in_snapshot_flag`, use `ObligationCtxt` more) - #104214 (Emit error in `collecting_trait_impl_trait_tys` on mismatched signatures) - #104267 (rustdoc: use checkbox instead of switch for settings toggles) - #104302 (Update cargo) - #104303 (UI tests can be assigned to T-compiler) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-12Rollup merge of #104267 - notriddle:notriddle/checkbox, r=GuillaumeGomezDylan DPC-12/+84
rustdoc: use checkbox instead of switch for settings toggles Preview: http://notriddle.com/notriddle-rustdoc-demos/checkbox/test_dingus/index.html ## Before ![image](https://user-images.githubusercontent.com/1593513/201232887-dee27ef5-b091-49bb-be4a-103d2e7983f3.png) ## After ![image](https://user-images.githubusercontent.com/1593513/201232835-95b40b77-6535-4280-8719-44c992a07772.png) ## Description The switch ("slider") is designed to give the application a "physical" feel, but nothing else in here really followed through. They didn't support the "flick" gesture that real iOS switches support, and the radio buttons that were also used in Rustdoc Settings were a more "classic" form element anyway. Also, while switches are the exclusive toggle design on iOS (since [Apple HIG] reserves checkboxes for Mac only), the [Google Material] guidelines say that lists of switches are bad, and you should just use check boxes. [Apple HIG]: https://developer.apple.com/design/human-interface-guidelines/components/selection-and-input/toggles [Google Material]: https://m3.material.io/components/checkbox/guidelines#6902f23d-ceba-4b19-ae3b-b78b9b01d185
2022-11-12Rollup merge of #104214 - Nilstrieb:returns_impl_Ice, r=compiler-errorsDylan DPC-0/+135
Emit error in `collecting_trait_impl_trait_tys` on mismatched signatures Previously, a `delay_span_bug` was isssued, failing normalization. This create a `TyKind::Error` in the signature, which caused `compare_predicate_entailment` to swallow its signature mismatch error, causing ICEs because no error was emitted. fixes #104183 r? ``@compiler-errors``
2022-11-12Rollup merge of #103970 - oli-obk:unhide_unknown_spans, r=estebankDylan DPC-20/+14
Unhide unknown spans r? ```@estebank```
2022-11-12Rollup merge of #102049 - fee1-dead-contrib:derive_const, r=oli-obkDylan DPC-2/+73
Add the `#[derive_const]` attribute Closes #102371. This is a minimal patchset for the attribute to work. There are no restrictions on what traits this attribute applies to. r? `````@oli-obk`````
2022-11-12Auto merge of #103530 - cjgillot:hir-lifetimes-direct, r=estebankbors-133/+89
Resolve lifetimes independently for each item-like. Now that the heavy-lifting is done on the AST and during lowering, we do not need to perform HIR lifetime resolution on a full item at once. Instead, we can treat each item-like independently, and look at `generics_of` the parent exceptionally for associated items.