1 #### Note: this error code is no longer emitted by the compiler.
3 In Rust 1.3, the default object lifetime bounds are expected to change, as
4 described in [RFC 1156]. You are getting a warning because the compiler
5 thinks it is possible that this change will cause a compilation error in your
6 code. It is possible, though unlikely, that this is a false alarm.
8 The heart of the change is that where `&'a Box<SomeTrait>` used to default to
9 `&'a Box<SomeTrait+'a>`, it now defaults to `&'a Box<SomeTrait+'static>` (here,
10 `SomeTrait` is the name of some trait type). Note that the only types which are
11 affected are references to boxes, like `&Box<SomeTrait>` or
12 `&[Box<SomeTrait>]`. More common types like `&SomeTrait` or `Box<SomeTrait>`
15 To silence this warning, edit your code to use an explicit bound. Most of the
16 time, this means that you will want to change the signature of a function that
17 you are calling. For example, if the error is reported on a call like `foo(x)`,
18 and `foo` is defined as follows:
22 fn foo(arg: &Box<SomeTrait>) { /* ... */ }
25 You might change it to:
29 fn foo<'a>(arg: &'a Box<SomeTrait+'a>) { /* ... */ }
32 This explicitly states that you expect the trait object `SomeTrait` to contain
33 references (with a maximum lifetime of `'a`).
35 [RFC 1156]: https://github.com/rust-lang/rfcs/blob/master/text/1156-adjust-default-object-bounds.md