1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 #![allow(non_snake_case)]
13 register_long_diagnostics! {
16 A private trait was used on a "public" type. Erroneous code example:
23 pub trait Bar : Foo {} // error: private trait in exported type parameter bound
26 To solve this error, please ensure the trait is accessible at the same level of
27 the type(s) on which it's implemented. Example:
30 pub trait Foo { // we set the Foo trait public
34 pub trait Bar : Foo {} // ok!
39 A private type was used in an exported type signature. Erroneous code example:
45 pub fn bar() -> Bar { // error: private type in exported type signature
51 To solve this error, please ensure the type is accessible at the same level of
52 the exported type signature. Example:
56 pub struct Bar(u32); // we set the Bar type public
58 pub fn bar() -> Bar { // ok!