about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js/scrape-examples.js
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2025-07-26 02:19:28 -0500
committerGitHub <noreply@github.com>2025-07-26 02:19:28 -0500
commit75ed6de1eef96753da3497c0f6e2623cc86fc240 (patch)
tree112eeae2e4786e6b8d347a02e7faf997f71147cd /src/librustdoc/html/static/js/scrape-examples.js
parentd8f4ceb8c07fd00df40903dbb2ba29c69efdaf00 (diff)
parent307f66436b602697c8f1c49d8f455ec60a176166 (diff)
downloadrust-75ed6de1eef96753da3497c0f6e2623cc86fc240.tar.gz
rust-75ed6de1eef96753da3497c0f6e2623cc86fc240.zip
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>) {}
```
Diffstat (limited to 'src/librustdoc/html/static/js/scrape-examples.js')
0 files changed, 0 insertions, 0 deletions