diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-03-28 15:21:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-28 15:21:57 +0100 |
| commit | 1f13089bef91e8410bca87b2f42e6fbbc2bbfd9e (patch) | |
| tree | 50053c59733380d866fe646832a14a2eb0f3b5e0 /src | |
| parent | b9d5ee567652cd342d9348c215009049551747b0 (diff) | |
| parent | c09b5a3ed37a229408831f9b00f0d53ef6d8b938 (diff) | |
| download | rust-1f13089bef91e8410bca87b2f42e6fbbc2bbfd9e.tar.gz rust-1f13089bef91e8410bca87b2f42e6fbbc2bbfd9e.zip | |
Rollup merge of #70418 - PankajChaudhary5:master, r=Dylan-DPC
Add long error explanation for E0703 Add long explanation for the E0703 error code Part of #61137 r? @GuillaumeGomez
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_error_codes/error_codes.rs | 2 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0703.md | 17 | ||||
| -rw-r--r-- | src/test/ui/codemap_tests/unicode.stderr | 1 | ||||
| -rw-r--r-- | src/test/ui/parser/issue-8537.stderr | 1 |
4 files changed, 20 insertions, 1 deletions
diff --git a/src/librustc_error_codes/error_codes.rs b/src/librustc_error_codes/error_codes.rs index fe68e9eacbf..2f0a3fc1d1c 100644 --- a/src/librustc_error_codes/error_codes.rs +++ b/src/librustc_error_codes/error_codes.rs @@ -389,6 +389,7 @@ E0698: include_str!("./error_codes/E0698.md"), 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"), @@ -603,7 +604,6 @@ E0751: include_str!("./error_codes/E0751.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 index 00000000000..b42677d52cb --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0703.md @@ -0,0 +1,17 @@ +Invalid ABI (Application Binary Interface) used in the code. + +Erroneous code example: + +```compile_fail,E0703 +extern "invalid" fn foo() {} // error! +# fn main() {} +``` + +At present few predefined ABI's (like Rust, C, system, etc.) can be +used in Rust. Verify that the ABI is predefined. For example you can +replace the given ABI from 'Rust'. + +``` +extern "Rust" fn foo() {} // ok! +# fn main() { } +``` diff --git a/src/test/ui/codemap_tests/unicode.stderr b/src/test/ui/codemap_tests/unicode.stderr index fc2a0b5950e..01d54ac8cc8 100644 --- a/src/test/ui/codemap_tests/unicode.stderr +++ b/src/test/ui/codemap_tests/unicode.stderr @@ -8,3 +8,4 @@ LL | extern "路濫狼á́́" fn foo() {} error: aborting due to previous error +For more information about this error, try `rustc --explain E0703`. diff --git a/src/test/ui/parser/issue-8537.stderr b/src/test/ui/parser/issue-8537.stderr index b20226f87e8..a0793d94653 100644 --- a/src/test/ui/parser/issue-8537.stderr +++ b/src/test/ui/parser/issue-8537.stderr @@ -8,3 +8,4 @@ LL | "invalid-ab_isize" error: aborting due to previous error +For more information about this error, try `rustc --explain E0703`. |
