diff --git a/src/librustc_error_codes/error_codes.rs b/src/librustc_error_codes/error_codes.rs index 709ccce517a36..5b117bc740f57 100644 --- a/src/librustc_error_codes/error_codes.rs +++ b/src/librustc_error_codes/error_codes.rs @@ -28,6 +28,7 @@ E0029: include_str!("./error_codes/E0029.md"), E0030: include_str!("./error_codes/E0030.md"), E0033: include_str!("./error_codes/E0033.md"), E0034: include_str!("./error_codes/E0034.md"), +E0036: include_str!("./error_codes/E0036.md"), E0038: include_str!("./error_codes/E0038.md"), E0040: include_str!("./error_codes/E0040.md"), E0044: include_str!("./error_codes/E0044.md"), @@ -414,7 +415,6 @@ E0745: include_str!("./error_codes/E0745.md"), // E0006, // merged with E0005 // E0008, // cannot bind by-move into a pattern guard // E0035, merged into E0087/E0089 -// E0036, merged into E0087/E0089 // E0068, // E0085, // E0086, diff --git a/src/librustc_error_codes/error_codes/E0036.md b/src/librustc_error_codes/error_codes/E0036.md new file mode 100644 index 0000000000000..a74a510c7a7c4 --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0036.md @@ -0,0 +1,40 @@ +#### Note: this error code is no longer emitted by the compiler. + +This error occurrs when you pass too many or not enough type parameters to +a method. Erroneous code example: + +```compile_fail,E0107 +struct Test; +impl Test { + fn method(&self, v: &[T]) -> usize { + v.len() + } +} +fn main() { + let x = Test; + let v = &[0]; + x.method::(v); // error: only one type parameter is expected! +} +``` + +To fix it, just specify a correct number of type parameters: + +``` +struct Test; +impl Test { + fn method(&self, v: &[T]) -> usize { + v.len() + } +} +fn main() { + let x = Test; + let v = &[0]; + x.method::(v); // OK, we're good! +} +``` + +Please note on the last example that we could have called `method` like this: + +```text +x.method(v); +``` diff --git a/src/librustc_error_codes/error_codes/E0066.md b/src/librustc_error_codes/error_codes/E0066.md new file mode 100644 index 0000000000000..58df1debeaf3d --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0066.md @@ -0,0 +1,9 @@ +#### Note: this error code is no longer emitted by the compiler. + +Box placement expressions (like C++'s "placement new") do not yet support any +place expression except the exchange heap (i.e. `std::boxed::HEAP`). +Furthermore, the syntax is changing to use `in` instead of `box`. See [RFC 470] +and [RFC 809] for more details. + +[RFC 470]: https://github.com/rust-lang/rfcs/pull/470 +[RFC 809]: https://github.com/rust-lang/rfcs/pull/809