diff options
| author | bors <bors@rust-lang.org> | 2015-06-23 01:00:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-06-23 01:00:48 +0000 |
| commit | cffaf0e7a82e7b95bf76f37ad074451409a995e9 (patch) | |
| tree | 66199c0ae047156541f38f1bd1fe5614cce15004 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | a8dbd71fc8dcf106eaedca6e52f55b0dcc82b7c1 (diff) | |
| parent | a006a82724d1efec712f0f0d337aeeaf3f14258c (diff) | |
| download | rust-cffaf0e7a82e7b95bf76f37ad074451409a995e9.tar.gz rust-cffaf0e7a82e7b95bf76f37ad074451409a995e9.zip | |
Auto merge of #26435 - gsingh93:master, r=nikomatsakis
When a method exists in an impl but can not be used due to missing trait bounds for the type parameters, we should inform the user which trait bounds are missing.
For example, this code
```
// Note this is missing a Debug impl
struct Foo;
fn main() {
let a: Result<(), Foo> = Ok(());
a.unwrap()
}
```
Now gives the following error:
```
/home/gulshan/tmp/tmp.rs:6:7: 6:15 error: no method named `unwrap` found for type `core::result::Result<(), Foo>` in the current scope
/home/gulshan/tmp/tmp.rs:6 a.unwrap()
^~~~~~~~
/home/gulshan/tmp/tmp.rs:6:7: 6:15 note: The method `unwrap` exists but the following trait bounds were not satisfied: `Foo : core::fmt::Debug`
error: aborting due to previous error
```
Fixes https://github.com/rust-lang/rust/issues/20941.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
