about summary refs log tree commit diff
path: root/src/rustllvm/ArchiveWrapper.cpp
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2017-09-22 19:13:19 -0700
committerEsteban Küber <esteban@kuber.com.ar>2017-09-24 11:50:09 -0700
commitddee9fbc998e345e9a36f2066d51d389aa31a632 (patch)
treee1f19cd74de4bf44ab8a4ebfd029d7f5916b605d /src/rustllvm/ArchiveWrapper.cpp
parent14039a42ac6365afc842214989613f9a688c9a66 (diff)
downloadrust-ddee9fbc998e345e9a36f2066d51d389aa31a632.tar.gz
rust-ddee9fbc998e345e9a36f2066d51d389aa31a632.zip
Point at parameter type on E0301
On "the parameter type `T` may not live long enough" error, point to the
parameter type suggesting lifetime bindings:

```
error[E0310]: the parameter type `T` may not live long enough
  --> $DIR/lifetime-doesnt-live-long-enough.rs:28:5
   |
27 | struct Foo<T> {
   |            - help: consider adding an explicit lifetime bound `T: 'static`...
28 |     foo: &'static T
   |     ^^^^^^^^^^^^^^^
   |
note: ...so that the reference type `&'static T` does not outlive the data it points at
  --> $DIR/lifetime-doesnt-live-long-enough.rs:28:5
   |
28 |     foo: &'static T
   |     ^^^^^^^^^^^^^^^
```
Diffstat (limited to 'src/rustllvm/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions