Skip to content

Add test for #10618 and #16382#16697

Closed
Sawyer47 wants to merge 1 commit intorust-lang:masterfrom
Sawyer47:new-test
Closed

Add test for #10618 and #16382#16697
Sawyer47 wants to merge 1 commit intorust-lang:masterfrom
Sawyer47:new-test

Conversation

@Sawyer47
Copy link
Copy Markdown
Contributor

Closes #10618
Closes #16382

bors added a commit that referenced this pull request Aug 23, 2014
bors added a commit that referenced this pull request Aug 24, 2014
@bors bors closed this Aug 24, 2014
@Sawyer47 Sawyer47 deleted the new-test branch August 24, 2014 06:02
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 3, 2024
…eykril

Add `to_path_buf()` method for `RelPath`

There seems to be no ergonomic way to obtain a `RelPathBuf` from a corresponding `&RelPath` at the moment, making the latter sort of a dead end.

The `AbsPath` type provides the following:

```rust
impl AbsPath {
    // ...

    /// Equivalent of [`Path::to_path_buf`] for `AbsPath`.
    pub fn to_path_buf(&self) -> AbsPathBuf {
        AbsPathBuf::try_from(self.0.to_path_buf()).unwrap()
    }

    // ...
}
```

So I took the liberty of adding a corresponding equivalent for `RelPath:

```rust
impl RelPath {
    // ...

    /// Equivalent of [`Path::to_path_buf`] for `RelPath`.
    pub fn to_path_buf(&self) -> RelPathBuf {
        RelPathBuf::try_from(self.0.to_path_buf()).unwrap()
    }

    // ...
}
```

(the change is motivated by an outside use of the `ra_ap_paths` crate that would benefit from being able to use `RelPath` and `AbsPath` over `Path`)
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 21, 2026
fixes rust-lang/rust-clippy#16696

changelog: [`semicolon_inside_block`]: fix false positive in `try`
blocks where moving `;` inside changes the block's return type and
causes type errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE when initiating an array using static for size ICE with cast in fixed-length vector

4 participants