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-25757.rs

19 lines
252 B
Rust
Raw Normal View History

[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
2024-02-16 20:02:50 +00:00
//@ run-pass
Make expr_is_lval more robust Previously it also tried to find out the best way to translate the expression, which could ICE during type-checking. Fixes #23173 Fixes #24322 Fixes #25757
2015-06-21 22:29:13 +03:00
struct Foo {
a: u32
}
impl Foo {
fn x(&mut self) {
self.a = 5;
}
}
Update run-pass test suite to use dyn
2019-05-28 14:47:21 -04:00
const FUNC: &'static dyn Fn(&mut Foo) -> () = &Foo::x;
Make expr_is_lval more robust Previously it also tried to find out the best way to translate the expression, which could ICE during type-checking. Fixes #23173 Fixes #24322 Fixes #25757
2015-06-21 22:29:13 +03:00
fn main() {
let mut foo = Foo { a: 137 };
Fix compiletest so it respects warnings for run-pass.
2016-08-22 16:51:37 -07:00
FUNC(&mut foo);
Make expr_is_lval more robust Previously it also tried to find out the best way to translate the expression, which could ICE during type-checking. Fixes #23173 Fixes #24322 Fixes #25757
2015-06-21 22:29:13 +03:00
assert_eq!(foo.a, 5);
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 5268ms 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