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
2fcea9fb68c8e04f10e5cb15bbfb486de9800afa
rust/tests/ui/traits/as-struct-constructor.rs

7 lines
158 B
Rust
Raw Normal View History

test: Fix fallout in tests
2015-04-17 22:12:20 -07:00
trait TraitNotAStruct {}
Added cfail test Changed error to 'use of trait `{}` as a struct constructor'
2014-08-29 21:11:34 -07:00
fn main() {
TraitNotAStruct{ value: 0 };
Preparations and cleanup Diagnostics for struct path resolution errors in resolve and typeck are unified. Self type is treated as a type alias in few places (not reachable yet). Unsafe cell is seen in constants even through type aliases. All checks for struct paths in typeck work on type level.
2016-09-15 00:51:46 +03:00
//~^ ERROR expected struct, variant or union type, found trait `TraitNotAStruct`
Added cfail test Changed error to 'use of trait `{}` as a struct constructor'
2014-08-29 21:11:34 -07:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 6692ms Template: 4ms
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