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
359bfa901b9d8eddbed7b88b6716dbb77b7bfb95
rust/tests/ui/dyn-compatibility/sized-2.rs

17 lines
255 B
Rust
Raw Normal View History

Refactor object-safety into its own (cached) module so that we can check it more easily; also extend object safety to cover sized types as well as static methods. This makes it sufficient so that we can always ensure that `Foo : Foo` holds for any trait `Foo`.
2014-12-15 21:11:09 -05:00
// Check that we correctly prevent users from making trait objects
// from traits where `Self : Sized`.
Add regression test
2014-11-01 20:21:55 -07:00
Refactor object-safety into its own (cached) module so that we can check it more easily; also extend object safety to cover sized types as well as static methods. This makes it sufficient so that we can always ensure that `Foo : Foo` holds for any trait `Foo`.
2014-12-15 21:11:09 -05:00
trait Bar
where Self : Sized
{
fn bar<T>(&self, t: T);
Add regression test
2014-11-01 20:21:55 -07:00
}
Update ui test suite to use dyn
2019-05-28 14:46:13 -04:00
fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
Remove dyn_compatible_for_dispatch
2025-02-04 02:37:13 +00:00
//~^ ERROR E0038
RFC 2027: "first draft" of implementation These are a squashed series of commits.
2019-01-08 22:14:04 +01:00
t
Add regression test
2014-11-01 20:21:55 -07:00
}
fn main() {
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 4399ms 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