1 // Test cases where we put various lifetime constraints on trait
2 // associated constants.
4 #![feature(rustc_attrs)]
6 use std::option::Option;
8 trait Anything<'a: 'b, 'b> {
9 const AC: Option<&'b str>;
14 impl<'a: 'b, 'b> Anything<'a, 'b> for OKStruct1 {
15 const AC: Option<&'b str> = None;
20 impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct {
21 const AC: Option<&'c str> = None;
22 //~^ ERROR: const not compatible with trait
27 impl<'a: 'b, 'b> Anything<'a, 'b> for OKStruct2 {
28 const AC: Option<&'a str> = None;