diff options
| author | bors <bors@rust-lang.org> | 2015-04-03 22:37:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-03 22:37:07 +0000 |
| commit | f207ecbe021e2a81fbff4ea1904b955a156aa340 (patch) | |
| tree | 9217d1fca3661cb1fcd22ecc8957b660ae460c55 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | c1b8eb5ad4e4b581a38dd7d94723497b568a60d4 (diff) | |
| parent | 52340630a6f76eae4e9b605d17c650d57114951e (diff) | |
| download | rust-f207ecbe021e2a81fbff4ea1904b955a156aa340.tar.gz rust-f207ecbe021e2a81fbff4ea1904b955a156aa340.zip | |
Auto merge of #23972 - gkoz:partial_eq_str_string, r=alexcrichton
Right now comparing a `&String` (or a `&Cow`) to a `&str` requires redundant borrowing of the latter. Implementing `PartialEq<str>` tries to avoid this limitation.
```rust
struct Foo (String);
fn main () {
let s = Foo("foo".to_string());
match s {
Foo(ref x) if x == &"foo" => println!("foo!"),
// avoid this -----^
_ => {}
}
}
```
I was hoping that #23521 would solve this but it didn't work out.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
