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
..
2025-03-25 08:22:35 +01:00
2025-03-14 19:50:03 +00:00
2025-03-14 19:50:03 +00:00
2024-11-27 07:18:25 -08:00
2025-02-10 20:21:39 +00:00
2024-12-27 19:58:16 +11:00
2025-02-21 00:41:17 +00:00
2025-02-10 20:21:39 +00:00
2025-03-25 17:33:09 +03:00
2025-02-22 06:09:14 +00:00
2025-03-11 12:05:02 +00:00
2025-02-26 19:03:56 +01:00
2025-03-24 16:57:07 +00:00
2025-03-14 19:50:03 +00:00
2025-03-18 17:35:26 +00:00
2025-03-25 16:14:27 +11:00
2025-03-07 17:20:57 +00:00
2025-03-11 09:36:57 +01:00
2024-11-26 02:50:48 +08:00
2024-12-05 23:52:21 +00:00
2025-01-23 20:51:29 +08:00
2024-11-26 02:50:48 +08:00
2025-02-06 22:28:44 +00:00
2025-02-21 00:41:17 +00:00
2025-02-10 20:21:39 +00:00
2024-12-20 02:38:46 +08:00
2025-03-14 19:50:03 +00:00
2025-01-23 20:51:29 +08:00
2025-02-10 20:21:39 +00:00
2024-12-07 21:37:13 +00:00
2025-03-03 08:52:07 +01:00
2025-03-16 09:40:10 +08:00
2025-03-25 17:33:09 +03:00
2025-03-25 17:33:09 +03:00
2025-03-26 02:25:01 +01:00
2025-03-03 08:52:07 +01:00
2025-03-26 21:59:00 +01:00
2025-03-14 19:50:03 +00:00
2025-03-21 22:55:00 -06:00
2025-03-20 02:17:14 +00:00
2025-02-15 03:41:07 +01:00
2025-02-14 00:44:10 -08:00
2024-12-28 13:57:13 +11:00
2025-03-26 15:30:12 +03:00
2025-02-10 20:21:39 +00:00
2024-12-04 20:29:35 +00:00
2025-03-15 11:29:25 +01:00
2025-03-14 19:50:03 +00:00
2025-03-28 17:06:00 +00:00
2025-02-11 01:02:43 -05:00
2025-03-14 12:21:59 -07:00
2025-02-21 00:54:01 +00:00
2025-03-04 00:21:02 +08:00
2024-12-02 18:43:37 +01:00
2025-03-14 19:50:03 +00:00
2024-12-09 21:06:29 +08:00
2025-02-09 10:05:13 -06:00
2025-03-13 14:13:07 +03:00
2025-03-25 17:33:09 +03:00
2025-03-25 17:33:09 +03:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-03-14 19:50:03 +00:00
2025-03-14 19:50:03 +00:00
2025-02-21 00:41:17 +00:00
2025-03-24 01:02:07 +01:00
2025-02-11 09:19:37 +00:00
2025-03-14 19:50:03 +00:00
2025-03-25 17:33:09 +03:00
2025-03-11 12:05:02 +00:00
2025-02-24 16:41:18 +00:00
2025-02-27 10:26:33 +00:00
2025-01-21 06:59:15 -07:00
2025-03-14 21:03:21 +00:00
2025-03-08 20:44:57 +00:00
2025-02-06 23:44:23 +01:00
2025-02-27 10:26:33 +00:00
2025-03-25 17:33:09 +03:00
2025-02-14 00:44:10 -08:00
2025-03-25 17:33:09 +03:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-03-14 19:50:03 +00:00
2025-03-06 18:06:48 -03:00
2025-03-16 09:40:08 +08:00
2025-03-07 17:55:08 +00:00
2025-03-25 17:33:09 +03:00
2025-02-10 20:21:39 +00:00
2025-03-14 19:50:03 +00:00
2025-02-10 20:21:39 +00:00
2025-03-20 03:22:46 +00:00
2025-02-21 17:37:03 +00:00
2025-03-28 21:18:30 +01:00
2025-03-25 17:33:09 +03:00
2025-03-22 02:08:44 +09:00
2024-12-12 23:36:27 +00:00
2025-02-06 22:28:44 +00:00
2025-02-28 22:29:52 +08:00
2025-01-24 01:19:50 +00:00
2024-12-19 10:56:31 +00:00
2025-02-10 20:21:39 +00:00
2024-11-26 02:50:48 +08:00
2025-03-14 19:50:03 +00:00
2025-03-14 19:50:03 +00:00
2025-03-14 19:50:03 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-03-11 12:05:02 +00:00
2025-03-03 23:53:42 +00:00
2025-03-28 21:18:30 +01:00
2025-03-11 12:05:02 +00:00
2025-02-28 08:42:14 +11:00
2025-03-14 19:50:03 +00:00
2024-12-31 23:46:39 +08:00
2024-12-31 23:46:39 +08:00
2025-02-22 00:04:26 +00:00
2025-03-25 17:33:09 +03:00
2024-11-27 07:18:25 -08:00
2025-03-14 19:50:03 +00:00
2025-03-25 17:33:09 +03:00
2025-02-24 14:31:19 +01:00
2024-12-17 13:56:10 +11:00
2025-02-27 12:22:59 +01:00
2025-02-25 08:06:30 +00:00
2025-03-25 17:33:09 +03:00
2025-03-25 17:33:09 +03:00
2024-12-27 19:58:16 +11:00
2025-03-21 22:55:00 -06:00
2025-02-10 20:21:39 +00:00
2025-03-04 00:21:02 +08:00
2025-01-24 01:19:50 +00:00
2025-02-24 18:48:40 +00:00
2025-02-10 20:21:39 +00:00
2025-03-25 17:33:09 +03:00
2025-03-11 12:05:02 +00:00
2025-03-05 10:06:43 +01:00
2025-03-11 12:05:02 +00:00
2025-02-14 00:44:10 -08:00
2025-03-07 17:55:08 +00:00
2025-03-06 18:18:32 +00:00
2025-02-28 16:28:41 +00:00
2025-03-25 17:33:09 +03:00
2025-03-25 17:33:09 +03:00
2025-03-08 19:03:49 +01:00
2025-03-26 00:06:46 +00:00
2025-01-23 14:32:21 -05:00
2025-03-17 01:59:37 -05:00
2025-03-07 20:59:45 +11:00
2025-03-25 17:33:09 +03:00
2024-12-12 23:36:27 +00:00
2025-03-25 17:33:09 +03:00
2025-03-14 19:50:03 +00:00
2025-03-07 16:16:41 +01:00
2025-02-10 20:21:39 +00:00
2025-03-11 12:05:02 +00:00
2025-03-27 17:45:02 +00:00
2025-03-25 17:33:09 +03:00
2025-02-21 00:41:17 +00:00
2025-03-25 17:33:09 +03:00
2025-03-25 17:33:09 +03:00
2024-12-07 21:29:58 +00:00
2025-01-22 00:52:27 +00:00
2025-01-24 01:19:50 +00:00
2025-03-19 14:40:14 +00:00
2025-01-28 19:35:51 +00:00
2025-02-14 00:44:10 -08:00
2025-03-14 19:50:03 +00:00
2025-01-30 21:33:11 -07:00
2025-03-06 12:53:35 +01:00
2025-02-06 22:28:44 +00:00
2025-02-10 20:21:39 +00:00
2024-11-26 02:50:48 +08:00
2025-02-21 00:41:17 +00:00
2025-01-07 16:04:14 +01:00
2025-02-21 00:54:01 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2024-11-26 02:50:48 +08:00
2024-12-27 19:58:16 +11:00
2025-03-25 17:33:09 +03:00
2025-01-23 20:51:29 +08:00
2025-02-03 22:27:17 +08:00
2025-01-26 13:55:59 +00:00
2025-03-27 13:11:17 -04:00
2025-03-25 17:33:09 +03:00
2025-03-15 00:18:24 +01:00
2025-01-21 06:59:15 -07:00
2025-03-25 17:33:09 +03:00
2025-03-25 18:09:04 +01:00
2025-03-26 15:30:12 +03:00
2025-02-26 13:56:47 +00:00
2025-02-14 00:44:10 -08:00
2025-02-10 20:21:39 +00:00
2025-01-06 08:54:27 +01:00
2025-03-14 19:50:03 +00:00
2024-12-14 06:44:05 +00:00
2025-02-25 16:56:04 +00:00
2025-03-04 00:21:02 +08:00
2025-03-04 00:21:02 +08:00
2025-02-27 20:02:25 +00:00
2025-03-09 10:51:50 +08:00
2025-03-25 17:33:09 +03:00
2025-03-06 12:22:10 -05:00
2025-03-25 17:33:09 +03:00
2025-03-25 17:33:09 +03:00
2025-03-25 17:33:09 +03:00
2025-02-14 00:44:10 -08:00
2025-03-14 21:03:21 +00:00
2025-03-07 17:55:08 +00:00
2025-03-25 17:33:09 +03:00
2025-03-19 23:29:35 +01:00
2025-03-25 17:33:09 +03:00
2025-03-12 08:06:47 +01:00
2025-01-23 20:51:29 +08:00
2025-03-14 19:50:03 +00:00
2025-02-28 12:16:47 +01:00
2025-03-14 19:50:03 +00:00
2025-03-11 12:05:02 +00:00
2025-03-14 14:51:58 +08:00
2025-01-27 23:42:47 +00:00
2025-03-25 17:33:09 +03:00
2025-03-03 23:09:42 +00:00
2025-03-20 03:22:46 +00:00
2025-03-28 10:15:23 +11:00
2025-03-19 12:55:02 -04:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-03-27 20:09:37 +08:00
2025-02-14 16:23:27 +01:00
2025-03-21 13:12:15 +01:00
2024-12-27 19:58:16 +11:00
2025-03-25 17:33:09 +03:00
2025-02-11 20:18:01 -08:00
2025-03-26 19:40:27 +11:00
2025-03-25 17:33:09 +03:00
2025-03-14 19:50:03 +00:00
2025-01-29 15:45:13 +00:00
2025-03-27 14:11:11 +01:00
2025-02-03 10:39:32 -05:00
2025-03-25 17:33:09 +03:00
2025-01-01 15:58:29 +01:00
2025-03-03 23:09:42 +00:00
2025-03-24 16:57:06 +00:00
2025-03-14 19:50:03 +00:00
2024-12-27 19:58:16 +11:00
2025-01-27 02:28:04 +01:00
2025-02-18 17:34:16 +00:00
2025-02-21 18:30:07 +00:00
2025-02-10 20:21:39 +00:00
2025-03-25 20:34:48 -04:00
2025-02-10 20:21:39 +00:00
2025-02-21 00:41:17 +00:00
2025-03-25 16:44:59 +00:00
2025-02-03 19:51:20 +00:00
2025-03-14 09:45:38 +11:00
2025-02-10 20:21:39 +00:00
2025-03-05 23:06:54 +00:00
2025-02-23 04:46:51 +00:00
2024-11-27 07:18:25 -08:00
2025-02-10 20:21:39 +00:00
2025-03-18 18:24:02 +00:00
2025-03-14 19:50:03 +00:00
2024-12-18 19:27:44 +00:00
2024-12-07 21:37:13 +00:00
2025-03-25 17:33:09 +03:00
2025-02-14 00:44:10 -08:00
2024-12-15 20:28:16 -08:00
2025-03-03 01:34:09 +00:00
2025-02-28 16:32:06 +00:00
2025-02-27 10:26:33 +00:00
2025-02-27 10:26:33 +00:00
2025-01-21 19:46:20 +00:00
2025-01-11 22:36:25 +01:00
2025-02-10 20:21:39 +00:00
2025-01-23 10:55:01 +00:00
2025-03-03 23:09:42 +00:00
2025-03-01 22:02:46 +08:00
2025-02-04 21:42:43 +05:30
2025-01-31 09:59:41 +01:00
2025-01-31 09:59:41 +01:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2025-01-23 16:45:19 -08:00
2025-01-23 16:45:19 -08:00
2025-01-23 20:51:29 +08:00
2024-11-26 02:50:48 +08:00
2025-03-14 15:53:42 +08:00
2025-03-14 15:53:42 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2025-02-25 16:56:04 +00:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2025-02-10 20:21:39 +00:00
2025-03-14 19:50:03 +00:00
2024-11-26 02:50:48 +08:00
2024-11-18 08:07:46 +01:00
2024-11-26 02:50:48 +08:00
2025-01-21 06:59:15 -07:00
2024-11-28 14:32:45 -08:00
2024-11-26 02:50:48 +08:00
2025-01-03 05:01:14 +00:00
2025-02-24 19:34:54 +00:00
2025-02-24 19:34:54 +00:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2025-02-03 10:39:32 -05:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-21 03:27:05 -08:00
2025-01-06 03:55:19 +00:00
2025-01-06 03:55:19 +00:00
2025-02-10 20:21:39 +00:00
2024-11-06 20:02:42 +01:00
2024-11-06 20:02:42 +01:00
2024-11-13 20:29:40 -08:00
2025-02-21 00:41:17 +00:00
2025-02-14 00:44:10 -08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-12-07 21:29:58 +00:00
2025-02-10 20:21:39 +00:00
2025-01-16 00:26:55 +01:00
2025-01-23 20:51:29 +08:00
2024-11-26 02:50:48 +08:00
2024-12-02 03:43:50 -07:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2025-01-23 20:51:29 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2025-02-06 22:28:44 +00:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2025-03-04 00:21:02 +08:00
2025-03-04 00:21:02 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-12-27 19:58:16 +11:00
2024-11-26 02:50:48 +08:00
2025-02-10 20:21:39 +00:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2025-02-27 12:57:26 +08:00
2025-02-06 15:05:53 -05:00
2025-02-06 22:28:44 +00:00
2025-03-10 01:38:20 -07:00