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_diagnostics! {
27 E0040, // explicit use of destructor method
97 E0173, // manual implementations of unboxed closure traits are experimental
98 E0174, // explicit use of unboxed closure methods are experimental
105 E0187, // can't infer the kind of the closure
106 E0188, // types differ in mutability
107 E0189, // can only cast a boxed pointer to a boxed object
108 E0190, // can only cast a &-pointer to an &-object
109 E0191, // value of the associated type must be specified
110 E0192, // negative imples are allowed just for `Send` and `Sync`
111 E0193, // cannot bound type where clause bounds may only be attached to types
112 // involving type parameters
114 E0195, // lifetime parameters or bounds on method do not match the trait declaration
115 E0196, // cannot determine a type for this closure
116 E0197, // inherent impls cannot be declared as unsafe
117 E0198, // negative implementations are not unsafe
118 E0199, // implementing trait is not unsafe
119 E0200, // trait requires an `unsafe impl` declaration
120 E0201, // duplicate method in trait impl
121 E0202, // associated items are not allowed in inherent impls
122 E0203, // type parameter has more than one relaxed default bound,
123 // and only one is supported
124 E0204, // trait `Copy` may not be implemented for this type; field
125 // does not implement `Copy`
126 E0205, // trait `Copy` may not be implemented for this type; variant
127 // does not implement `copy`
128 E0206, // trait `Copy` may not be implemented for this type; type is
129 // not a structure or enumeration
130 E0207, // type parameter is not constrained by the impl trait, self type, or predicate
132 E0209, // builtin traits can only be implemented on structs or enums
133 E0210, // type parameter is not constrained by any local type
135 E0212, // cannot extract an associated type from a higher-ranked trait bound
136 E0213, // associated types are not accepted in this context
137 E0214, // parenthesized parameters may only be used with a trait
138 E0215, // angle-bracket notation is not stable with `Fn`
139 E0216, // parenthetical notation is only stable with `Fn`
140 E0217, // ambiguous associated type, defined in multiple supertraits
141 E0218, // no associated type defined
142 E0219, // associated type defined in higher-ranked supertrait
143 E0220, // associated type not found for type parameter
144 E0221, // ambiguous associated type in bounds
145 E0222, // variadic function must have C calling convention
146 E0223, // ambiguous associated type
147 E0224, // at least one non-builtin train is required for an object type
148 E0225, // only the builtin traits can be used as closure or object bounds
149 E0226, // only a single explicit lifetime bound is permitted
150 E0227, // ambiguous lifetime bound, explicit lifetime bound required
151 E0228, // explicit lifetime bound required
152 E0229, // associated type bindings are not allowed here
153 E0230, // there is no type parameter on trait
154 E0231, // only named substitution parameters are allowed
155 E0232, // this attribute must have a value
157 E0234, // `for` loop expression has type which does not implement the `Iterator` trait
158 E0235, // structure constructor specifies a structure of type but
159 E0236, // no lang item for range syntax
160 E0237, // no lang item for range syntax
161 E0238, // parenthesized parameters may only be used with a trait
162 E0239, // `next` method of `Iterator` trait has unexpected type
165 E0242, // internal error looking up a definition
166 E0243, // wrong number of type arguments
167 E0244, // wrong number of type arguments
168 E0245, // not a trait
169 E0246, // illegal recursive type
170 E0247, // found module name used as a type
171 E0248, // found value name used as a type
172 E0249, // expected constant expr for array length
173 E0250, // expected constant expr for array length
174 E0318, // can't create default impls for traits outside their crates
175 E0319, // trait impls for defaulted traits allowed just for structs/enums
176 E0320, // recursive overflow during dropck
177 E0321, // extended coherence rules for defaulted traits violated
178 E0322, // cannot implement Sized explicitly
179 E0323, // implemented an associated const when another trait item expected
180 E0324, // implemented a method when another trait item expected
181 E0325, // implemented an associated type when another trait item expected
182 E0326, // associated const implemented with different type from trait
183 E0327, // referred to method instead of constant in match pattern
184 E0366, // dropck forbid specialization to concrete type or region
185 E0367, // dropck forbid specialization to predicate not in struct/enum
186 E0368, // binary operation `<op>=` cannot be applied to types
187 E0369, // binary operation `<op>` cannot be applied to types
188 E0371, // impl Trait for Trait is illegal
189 E0372 // impl Trait for Trait where Trait is not object safe
192 __build_diagnostic_array! { DIAGNOSTICS }