Trevor Gross
75ed6de1ee
Rollup merge of #143698 - benschulz:unused-parens-2, r=lcnr,compiler-errors
...
Fix unused_parens false positive
Resolves rust-lang/rust#143653 .
The "no bounds exception" was indiscriminately set to `OneBound` for referents and pointees. However, if the reference or pointer type itself appears in no-bounds position, any constraints it has must be propagated.
```rust
// unused parens: not in no-bounds position
fn foo(_: Box<(dyn Send)>) {}
// unused parens: in no-bounds position, but one-bound exception applies
fn bar(_: Box<dyn Fn(&u32) -> &(dyn Send)>) {}
// *NOT* unused parens: in no-bounds position, but no exceptions to be made
fn baz(_: Box<dyn Fn(&u32) -> &(dyn Send) + Send>) {}
```
2025-07-26 02:19:28 -05:00
..
2025-07-14 09:25:54 +00:00
2025-07-25 11:16:39 +02:00
2025-07-26 00:42:21 +01:00
2025-07-22 00:54:25 +08:00
2025-07-18 03:13:21 +02:00
2025-07-17 18:06:26 +08:00
2025-07-23 13:33:23 +02:00
2025-07-24 15:08:28 +02:00
2025-07-25 11:16:36 +02:00
2025-07-18 14:49:19 +02:00
2025-07-23 23:54:37 +00:00
2025-07-24 12:50:26 +00:00
2025-07-24 12:50:26 +00:00
2025-07-25 11:16:36 +02:00
2025-07-23 23:54:37 +00:00
2025-07-07 15:16:42 +02:00
2025-07-18 04:27:51 +02:00
2025-07-23 13:33:23 +02:00
2025-06-28 23:36:46 +00:00
2025-07-19 01:49:19 +08:00
2025-07-22 00:36:10 -07:00
2025-07-19 01:42:30 +08:00
2025-07-23 13:33:23 +02:00
2025-07-25 11:16:39 +02:00
2025-07-17 18:06:26 +08:00
2025-07-25 11:16:32 +02:00
2025-07-05 10:55:42 +02:00
2025-07-15 16:02:26 +00:00
2025-07-22 00:54:24 +08:00
2025-07-10 10:25:29 -05:00
2025-07-26 02:19:28 -05:00
2025-07-24 15:08:21 +02:00
2025-07-22 00:54:24 +08:00
2025-07-22 01:52:34 +00:00
2025-07-24 19:04:00 +08:00
2025-07-24 15:08:21 +02:00
2025-07-26 02:19:28 -05:00
2025-07-11 10:56:50 +02:00
2025-07-23 23:54:37 +00:00
2025-07-24 15:08:21 +02:00
2025-07-18 09:36:38 +02:00
2025-07-24 15:08:28 +02:00
2025-07-08 10:16:44 +00:00
2025-07-24 15:08:19 +02:00
2025-07-20 18:23:18 +02:00
2025-07-24 15:08:25 +02:00
2025-07-08 10:16:44 +00:00
2025-07-24 18:26:08 +08:00
2025-07-23 23:54:37 +00:00
2025-07-07 12:58:16 +00:00
2025-07-05 10:55:35 +02:00
2025-07-25 11:16:38 +02:00
2025-07-01 19:00:21 +00:00
2025-07-05 10:55:42 +02:00
2025-07-24 15:08:22 +02:00
2025-07-22 00:54:30 +08:00
2025-07-16 23:24:32 +02:00
2025-07-24 15:08:22 +02:00
2025-06-28 17:58:21 +08:00
2025-07-20 17:45:01 +00:00
2025-07-20 17:45:01 +00:00
2025-07-07 09:04:53 +02:00
2025-07-24 10:21:20 +00:00
2025-07-18 02:23:50 +00:00