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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
275 B
Rust
Raw Normal View History

Add `// run-pass` annotations to all the tests under `ui/run-pass/`. (I may have accidentally added it to some auxilliary crates as well; my emacs-macro-based methodology was pretty crude.)
2018-08-30 14:18:55 +02:00
//@ run-pass
Substitute free lifetimes when `Self` is used within a method body This is needed because `Self` can be substituted to a type with lifetime parameters. Fixes #24308 Fixes #25071 Fixes #25259 Fixes #25279
2015-05-20 21:22:05 +03:00
pub trait Foo {
fn method1() {}
fn method2();
}
Adjust compiler tests for unused_tuple_struct_fields -> dead_code
2023-12-27 17:11:58 -05:00
struct Slice<'a, T: 'a>(#[allow(dead_code)] &'a [T]);
Substitute free lifetimes when `Self` is used within a method body This is needed because `Self` can be substituted to a type with lifetime parameters. Fixes #24308 Fixes #25071 Fixes #25259 Fixes #25279
2015-05-20 21:22:05 +03:00
impl<'a, T: 'a> Foo for Slice<'a, T> {
fn method2() {
<Self as Foo>::method1();
}
}
fn main() {
<Slice<()> as Foo>::method2();
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 6750ms Template: 5ms
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