Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
b3827e4f3728b77bd3e60587487ebfc3cc8d901b
rust/tests/ui/generics/generic-extern.rs

8 lines
144 B
Rust
Raw Normal View History

Update tests for extern block linting
2020-09-01 17:12:52 -04:00
extern "C" {
Allow generic foreign functions. Generic extern functions written in Rust have their names mangled, as well as their internal clownshoe __rust_abi functions. This allows e.g. specific monomorphizations of these functions to be used as callbacks. Closes #12502.
2014-08-01 22:25:41 -06:00
fn foo<T>(); //~ ERROR foreign items may not have type parameters
}
Forbid use of generics with foreign functions. Closes #10353.
2014-02-17 18:52:11 +13:00
fn main() {
Continue to borrowck even if there were previous errors
2024-02-01 22:45:00 +00:00
foo::<i32>(); //~ ERROR requires unsafe
Forbid use of generics with foreign functions. Closes #10353.
2014-02-17 18:52:11 +13:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 4070ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API