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
a63f35daeefc4ae89ba5b6bd0323d97bb0d050e6
rust/src/test/ui/parser/issue-19398.rs

7 lines
140 B
Rust
Raw Normal View History

Fix the ordering of `unsafe` and `extern` in methods This breaks code that looks like this: trait Foo { extern "C" unsafe fn foo(); } impl Foo for Bar { extern "C" unsafe fn foo() { ... } } Change such code to look like this: trait Foo { unsafe extern "C" fn foo(); } impl Foo for Bar { unsafe extern "C" fn foo() { ... } } Fixes #19398. [breaking-change]
2014-11-30 21:33:04 +13:00
trait T {
fuse extern & associated item parsing up to defaultness
2020-02-15 17:35:29 +01:00
//~^ ERROR missing `fn`, `type`, `const`, or `static` for item declaration
parser: misc small item related improvements & cleanups.
2020-02-01 06:18:10 +01:00
extern "Rust" unsafe fn foo();
Fix the ordering of `unsafe` and `extern` in methods This breaks code that looks like this: trait Foo { extern "C" unsafe fn foo(); } impl Foo for Bar { extern "C" unsafe fn foo() { ... } } Change such code to look like this: trait Foo { unsafe extern "C" fn foo(); } impl Foo for Bar { unsafe extern "C" fn foo() { ... } } Fixes #19398. [breaking-change]
2014-11-30 21:33:04 +13:00
}
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1860ms Template: 2ms
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