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
51b51b51d7931da85280382a81c4dd80c73ca754
rust/tests/ui/issues/issue-19482.rs

14 lines
261 B
Rust
Raw Normal View History

Test for associated types ICE closes #19121
2014-12-02 15:06:39 -08:00
// Test that a partially specified trait object with unspecified associated
eddyb's refactoring of coercions/adjustments
2015-03-16 18:45:01 +02:00
// type does not type-check.
Test for associated types ICE closes #19121
2014-12-02 15:06:39 -08:00
trait Foo {
type A;
Fallout: tests. As tests frequently elide things, lots of changes here. Some of this may have been poorly rebased, though I tried to be careful and preserve the spirit of the test.
2015-02-12 10:29:52 -05:00
fn dummy(&self) { }
Test for associated types ICE closes #19121
2014-12-02 15:06:39 -08:00
}
Update ui test suite to use dyn
2019-05-28 14:46:13 -04:00
fn bar(x: &dyn Foo) {}
Detect object safety errors when assoc type is missing When an associated type with GATs isn't specified in a `dyn Trait`, emit an object safety error instead of only complaining about the missing associated type, as it will lead the user down a path of three different errors before letting them know that what they were trying to do is impossible to begin with. Fix #103155.
2023-10-04 01:10:51 +00:00
//~^ ERROR the associated type `A` in `Foo` must be specified
Test for associated types ICE closes #19121
2014-12-02 15:06:39 -08:00
pub fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 5113ms 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