rust/tests
Matthias Krüger 3e968c7e9f
Rollup merge of #139075 - oli-obk:resolver-item-lifetime, r=compiler-errors
Do not treat lifetimes from parent items as influencing child items

```rust
struct A;
impl Bar<'static> for A {
    const STATIC: &str = "";
    //            ^ no future incompat warning
}
```

has no future incompat warning, because there is no ambiguity. But

```rust
struct C;
impl Bar<'_> for C {
//       ^^ this lifeimte
    const STATIC: &'static str = {
        struct B;
        impl Bar<'static> for B {
            const STATIC: &str = "";
            // causes     ^ to emit a future incompat warning
        }
        ""
    };
}
```

had one before this PR, because the impl for `B` (which is just a copy of `A`) thought it was influenced by a lifetime on the impl for `C`.

I double checked all other `lifetime_ribs` iterations and all of them do check for `Item` boundaries. This feels very fragile tho, and ~~I think we should do not even be able to see ribs from parent items, but that's a different refactoring that I'd rather not do at the same time as a bugfix~~. EDIT: ah nevermind, this is needed for improving diagnostics like "use of undeclared lifetime" being "can't use generic parameters from outer item" instead.

r? `@compiler-errors`
2025-03-28 21:18:32 +01:00
..
assembly Auto merge of #138503 - bjorn3:string_merging, r=tmiasko 2025-03-28 10:18:32 +00:00
auxiliary tests: use minicore more 2025-02-24 09:26:54 +00:00
codegen Auto merge of #138503 - bjorn3:string_merging, r=tmiasko 2025-03-28 10:18:32 +00:00
codegen-units
coverage
coverage-run-rustdoc Update coverage-run-rustdoc output 2025-03-28 10:35:53 +01:00
crashes Auto merge of #138719 - lcnr:concrete_opaque_types-closures, r=oli-obk 2025-03-22 06:55:52 +00:00
debuginfo Rollup merge of #137967 - mustartt:fix-aix-test-hangs, r=workingjubilee 2025-03-11 13:30:50 +01:00
incremental Rollup merge of #130883 - madsmtm:env-var-query, r=petrochenkov 2025-03-27 15:57:21 +11:00
mir-opt Rollup merge of #138135 - scottmcm:chaining-ord, r=Mark-Simulacrum 2025-03-23 20:44:09 -04:00
pretty Auto merge of #138965 - nnethercote:less-kw-Empty-hir-Lifetime, r=lcnr 2025-03-28 03:20:06 +00:00
run-make Rollup merge of #138104 - GuillaumeGomez:simplify-doctest-parsing, r=fmease 2025-03-28 12:59:55 +01:00
rustdoc Correctly handle line comments in attributes and generate extern crates 2025-03-27 11:18:43 +01:00
rustdoc-gui Rollup merge of #137539 - GuillaumeGomez:copy-content-tests, r=notriddle 2025-02-25 13:07:34 +01:00
rustdoc-js
rustdoc-js-std
rustdoc-json rustdoc: Use own logic to print #[repr(..)] attributes in JSON output. 2025-03-22 18:47:12 +00:00
rustdoc-ui Rollup merge of #138104 - GuillaumeGomez:simplify-doctest-parsing, r=fmease 2025-03-28 12:59:55 +01:00
ui Rollup merge of #139075 - oli-obk:resolver-item-lifetime, r=compiler-errors 2025-03-28 21:18:32 +01:00
ui-fulldeps Rollup merge of #138964 - compiler-errors:usage-of-interner, r=lcnr 2025-03-27 15:57:24 +11:00
COMPILER_TESTS.md