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/nll/issue-52663-trait-object.rs

17 lines
254 B
Rust
Raw Normal View History

Update logic to search for casts. This commit updates the captured trait object search logic to look for unsized casts to boxed types rather than for functions that returned trait objects.
2018-10-05 23:31:33 +02:00
trait Foo { fn get(&self); }
impl<A> Foo for A {
fn get(&self) { }
}
Remove box syntax from most places in src/test outside of the issues dir
2021-08-25 02:39:40 +02:00
Update logic to search for casts. This commit updates the captured trait object search logic to look for unsized casts to boxed types rather than for functions that returned trait objects.
2018-10-05 23:31:33 +02:00
fn main() {
let _ = {
let tmp0 = 3;
let tmp1 = &tmp0;
Remove box syntax from most places in src/test outside of the issues dir
2021-08-25 02:39:40 +02:00
Box::new(tmp1) as Box<dyn Foo + '_>
Update logic to search for casts. This commit updates the captured trait object search logic to look for unsized casts to boxed types rather than for functions that returned trait objects.
2018-10-05 23:31:33 +02:00
};
//~^^^ ERROR `tmp0` does not live long enough
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3411ms 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