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
58e901b6fd1163172149fd422565523b17eed5f0
rust/tests/ui/generics/generic-extern.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
118 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() {
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
foo::<i32>();
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: 3582ms 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