]> git.lizzy.rs Git - rust.git/commitdiff
Add long error explanation for E0703
authorPankajChaudhary5 <pankajchaudhary172@gmail.com>
Thu, 26 Mar 2020 06:02:56 +0000 (11:32 +0530)
committerPankajChaudhary5 <pankajchaudhary172@gmail.com>
Thu, 26 Mar 2020 06:02:56 +0000 (11:32 +0530)
src/librustc_error_codes/error_codes.rs
src/librustc_error_codes/error_codes/E0703.md [new file with mode: 0644]
src/test/ui/codemap_tests/unicode.stderr

index 59a030bc4c683c2366183ea5ac08655fe1ffc999..bd6f5270fc1efff329623592d41cabb9bf04a466 100644 (file)
 E0699: include_str!("./error_codes/E0699.md"),
 E0700: include_str!("./error_codes/E0700.md"),
 E0701: include_str!("./error_codes/E0701.md"),
+E0703: include_str!("./error_codes/E0703.md"),
 E0704: include_str!("./error_codes/E0704.md"),
 E0705: include_str!("./error_codes/E0705.md"),
 E0706: include_str!("./error_codes/E0706.md"),
 //  E0694, // an unknown tool name found in scoped attributes
     E0696, // `continue` pointing to a labeled block
 //  E0702, // replaced with a generic attribute input check
-    E0703, // invalid ABI
 //  E0707, // multiple elided lifetimes used in arguments of `async fn`
     E0708, // `async` non-`move` closures with parameters are not currently
            // supported
diff --git a/src/librustc_error_codes/error_codes/E0703.md b/src/librustc_error_codes/error_codes/E0703.md
new file mode 100644 (file)
index 0000000..14c3cb5
--- /dev/null
@@ -0,0 +1,19 @@
+Invalid ABI(Application Binary Interface) used in the code.
+
+Erroneous code example:
+
+```compile_fail,E0703
+extern "invalid" fn foo() {} //~ ERROR
+
+fn main() { }
+
+```
+At present there the few predefined ABI's (like Rust, C, system, etc.)
+which we can use in our Rust code. Please verify the ABI from the
+given ABI. For example you can replace the given ABI from 'Rust'.
+
+```
+extern "Rust" fn foo() {} //~ OK!
+
+fn main() { }
+```
index fc2a0b5950e7dd8c42e79863062d7b907f3a7726..01d54ac8cc8a2bc23f711c5c29031d349d1c8038 100644 (file)
@@ -8,3 +8,4 @@ LL | extern "路濫狼á́́" fn foo() {}
 
 error: aborting due to previous error
 
+For more information about this error, try `rustc --explain E0703`.