Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
b3827e4f3728b77bd3e60587487ebfc3cc8d901b
rust/tests/ui/specialization/defaultimpl/specialization-feature-gate-default.rs

12 lines
211 B
Rust
Raw Normal View History

support `default impl` for specialization this commit implements the first step of the `default impl` feature: all items in a `default impl` are (implicitly) `default` and hence specializable. In order to test this feature I've copied all the tests provided for the `default` method implementation (in run-pass/specialization and compile-fail/specialization directories) and moved the `default` keyword from the item to the impl. See referenced issue for further info
2016-11-18 17:14:42 +01:00
// Check that specialization must be ungated to use the `default` keyword
trait Foo {
fn foo(&self);
}
default impl<T> Foo for T { //~ ERROR specialization is unstable
fn foo(&self) {}
}
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 5274ms 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