Jonathan Brouwer
9d8d4be7b9
Rollup merge of #163016 - maxdexh:if-everything-is-a-reference-then-nothing-is, r=estebank
...
Don't claim that escaping value is a reference in diagnostics
Changes the part of the "borrowed data escapes" diagnostic that points to the local that the region came from, by removing the claim that it is a reference, as that is not generally correct.
Fixes rust-lang/rust#162890
I considered checking if the type of the escaping value is actually a reference type (and keeping the old message if so). But with the way the code is written, that would have been non-trivial to do, and of questionable value (the type is already shown in the error).
Also, IMO the new message is more "to the point", even for references.
r? compiler
2026-09-20 17:04:25 +02:00
..
2026-05-12 08:39:45 +01:00
2026-05-12 08:39:45 +01:00
2025-08-05 19:34:46 +05:00
2025-08-05 19:34:46 +05:00
2026-05-12 08:39:45 +01:00
2025-11-10 16:38:28 +01:00
2025-03-14 20:44:49 +08:00
2025-03-14 20:44:49 +08:00
2025-03-14 20:44:49 +08:00
2025-05-06 19:30:55 +00:00
2025-03-27 13:05:18 +08:00
2025-03-27 13:05:18 +08:00
2025-04-10 23:48:57 +03:00
2025-04-10 23:48:57 +03:00
2025-07-10 15:44:36 +05:00
2025-07-10 15:44:36 +05:00
2026-01-05 15:35:01 +09:00
2026-05-05 17:34:50 -04:00
2026-05-05 17:34:50 -04:00
2025-07-13 00:03:31 +05:00
2025-07-13 00:03:31 +05:00
2025-07-13 00:03:31 +05:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2026-05-12 08:39:45 +01:00
2026-05-12 10:12:43 +01:00
2025-12-23 21:13:24 +09:00
2025-12-23 21:13:24 +09:00
2025-02-27 10:26:33 +00:00
2025-08-19 21:27:10 +02:00
2025-11-10 16:38:28 +01:00
2026-01-05 15:35:01 +09:00
2026-01-05 15:35:01 +09:00
2025-12-23 21:13:24 +09:00
2025-12-23 21:13:24 +09:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-06-06 20:52:34 +00:00
2025-06-06 20:52:34 +00:00
2026-01-18 06:23:47 +01:00
2026-01-18 06:23:47 +01:00
2025-12-02 18:25:13 +00:00
2025-07-13 00:03:31 +05:00
2025-08-19 21:27:10 +02:00
2025-08-10 11:54:15 -04:00
2026-06-18 05:28:05 +02:00
2026-09-19 22:23:01 +00:00
2025-08-19 21:27:10 +02:00
2026-02-05 21:32:13 +09:00
2025-05-24 16:33:02 +08:00
2025-10-02 05:45:16 -06:00
2026-01-21 13:44:01 +00:00
2026-02-13 16:24:39 +00:00
2026-02-13 16:24:39 +00:00
2026-05-12 10:12:43 +01:00
2026-05-12 10:12:43 +01:00
2026-05-12 08:39:45 +01:00
2026-05-12 08:39:45 +01:00
2026-05-12 08:39:45 +01:00
2025-07-01 15:16:56 +05:00
2025-07-01 15:16:56 +05:00
2025-07-01 15:16:56 +05:00
2026-01-18 06:23:47 +01:00
2026-01-18 06:23:47 +01:00
2025-08-27 00:23:26 -04:00
2025-12-10 09:38:56 +00:00
2025-12-10 09:38:56 +00:00
2025-12-10 09:38:56 +00:00
2025-12-10 09:38:56 +00:00
2025-12-10 09:38:56 +00:00
2025-12-10 09:38:56 +00:00
2025-12-10 09:38:56 +00:00
2026-01-07 13:27:12 +00:00
2025-02-22 23:03:14 +00:00
2025-02-22 23:03:14 +00:00
2025-12-10 09:38:56 +00:00
2025-12-10 09:38:56 +00:00
2025-12-10 09:38:56 +00:00
2026-09-17 15:54:09 +10:00
2026-09-19 16:09:58 +02:00
2025-12-10 09:38:56 +00:00
2026-05-12 08:39:45 +01:00
2026-06-28 03:56:28 -05:00
2026-06-28 03:48:49 -05:00
2025-07-24 17:01:44 -04:00
2025-08-05 19:34:46 +05:00
2025-08-05 19:34:46 +05:00
2025-08-02 15:29:16 -04:00