<h1 dir="auto">Updated code example</h1>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="struct Foo {
    listener: &lt;'a&gt; ||: 'a
}

impl Foo {
    fn new(listener: &lt;'a&gt; ||: 'a) -&gt; Foo {
        Foo {
            listener: listener
        }
    }
}

fn main() {
    let a = Foo::new();
}"><pre class="notranslate"><span class="pl-k">struct</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span>
    listener<span class="pl-kos">:</span> &lt;<span class="pl-c1">'</span><span class="pl-ent">a</span>&gt; ||<span class="pl-kos">:</span> <span class="pl-c1">'</span><span class="pl-ent">a</span>
<span class="pl-kos">}</span>

<span class="pl-k">impl</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
    <span class="pl-k">fn</span> new<span class="pl-kos">(</span>listener<span class="pl-kos">:</span> &lt;<span class="pl-c1">'</span><span class="pl-ent">a</span>&gt; ||<span class="pl-kos">:</span> <span class="pl-c1">'</span><span class="pl-ent">a</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
        <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
            <span class="pl-smi">listener</span><span class="pl-kos">:</span> <span class="pl-smi">listener</span>
        <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span>

<span class="pl-k">fn</span> <span class="pl-smi">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">let</span> <span class="pl-smi">a</span> = <span class="pl-smi">Foo</span><span class="pl-kos">::</span><span class="pl-smi">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<h1 dir="auto">Original description</h1>
<p dir="auto">I added <code class="notranslate">pub listener: &lt;'a&gt; ||: 'a,</code> as a field on a struct and I am passing <code class="notranslate">listener: &lt;'a&gt; ||: 'a</code> into the constructor and setting <code class="notranslate">listener: listener</code>. My code is horribly broken at the moment, so the error might be hard to duplicate in a normal circumstance</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="src/slot.rs:16:23: 16:31 error: internal compiler error: cannot relate bound region: ReLateBound(368, BrNamed(syntax::ast::DefId{krate: 0u32, node: 370u32}, a)) &lt;= ReLateBound(613, BrNamed(syntax::ast::DefId{krate: 0u32, node: 615u32}, a))
src/slot.rs:16             listener: listener,
                                     ^~~~~~~~
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at '~Any', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:99
stack backtrace:
   1:        0x108bcc774 - rt::backtrace::imp::write::hb8edc46a4e54f5bdyEa::v0.11.pre
   2:        0x108b2e65e - rt::unwind::begin_unwind_inner::h4857e4963ab560a9Eea::v0.11.pre
   3:        0x1082ae925 - rt::unwind::begin_unwind::h10981348780101087386::v0.11.pre
   4:        0x1082ae8a9 - diagnostic::SpanHandler::span_bug::h7a0381da98a05456ITb::v0.11.pre
   5:        0x105f673f1 - driver::session::Session::span_bug::hf3890a8c1798bcecGqh::v0.11.pre
   6:        0x1062161c5 - middle::typeck::infer::region_inference::RegionVarBindings&lt;'a&gt;::make_subre
gion::h2161fa77405c0b5eVii::v0.11.pre
   7:        0x1061f8664 - middle::typeck::infer::sub::Sub&lt;'f&gt;.Combine::regions::h87816d6c29e2d1e2NIk
::v0.11.pre
   8:        0x1061f8969 - middle::typeck::infer::sub::Sub&lt;'f&gt;.Combine::contraregions::ha70e9e373bca1
82aeIk::v0.11.pre
   9:        0x10622dba8 - middle::typeck::infer::combine::Combine::closure_tys::h1515845370716737786
6::v0.11.pre
  10:        0x1061e11ee - middle::typeck::infer::sub::Sub&lt;'f&gt;.Combine::tys::h9e417bda90b44b91PQk::v0
.11.pre
  11:        0x1061ed578 - middle::typeck::infer::lattice::ty..t.LatticeValue::sub::h6788a62e8e532e66
1kg::v0.11.pre
  12:        0x1061ef19a - middle::typeck::infer::lattice::CombineFields&lt;'f&gt;.CombineFieldsLatticeMeth
ods::bnds::h11321451026438906780::v0.11.pre
  13:        0x1061ee8de - middle::typeck::infer::lattice::CombineFields&lt;'f&gt;.CombineFieldsLatticeMeth
ods::set_var_to_merged_bounds::h18364305293880178940::v0.11.pre
  14:        0x1061e021a - middle::typeck::infer::sub::Sub&lt;'f&gt;.Combine::tys::h9e417bda90b44b91PQk::v0
.11.pre
  15:        0x10623292b - middle::typeck::infer::coercion::Coerce&lt;'f&gt;::subtype::ha90a34c19d50317a3Ol
::v0.11.pre
  16:        0x10623127e - middle::typeck::infer::coercion::Coerce&lt;'f&gt;::coerce_borrowed_fn::h21eec21d
591af7e2J9l::v0.11.pre
  17:        0x106231081 - middle::typeck::infer::coercion::Coerce&lt;'f&gt;::tys::closure.68186
  18:        0x10622f4b1 - middle::typeck::infer::coercion::Coerce&lt;'f&gt;::unpack_actual_value::h423d3c0
be57f69fbCPl::v0.11.pre
  19:        0x10622edd2 - middle::typeck::infer::coercion::Coerce&lt;'f&gt;::tys::hfbee61e40c4d2177VHl::v0
.11.pre
  20:        0x10625630d - middle::typeck::infer::mk_coercety::closure.68856
  21:        0x106255e5c - middle::typeck::infer::InferCtxt&lt;'a&gt;::commit::closure.68846
  22:        0x1062550f9 - util::common::indent::h148640294178993037::v0.11.pre
  23:        0x106255cee - middle::typeck::infer::mk_coercety::closure.68842
  24:        0x1062550f9 - util::common::indent::h148640294178993037::v0.11.pre
  25:        0x1061bbc1c - middle::typeck::infer::mk_coercety::h8c3f5e59b24b1d6a3Go::v0.11.pre
  26:        0x10617f701 - middle::typeck::check::FnCtxt&lt;'a&gt;::mk_assignty::h73ec086633282126ZV8::v0.1
1.pre
  27:        0x10617f588 - middle::typeck::check::demand::coerce::h728f9dff6d7fdfc7SY4::v0.11.pre
  28:        0x1061c606a - middle::typeck::check::check_expr_coercable_to_type::closure.66448
  29:        0x1061bcd6e - middle::typeck::check::check_expr_with_unifier::h54f2db4c9a491156Dy9::v0.1
1.pre
  30:        0x1061d222b - middle::typeck::check::check_expr_with_unifier::check_struct_or_variant_fi
elds::h3be96966110b5d79OAa::v0.11.pre
  31:        0x1061c5940 - middle::typeck::check::check_expr_with_unifier::h54f2db4c9a491156Dy9::v0.1
1.pre
  32:        0x10619f26c - middle::typeck::check::check_block_with_expected::h03ef625794cf7320lUb::v0
.11.pre
  33:        0x10619ae49 - middle::typeck::check::check_fn::h9c2aca4017bc1637Sn7::v0.11.pre
  34:        0x10619a67a - middle::typeck::check::check_bare_fn::hbbbe27defcff6637Jd7::v0.11.pre
  35:        0x1061a38d2 - middle::typeck::check::check_method_body::h7e31fe0e72676ae4IU7::v0.11.pre
  36:        0x106192d8e - middle::typeck::check::check_item::h810810778b4049b86J7::v0.11.pre
  37:        0x1061944bd - visit::walk_item::h10033669871325854080::v0.11.pre
  38:        0x10619a420 - middle::typeck::check::check_item_types::h9d072e264d49e9741c7::v0.11.pre
  39:        0x1062cd9df - util::common::time::h14811596011449642652::v0.11.pre
  40:        0x1062cc90d - middle::typeck::check_crate::hc7ccc9d6246f2066lIu::v0.11.pre
  41:        0x1066e655d - driver::driver::phase_3_run_analysis_passes::hb484e7997e276ab1TCf::v0.11.p
re
  42:        0x1066ec5d2 - driver::driver::compile_input::h5786f561b203dba8G2f::v0.11.pre
  43:        0x1067123b2 - run_compiler::he93bc641c5699ab0xzn::v0.11.pre
  44:        0x10672622d - main_args::closure.91452
  45:        0x1067245c2 - monitor::closure.91327
  46:        0x10672010b - task::TaskBuilder::try::closure.91093
  47:        0x105eca47c - task::spawn_opts::closure.7106
  48:        0x108bc7878 - rt::task::Task::run::closure.40139
  49:        0x108bd15ec - rust_try
  50:        0x108bc76f7 - rt::task::Task::run::h149edfd1efd12195e57::v0.11.pre
  51:        0x105eca2ff - task::spawn_opts::closure.7078
  52:        0x108bcb146 - rt::thread::thread_start::he6c7e09250b70489rK8::v0.11.pre
  53:     0x7fff8e7fc899 - _pthread_body
  54:     0x7fff8e7fc72a - _pthread_struct_init

make: *** [compile] Error 101"><pre class="notranslate"><code class="notranslate">src/slot.rs:16:23: 16:31 error: internal compiler error: cannot relate bound region: ReLateBound(368, BrNamed(syntax::ast::DefId{krate: 0u32, node: 370u32}, a)) &lt;= ReLateBound(613, BrNamed(syntax::ast::DefId{krate: 0u32, node: 615u32}, a))
src/slot.rs:16             listener: listener,
                                     ^~~~~~~~
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at '~Any', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:99
stack backtrace:
   1:        0x108bcc774 - rt::backtrace::imp::write::hb8edc46a4e54f5bdyEa::v0.11.pre
   2:        0x108b2e65e - rt::unwind::begin_unwind_inner::h4857e4963ab560a9Eea::v0.11.pre
   3:        0x1082ae925 - rt::unwind::begin_unwind::h10981348780101087386::v0.11.pre
   4:        0x1082ae8a9 - diagnostic::SpanHandler::span_bug::h7a0381da98a05456ITb::v0.11.pre
   5:        0x105f673f1 - driver::session::Session::span_bug::hf3890a8c1798bcecGqh::v0.11.pre
   6:        0x1062161c5 - middle::typeck::infer::region_inference::RegionVarBindings&lt;'a&gt;::make_subre
gion::h2161fa77405c0b5eVii::v0.11.pre
   7:        0x1061f8664 - middle::typeck::infer::sub::Sub&lt;'f&gt;.Combine::regions::h87816d6c29e2d1e2NIk
::v0.11.pre
   8:        0x1061f8969 - middle::typeck::infer::sub::Sub&lt;'f&gt;.Combine::contraregions::ha70e9e373bca1
82aeIk::v0.11.pre
   9:        0x10622dba8 - middle::typeck::infer::combine::Combine::closure_tys::h1515845370716737786
6::v0.11.pre
  10:        0x1061e11ee - middle::typeck::infer::sub::Sub&lt;'f&gt;.Combine::tys::h9e417bda90b44b91PQk::v0
.11.pre
  11:        0x1061ed578 - middle::typeck::infer::lattice::ty..t.LatticeValue::sub::h6788a62e8e532e66
1kg::v0.11.pre
  12:        0x1061ef19a - middle::typeck::infer::lattice::CombineFields&lt;'f&gt;.CombineFieldsLatticeMeth
ods::bnds::h11321451026438906780::v0.11.pre
  13:        0x1061ee8de - middle::typeck::infer::lattice::CombineFields&lt;'f&gt;.CombineFieldsLatticeMeth
ods::set_var_to_merged_bounds::h18364305293880178940::v0.11.pre
  14:        0x1061e021a - middle::typeck::infer::sub::Sub&lt;'f&gt;.Combine::tys::h9e417bda90b44b91PQk::v0
.11.pre
  15:        0x10623292b - middle::typeck::infer::coercion::Coerce&lt;'f&gt;::subtype::ha90a34c19d50317a3Ol
::v0.11.pre
  16:        0x10623127e - middle::typeck::infer::coercion::Coerce&lt;'f&gt;::coerce_borrowed_fn::h21eec21d
591af7e2J9l::v0.11.pre
  17:        0x106231081 - middle::typeck::infer::coercion::Coerce&lt;'f&gt;::tys::closure.68186
  18:        0x10622f4b1 - middle::typeck::infer::coercion::Coerce&lt;'f&gt;::unpack_actual_value::h423d3c0
be57f69fbCPl::v0.11.pre
  19:        0x10622edd2 - middle::typeck::infer::coercion::Coerce&lt;'f&gt;::tys::hfbee61e40c4d2177VHl::v0
.11.pre
  20:        0x10625630d - middle::typeck::infer::mk_coercety::closure.68856
  21:        0x106255e5c - middle::typeck::infer::InferCtxt&lt;'a&gt;::commit::closure.68846
  22:        0x1062550f9 - util::common::indent::h148640294178993037::v0.11.pre
  23:        0x106255cee - middle::typeck::infer::mk_coercety::closure.68842
  24:        0x1062550f9 - util::common::indent::h148640294178993037::v0.11.pre
  25:        0x1061bbc1c - middle::typeck::infer::mk_coercety::h8c3f5e59b24b1d6a3Go::v0.11.pre
  26:        0x10617f701 - middle::typeck::check::FnCtxt&lt;'a&gt;::mk_assignty::h73ec086633282126ZV8::v0.1
1.pre
  27:        0x10617f588 - middle::typeck::check::demand::coerce::h728f9dff6d7fdfc7SY4::v0.11.pre
  28:        0x1061c606a - middle::typeck::check::check_expr_coercable_to_type::closure.66448
  29:        0x1061bcd6e - middle::typeck::check::check_expr_with_unifier::h54f2db4c9a491156Dy9::v0.1
1.pre
  30:        0x1061d222b - middle::typeck::check::check_expr_with_unifier::check_struct_or_variant_fi
elds::h3be96966110b5d79OAa::v0.11.pre
  31:        0x1061c5940 - middle::typeck::check::check_expr_with_unifier::h54f2db4c9a491156Dy9::v0.1
1.pre
  32:        0x10619f26c - middle::typeck::check::check_block_with_expected::h03ef625794cf7320lUb::v0
.11.pre
  33:        0x10619ae49 - middle::typeck::check::check_fn::h9c2aca4017bc1637Sn7::v0.11.pre
  34:        0x10619a67a - middle::typeck::check::check_bare_fn::hbbbe27defcff6637Jd7::v0.11.pre
  35:        0x1061a38d2 - middle::typeck::check::check_method_body::h7e31fe0e72676ae4IU7::v0.11.pre
  36:        0x106192d8e - middle::typeck::check::check_item::h810810778b4049b86J7::v0.11.pre
  37:        0x1061944bd - visit::walk_item::h10033669871325854080::v0.11.pre
  38:        0x10619a420 - middle::typeck::check::check_item_types::h9d072e264d49e9741c7::v0.11.pre
  39:        0x1062cd9df - util::common::time::h14811596011449642652::v0.11.pre
  40:        0x1062cc90d - middle::typeck::check_crate::hc7ccc9d6246f2066lIu::v0.11.pre
  41:        0x1066e655d - driver::driver::phase_3_run_analysis_passes::hb484e7997e276ab1TCf::v0.11.p
re
  42:        0x1066ec5d2 - driver::driver::compile_input::h5786f561b203dba8G2f::v0.11.pre
  43:        0x1067123b2 - run_compiler::he93bc641c5699ab0xzn::v0.11.pre
  44:        0x10672622d - main_args::closure.91452
  45:        0x1067245c2 - monitor::closure.91327
  46:        0x10672010b - task::TaskBuilder::try::closure.91093
  47:        0x105eca47c - task::spawn_opts::closure.7106
  48:        0x108bc7878 - rt::task::Task::run::closure.40139
  49:        0x108bd15ec - rust_try
  50:        0x108bc76f7 - rt::task::Task::run::h149edfd1efd12195e57::v0.11.pre
  51:        0x105eca2ff - task::spawn_opts::closure.7078
  52:        0x108bcb146 - rt::thread::thread_start::he6c7e09250b70489rK8::v0.11.pre
  53:     0x7fff8e7fc899 - _pthread_body
  54:     0x7fff8e7fc72a - _pthread_struct_init

make: *** [compile] Error 101
</code></pre></div>
<p dir="auto"><a href="http://doc.rust-lang.org/std/cmp/trait.Ord.html" rel="nofollow">Trait Ord</a> and <a href="http://doc.rust-lang.org/std/cmp/trait.PartialOrd.html" rel="nofollow">PartialOrd</a> have cryptic explanations.  An example would be helpful.</p>
<p dir="auto">I thought these would be valid examples:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// [1,2,3,4,5,6] -&gt; Ord - sortable without duplicates
// [B,C,D,a,c,e] -&gt; Ord (used ASCII ordering)
// [1,1,1,2,3,3] -&gt; PartialOrd - sortable with duplicates
// [A,B,B,c,c,c] -&gt; PartialOrd"><pre class="notranslate"><code class="notranslate">// [1,2,3,4,5,6] -&gt; Ord - sortable without duplicates
// [B,C,D,a,c,e] -&gt; Ord (used ASCII ordering)
// [1,1,1,2,3,3] -&gt; PartialOrd - sortable with duplicates
// [A,B,B,c,c,c] -&gt; PartialOrd
</code></pre></div>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/steveklabnik/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/steveklabnik">@steveklabnik</a> You asked to be CCed on documentation bugs</p>