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/confuse-field-and-method/issue-18343.rs

10 lines
173 B
Rust
Raw Normal View History

Remove NOTE/HELP annotations from UI tests
2017-12-10 23:29:24 +03:00
struct Obj<F> where F: FnMut() -> u32 {
fix cfail tests
2015-01-03 10:45:00 -05:00
closure: F,
Add test for issue 18343
2014-10-27 12:15:03 +01:00
}
fn main() {
Finished implementing proper function check (through FnOnce) and moved tests to new file and updated tests
2015-06-14 20:07:05 -04:00
let o = Obj { closure: || 42 };
Clarify suggetion for field used as method Instead of ``` error: no method named `src_addr` found for type `&wire::ipv4::Repr` in the current scope --> src/wire/ipv4.rs:409:34 | 409 | packet.set_src_addr(self.src_addr()); | ^^^^^^^^ | note: did you mean to write `self.src_addr`? --> src/wire/ipv4.rs:409:34 | 409 | packet.set_src_addr(self.src_addr()); | ^^^^^^^^ ``` present ``` error: no method named `src_addr` found for type `&wire::ipv4::Repr` in the current scope --> src/wire/ipv4.rs:409:34 | 409 | packet.set_src_addr(self.src_addr()); | ^^^^^^^^ `src_addr` is a field, not a method | = help: did you mean to write `self.src_addr` instead of `self.src_addr(...)`? ```
2017-03-24 23:40:24 -07:00
o.closure();
//~^ ERROR no method named `closure` found
Add test for issue 18343
2014-10-27 12:15:03 +01:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2949ms 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