diff options
| author | bors <bors@rust-lang.org> | 2014-03-13 09:41:35 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-13 09:41:35 -0700 |
| commit | 3fbee34a89c478f959046bf4b4e12a70e937c374 (patch) | |
| tree | de26db2adf42af2da86e7f2a21bc1adec4fe9e19 /src/rustllvm/ExecutionEngineWrapper.cpp | |
| parent | 6ca57736ccd2b9d0c7288f997b31c0391dd1dbca (diff) | |
| parent | 9faa2a58f2403165eed7caefbac30b17d93f0837 (diff) | |
| download | rust-3fbee34a89c478f959046bf4b4e12a70e937c374.tar.gz rust-3fbee34a89c478f959046bf4b4e12a70e937c374.zip | |
auto merge of #12238 : ktt3ja/rust/lifetime-error-msg, r=nikomatsakis
For the following code snippet:
```rust
struct Foo { bar: int }
fn foo1(x: &Foo) -> &int {
&x.bar
}
```
This PR generates the following error message:
```rust
test.rs:2:1: 4:2 note: consider using an explicit lifetime parameter as shown: fn foo1<'a>(x: &'a Foo) -> &'a int
test.rs:2 fn foo1(x: &Foo) -> &int {
test.rs:3 &x.bar
test.rs:4 }
test.rs:3:5: 3:11 error: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements
test.rs:3 &x.bar
^~~~~~
```
Currently it does not support methods.
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
